添加学生评教结果功能
This commit is contained in:
parent
fdfec9e318
commit
e45372c335
|
@ -0,0 +1,184 @@
|
|||
package org.jeecg.modules.kc.pjxxJszbpjf.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLDecoder;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.query.QueryGenerator;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.jeecg.modules.kc.pjxxJszbpjf.entity.PjxxJszbpjf;
|
||||
import org.jeecg.modules.kc.pjxxJszbpjf.service.IPjxxJszbpjfService;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
import org.jeecgframework.poi.excel.ExcelImportUtil;
|
||||
import org.jeecgframework.poi.excel.def.NormalExcelConstants;
|
||||
import org.jeecgframework.poi.excel.entity.ExportParams;
|
||||
import org.jeecgframework.poi.excel.entity.ImportParams;
|
||||
import org.jeecgframework.poi.excel.view.JeecgEntityExcelView;
|
||||
import org.jeecg.common.system.base.controller.JeecgController;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
import org.springframework.web.servlet.ModelAndView;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.aspect.annotation.AutoLog;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
|
||||
/**
|
||||
* @Description: pjxx_jszbpjf
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-01-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Api(tags="pjxx_jszbpjf")
|
||||
@RestController
|
||||
@RequestMapping("/pjxxJszbpjf/pjxxJszbpjf")
|
||||
@Slf4j
|
||||
public class PjxxJszbpjfController extends JeecgController<PjxxJszbpjf, IPjxxJszbpjfService> {
|
||||
@Autowired
|
||||
private IPjxxJszbpjfService pjxxJszbpjfService;
|
||||
|
||||
/**
|
||||
* 分页列表查询
|
||||
*
|
||||
* @param pjxxJszbpjf
|
||||
* @param pageNo
|
||||
* @param pageSize
|
||||
* @param req
|
||||
* @return
|
||||
*/
|
||||
//@AutoLog(value = "pjxx_jszbpjf-分页列表查询")
|
||||
@ApiOperation(value="pjxx_jszbpjf-分页列表查询", notes="pjxx_jszbpjf-分页列表查询")
|
||||
@GetMapping(value = "/list")
|
||||
public Result<IPage<PjxxJszbpjf>> queryPageList(PjxxJszbpjf pjxxJszbpjf,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PjxxJszbpjf> queryWrapper = QueryGenerator.initQueryWrapper(pjxxJszbpjf, req.getParameterMap());
|
||||
Page<PjxxJszbpjf> page = new Page<PjxxJszbpjf>(pageNo, pageSize);
|
||||
IPage<PjxxJszbpjf> pageList = pjxxJszbpjfService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value="首页查询教师平均分", notes="首页查询教师平均分")
|
||||
@GetMapping(value = "/listIndex")
|
||||
public Result<IPage<PjxxJszbpjf>> listIndex(PjxxJszbpjf pjxxJszbpjf,
|
||||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
|
||||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
|
||||
HttpServletRequest req) {
|
||||
QueryWrapper<PjxxJszbpjf> queryWrapper = QueryGenerator.initQueryWrapper(pjxxJszbpjf, req.getParameterMap());
|
||||
Page<PjxxJszbpjf> page = new Page<PjxxJszbpjf>(pageNo, 4);
|
||||
IPage<PjxxJszbpjf> pageList = pjxxJszbpjfService.page(page, queryWrapper);
|
||||
return Result.OK(pageList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加
|
||||
*
|
||||
* @param pjxxJszbpjf
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "pjxx_jszbpjf-添加")
|
||||
@ApiOperation(value="pjxx_jszbpjf-添加", notes="pjxx_jszbpjf-添加")
|
||||
@PostMapping(value = "/add")
|
||||
public Result<String> add(@RequestBody PjxxJszbpjf pjxxJszbpjf) {
|
||||
pjxxJszbpjfService.save(pjxxJszbpjf);
|
||||
return Result.OK("添加成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*
|
||||
* @param pjxxJszbpjf
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "pjxx_jszbpjf-编辑")
|
||||
@ApiOperation(value="pjxx_jszbpjf-编辑", notes="pjxx_jszbpjf-编辑")
|
||||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody PjxxJszbpjf pjxxJszbpjf) {
|
||||
pjxxJszbpjfService.updateById(pjxxJszbpjf);
|
||||
return Result.OK("编辑成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id删除
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "pjxx_jszbpjf-通过id删除")
|
||||
@ApiOperation(value="pjxx_jszbpjf-通过id删除", notes="pjxx_jszbpjf-通过id删除")
|
||||
@DeleteMapping(value = "/delete")
|
||||
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
|
||||
pjxxJszbpjfService.removeById(id);
|
||||
return Result.OK("删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除
|
||||
*
|
||||
* @param ids
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "pjxx_jszbpjf-批量删除")
|
||||
@ApiOperation(value="pjxx_jszbpjf-批量删除", notes="pjxx_jszbpjf-批量删除")
|
||||
@DeleteMapping(value = "/deleteBatch")
|
||||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
|
||||
this.pjxxJszbpjfService.removeByIds(Arrays.asList(ids.split(",")));
|
||||
return Result.OK("批量删除成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过id查询
|
||||
*
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value="pjxx_jszbpjf-通过id查询", notes="pjxx_jszbpjf-通过id查询")
|
||||
@GetMapping(value = "/queryById")
|
||||
public Result<PjxxJszbpjf> queryById(@RequestParam(name="id",required=true) String id) {
|
||||
PjxxJszbpjf pjxxJszbpjf = pjxxJszbpjfService.getById(id);
|
||||
if(pjxxJszbpjf==null) {
|
||||
return Result.error("未找到对应数据");
|
||||
}
|
||||
return Result.OK(pjxxJszbpjf);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出excel
|
||||
*
|
||||
* @param request
|
||||
* @param pjxxJszbpjf
|
||||
*/
|
||||
@RequestMapping(value = "/exportXls")
|
||||
public ModelAndView exportXls(HttpServletRequest request, PjxxJszbpjf pjxxJszbpjf) {
|
||||
return super.exportXls(request, pjxxJszbpjf, PjxxJszbpjf.class, "学生评教结果");
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过excel导入数据
|
||||
*
|
||||
* @param request
|
||||
* @param response
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
|
||||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
|
||||
return super.importExcel(request, response, PjxxJszbpjf.class);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,139 @@
|
|||
package org.jeecg.modules.kc.pjxxJszbpjf.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Date;
|
||||
import java.math.BigDecimal;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.TableLogic;
|
||||
import lombok.Data;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
import org.jeecgframework.poi.excel.annotation.Excel;
|
||||
import org.jeecg.common.aspect.annotation.Dict;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @Description: pjxx_jszbpjf
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-01-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Data
|
||||
@TableName("pjxx_jszbpjf")
|
||||
@Accessors(chain = true)
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@ApiModel(value="pjxx_jszbpjf对象", description="pjxx_jszbpjf")
|
||||
public class PjxxJszbpjf implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**id*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@ApiModelProperty(value = "id")
|
||||
private java.lang.String id;
|
||||
/**createBy*/
|
||||
@ApiModelProperty(value = "createBy")
|
||||
private java.lang.String createBy;
|
||||
/**createTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "createTime")
|
||||
private java.util.Date createTime;
|
||||
/**updateBy*/
|
||||
@ApiModelProperty(value = "updateBy")
|
||||
private java.lang.String updateBy;
|
||||
/**updateTime*/
|
||||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd")
|
||||
@ApiModelProperty(value = "updateTime")
|
||||
private java.util.Date updateTime;
|
||||
/**教师编号*/
|
||||
@Excel(name = "教师编号", width = 15)
|
||||
@ApiModelProperty(value = "教师编号")
|
||||
private java.lang.String jsbh;
|
||||
/**教师姓名*/
|
||||
@Excel(name = "教师姓名", width = 15)
|
||||
@ApiModelProperty(value = "教师姓名")
|
||||
private java.lang.String jsxm;
|
||||
/**教师职称*/
|
||||
@Excel(name = "教师职称", width = 15)
|
||||
@ApiModelProperty(value = "教师职称")
|
||||
private java.lang.String jszc;
|
||||
/**教师院系*/
|
||||
@Excel(name = "教师院系", width = 15)
|
||||
@ApiModelProperty(value = "教师院系")
|
||||
private java.lang.String jsyx;
|
||||
/**开课院系*/
|
||||
@Excel(name = "开课院系", width = 15)
|
||||
@ApiModelProperty(value = "开课院系")
|
||||
private java.lang.String kkyx;
|
||||
/**课程名称*/
|
||||
@Excel(name = "课程名称", width = 15)
|
||||
@ApiModelProperty(value = "课程名称")
|
||||
private java.lang.String kcmc;
|
||||
/**开课编号*/
|
||||
@Excel(name = "开课编号", width = 15)
|
||||
@ApiModelProperty(value = "开课编号")
|
||||
private java.lang.String kkbh;
|
||||
/**参评率*/
|
||||
@Excel(name = "参评率", width = 15)
|
||||
@ApiModelProperty(value = "参评率")
|
||||
private java.lang.String cpl;
|
||||
/**平均分汇总*/
|
||||
@Excel(name = "平均分汇总", width = 15)
|
||||
@ApiModelProperty(value = "平均分汇总")
|
||||
private java.lang.String pjfhz;
|
||||
/**重视学生的成长引领,关心学生的学习需求,乐于与学生交流*/
|
||||
@Excel(name = "重视学生的成长引领,关心学生的学习需求,乐于与学生交流", width = 15)
|
||||
@ApiModelProperty(value = "重视学生的成长引领,关心学生的学习需求,乐于与学生交流")
|
||||
private java.lang.String col1;
|
||||
/**上课准备充分,课堂教学秩序良好。作业布置合理,反馈及时*/
|
||||
@Excel(name = "上课准备充分,课堂教学秩序良好。作业布置合理,反馈及时", width = 15)
|
||||
@ApiModelProperty(value = "上课准备充分,课堂教学秩序良好。作业布置合理,反馈及时")
|
||||
private java.lang.String col2;
|
||||
/**教学目标明确,重点突出,逻辑性强*/
|
||||
@Excel(name = "教学目标明确,重点突出,逻辑性强", width = 15)
|
||||
@ApiModelProperty(value = "教学目标明确,重点突出,逻辑性强")
|
||||
private java.lang.String col3;
|
||||
/**教学内容清晰易懂,体现适当的深度、广度和前沿性*/
|
||||
@Excel(name = "教学内容清晰易懂,体现适当的深度、广度和前沿性", width = 15)
|
||||
@ApiModelProperty(value = "教学内容清晰易懂,体现适当的深度、广度和前沿性")
|
||||
private java.lang.String col4;
|
||||
/**教学方法合理,教学媒体得当,课程资源丰富*/
|
||||
@Excel(name = "教学方法合理,教学媒体得当,课程资源丰富", width = 15)
|
||||
@ApiModelProperty(value = "教学方法合理,教学媒体得当,课程资源丰富")
|
||||
private java.lang.String col5;
|
||||
/**教师知识渊博,教学水平高,教学特色鲜明,教学有吸引力*/
|
||||
@Excel(name = "教师知识渊博,教学水平高,教学特色鲜明,教学有吸引力", width = 15)
|
||||
@ApiModelProperty(value = "教师知识渊博,教学水平高,教学特色鲜明,教学有吸引力")
|
||||
private java.lang.String col6;
|
||||
/**教学语言规范、准确,情绪饱满,热忱投入,为人师表*/
|
||||
@Excel(name = "教学语言规范、准确,情绪饱满,热忱投入,为人师表", width = 15)
|
||||
@ApiModelProperty(value = "教学语言规范、准确,情绪饱满,热忱投入,为人师表")
|
||||
private java.lang.String col7;
|
||||
/**教学中启发学生思考,引导自主学习,激发学习动力,鼓励创新探索*/
|
||||
@Excel(name = "教学中启发学生思考,引导自主学习,激发学习动力,鼓励创新探索", width = 15)
|
||||
@ApiModelProperty(value = "教学中启发学生思考,引导自主学习,激发学习动力,鼓励创新探索")
|
||||
private java.lang.String col8;
|
||||
/**掌握了所学课程的基础知识和基本理论,能用所学知识解决实际问题*/
|
||||
@Excel(name = "掌握了所学课程的基础知识和基本理论,能用所学知识解决实际问题", width = 15)
|
||||
@ApiModelProperty(value = "掌握了所学课程的基础知识和基本理论,能用所学知识解决实际问题")
|
||||
private java.lang.String col9;
|
||||
/**体会到本门课程学习的乐趣和挑战,理解课程内容的意义与价值*/
|
||||
@Excel(name = "体会到本门课程学习的乐趣和挑战,理解课程内容的意义与价值", width = 15)
|
||||
@ApiModelProperty(value = "体会到本门课程学习的乐趣和挑战,理解课程内容的意义与价值")
|
||||
private java.lang.String col10;
|
||||
/**优点或建议*/
|
||||
@Excel(name = "优点或建议", width = 15)
|
||||
@ApiModelProperty(value = "优点或建议")
|
||||
private java.lang.String col11;
|
||||
/**学期学年*/
|
||||
@Excel(name = "学期学年", width = 15)
|
||||
@ApiModelProperty(value = "学期学年")
|
||||
private java.lang.String xqxn;
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
package org.jeecg.modules.kc.pjxxJszbpjf.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.jeecg.modules.kc.pjxxJszbpjf.entity.PjxxJszbpjf;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
|
||||
/**
|
||||
* @Description: pjxx_jszbpjf
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-01-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface PjxxJszbpjfMapper extends BaseMapper<PjxxJszbpjf> {
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.jeecg.modules.kc.pjxxJszbpjf.mapper.PjxxJszbpjfMapper">
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,14 @@
|
|||
package org.jeecg.modules.kc.pjxxJszbpjf.service;
|
||||
|
||||
import org.jeecg.modules.kc.pjxxJszbpjf.entity.PjxxJszbpjf;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
|
||||
/**
|
||||
* @Description: pjxx_jszbpjf
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-01-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
public interface IPjxxJszbpjfService extends IService<PjxxJszbpjf> {
|
||||
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
package org.jeecg.modules.kc.pjxxJszbpjf.service.impl;
|
||||
|
||||
import org.jeecg.modules.kc.pjxxJszbpjf.entity.PjxxJszbpjf;
|
||||
import org.jeecg.modules.kc.pjxxJszbpjf.mapper.PjxxJszbpjfMapper;
|
||||
import org.jeecg.modules.kc.pjxxJszbpjf.service.IPjxxJszbpjfService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
||||
/**
|
||||
* @Description: pjxx_jszbpjf
|
||||
* @Author: jeecg-boot
|
||||
* @Date: 2025-01-13
|
||||
* @Version: V1.0
|
||||
*/
|
||||
@Service
|
||||
public class PjxxJszbpjfServiceImpl extends ServiceImpl<PjxxJszbpjfMapper, PjxxJszbpjf> implements IPjxxJszbpjfService {
|
||||
|
||||
}
|
Loading…
Reference in New Issue