修改bug

This commit is contained in:
yangjun 2023-05-27 10:46:44 +08:00
parent eedcc7f793
commit bea55cb2ba
32 changed files with 1744 additions and 3 deletions

View File

@ -0,0 +1,204 @@
package org.jeecg.modules.kc.kcSzkc.controller;
import java.util.ArrayList;
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.kcSzkc.entity.KcSzkc;
import org.jeecg.modules.kc.kcSzkc.service.IKcSzkcService;
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.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
import org.jeecg.modules.kc.ktgl.entity.KcKetangbiao;
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService;
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: 思政课程
* @Author: jeecg-boot
* @Date: 2023-05-25
* @Version: V1.0
*/
@Api(tags="思政课程")
@RestController
@RequestMapping("/kcSzkc/kcSzkc")
@Slf4j
public class KcSzkcController extends JeecgController<KcSzkc, IKcSzkcService> {
@Autowired
private IKcSzkcService kcSzkcService;
@Autowired
private IKcKechengbiaoService kcKechengbiaoService;
/**
* 分页列表查询
*
* @param kcSzkc
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "思政课程-分页列表查询")
@ApiOperation(value="思政课程-分页列表查询", notes="思政课程-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<KcSzkc>> queryPageList(KcSzkc kcSzkc,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<KcSzkc> queryWrapper = QueryGenerator.initQueryWrapper(kcSzkc, req.getParameterMap());
Page<KcSzkc> page = new Page<KcSzkc>(pageNo, pageSize);
IPage<KcSzkc> pageList = kcSzkcService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param kcSzkc
* @return
*/
@AutoLog(value = "思政课程-添加")
@ApiOperation(value="思政课程-添加", notes="思政课程-添加")
@RequiresPermissions("kcSzkc:kc_szkc:add")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody KcSzkc kcSzkc) {
kcSzkcService.save(kcSzkc);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param kcSzkc
* @return
*/
@AutoLog(value = "思政课程-编辑")
@ApiOperation(value="思政课程-编辑", notes="思政课程-编辑")
@RequiresPermissions("kcSzkc:kc_szkc:edit")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody KcSzkc kcSzkc) {
kcSzkcService.updateById(kcSzkc);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "思政课程-通过id删除")
@ApiOperation(value="思政课程-通过id删除", notes="思政课程-通过id删除")
@RequiresPermissions("kcSzkc:kc_szkc:delete")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
kcSzkcService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "思政课程-批量删除")
@ApiOperation(value="思政课程-批量删除", notes="思政课程-批量删除")
@RequiresPermissions("kcSzkc:kc_szkc:deleteBatch")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.kcSzkcService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "思政课程-通过id查询")
@ApiOperation(value="思政课程-通过id查询", notes="思政课程-通过id查询")
@GetMapping(value = "/queryById")
public Result<KcSzkc> queryById(@RequestParam(name="id",required=true) String id) {
KcSzkc kcSzkc = kcSzkcService.getById(id);
if(kcSzkc==null) {
return Result.error("未找到对应数据");
}
return Result.OK(kcSzkc);
}
/**
* 导出excel
*
* @param request
* @param kcSzkc
*/
@RequiresPermissions("kcSzkc:kc_szkc:exportXls")
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, KcSzkc kcSzkc) {
return super.exportXls(request, kcSzkc, KcSzkc.class, "思政课程");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequiresPermissions("kcSzkc:kc_szkc:importExcel")
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
return super.importExcel(request, response, KcSzkc.class);
}
@AutoLog(value = "批量思政课程-添加")
@ApiOperation(value="批量思政课程-添加", notes="批量思政课程-添加")
@PostMapping(value = "/addBatch")
public Result<String> addBatch(@RequestBody KcSzkc kcSzkc) {
List<KcKechengbiao> list = kcKechengbiaoService.getSzkcList();
List<KcSzkc> arrayList = new ArrayList<>();
for(int i=0;i<list.size();i++){
KcSzkc kcSzkcPar = new KcSzkc();
KcKechengbiao kcKechengbiaopar = list.get(i);
kcSzkcPar.setId(null);
kcSzkcPar.setKcmc(kcKechengbiaopar.getKcmc());
kcSzkcPar.setKcbh(kcKechengbiaopar.getKcbh());
kcSzkcPar.setKkdw(kcKechengbiaopar.getKkdw());
arrayList.add(kcSzkcPar);
}
kcSzkcService.saveBatch(arrayList);
return Result.OK("添加成功!");
}
}

View File

@ -0,0 +1,70 @@
package org.jeecg.modules.kc.kcSzkc.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: 思政课程
* @Author: jeecg-boot
* @Date: 2023-05-25
* @Version: V1.0
*/
@Data
@TableName("kc_szkc")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="kc_szkc对象", description="思政课程")
public class KcSzkc implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**课程名称*/
@Excel(name = "课程名称", width = 15)
@ApiModelProperty(value = "课程名称")
private java.lang.String kcmc;
/**课程编号*/
@Excel(name = "课程编号", width = 15)
@ApiModelProperty(value = "课程编号")
private java.lang.String kcbh;
/**开课单位*/
@Excel(name = "开课单位", width = 15)
@ApiModelProperty(value = "开课单位")
private java.lang.String kkdw;
}

View File

@ -0,0 +1,18 @@
package org.jeecg.modules.kc.kcSzkc.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.kc.kcSzkc.entity.KcSzkc;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 思政课程
* @Author: jeecg-boot
* @Date: 2023-05-25
* @Version: V1.0
*/
public interface KcSzkcMapper extends BaseMapper<KcSzkc> {
void addBatch();
}

View File

@ -0,0 +1,8 @@
<?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.kcSzkc.mapper.KcSzkcMapper">
<insert id="addBatch">
insert into kc_szkc (id,create_time,kcmc,kcbh,kkdw)
</insert>
</mapper>

View File

@ -0,0 +1,15 @@
package org.jeecg.modules.kc.kcSzkc.service;
import org.jeecg.modules.kc.kcSzkc.entity.KcSzkc;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 思政课程
* @Author: jeecg-boot
* @Date: 2023-05-25
* @Version: V1.0
*/
public interface IKcSzkcService extends IService<KcSzkc> {
void addBatch(KcSzkc kcSzkc);
}

View File

@ -0,0 +1,30 @@
package org.jeecg.modules.kc.kcSzkc.service.impl;
import org.jeecg.modules.kc.kcSzkc.entity.KcSzkc;
import org.jeecg.modules.kc.kcSzkc.mapper.KcSzkcMapper;
import org.jeecg.modules.kc.kcSzkc.service.IKcSzkcService;
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import java.util.List;
/**
* @Description: 思政课程
* @Author: jeecg-boot
* @Date: 2023-05-25
* @Version: V1.0
*/
@Service
public class KcSzkcServiceImpl extends ServiceImpl<KcSzkcMapper, KcSzkc> implements IKcSzkcService {
@Autowired
private IKcKechengbiaoService kcKechengbiaoService;
@Override
public void addBatch(KcSzkc kcSzkc) {
List<KcKechengbiao> list = kcKechengbiaoService.getSzkcList();
}
}

View File

@ -0,0 +1,238 @@
package org.jeecg.modules.kc.kcZzThpjb.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.apache.commons.lang.StringUtils;
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.kcZzThpjb.entity.KcZzThpjb;
import org.jeecg.modules.kc.kcZzThpjb.service.IKcZzThpjbService;
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.jeecg.modules.kc.kcZzYbtkb.entity.KcZzYbtkb;
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: 纸质同行评价表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Api(tags="纸质同行评价表")
@RestController
@RequestMapping("/kcZzThpjb/kcZzThpjb")
@Slf4j
public class KcZzThpjbController extends JeecgController<KcZzThpjb, IKcZzThpjbService> {
@Autowired
private IKcZzThpjbService kcZzThpjbService;
/**
* 分页列表查询
*
* @param kcZzThpjb
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "纸质同行评价表-分页列表查询")
@ApiOperation(value="纸质同行评价表-分页列表查询", notes="纸质同行评价表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<KcZzThpjb>> queryPageList(KcZzThpjb kcZzThpjb,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<KcZzThpjb> queryWrapper = QueryGenerator.initQueryWrapper(kcZzThpjb, req.getParameterMap());
Page<KcZzThpjb> page = new Page<KcZzThpjb>(pageNo, pageSize);
IPage<KcZzThpjb> pageList = kcZzThpjbService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param kcZzThpjb
* @return
*/
@AutoLog(value = "纸质同行评价表-添加")
@ApiOperation(value="纸质同行评价表-添加", notes="纸质同行评价表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody KcZzThpjb kcZzThpjb) {
kcZzThpjbService.save(kcZzThpjb);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param kcZzThpjb
* @return
*/
@AutoLog(value = "纸质同行评价表-编辑")
@ApiOperation(value="纸质同行评价表-编辑", notes="纸质同行评价表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody KcZzThpjb kcZzThpjb) {
kcZzThpjbService.updateById(kcZzThpjb);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "纸质同行评价表-通过id删除")
@ApiOperation(value="纸质同行评价表-通过id删除", notes="纸质同行评价表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
kcZzThpjbService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "纸质同行评价表-批量删除")
@ApiOperation(value="纸质同行评价表-批量删除", notes="纸质同行评价表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.kcZzThpjbService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "纸质同行评价表-通过id查询")
@ApiOperation(value="纸质同行评价表-通过id查询", notes="纸质同行评价表-通过id查询")
@GetMapping(value = "/queryById")
public Result<KcZzThpjb> queryById(@RequestParam(name="id",required=true) String id) {
KcZzThpjb kcZzThpjb = kcZzThpjbService.getById(id);
if(kcZzThpjb==null) {
return Result.error("未找到对应数据");
}
return Result.OK(kcZzThpjb);
}
/**
* 导出excel
*
* @param request
* @param kcZzThpjb
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, KcZzThpjb kcZzThpjb) {
return super.exportXls(request, kcZzThpjb, KcZzThpjb.class, "纸质同行评价表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
// 获取上传文件对象
MultipartFile file = entity.getValue();
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<KcZzThpjb> list = ExcelImportUtil.importExcel(file.getInputStream(), KcZzThpjb.class, params);
String rest = "";
String errorRest = "";
List<KcZzThpjb> newList = list;
int errNum = 0;
for(int i=0;i<list.size();i++){
KcZzThpjb KcZzThpjbPar = list.get(i);
QueryWrapper<KcZzThpjb> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("kcbh",KcZzThpjbPar.getKcbh());
queryWrapper.eq("kcmc",KcZzThpjbPar.getKcmc());
queryWrapper.eq("skjs",KcZzThpjbPar.getSkjs());
queryWrapper.eq("skdd",KcZzThpjbPar.getSkdd());
queryWrapper.eq("sksj",KcZzThpjbPar.getSksj());
queryWrapper.eq("skdx",KcZzThpjbPar.getSkdx());
queryWrapper.eq("skjiaoshou",KcZzThpjbPar.getSkjiaoshou());
queryWrapper.eq("pjsj",KcZzThpjbPar.getPjsj());
List<KcZzThpjb> listPar = kcZzThpjbService.list(queryWrapper);
if(listPar!=null&&listPar.size()>0){
errNum++;
newList.remove(KcZzThpjbPar);
errorRest += KcZzThpjbPar.getKcbh()+"-"+KcZzThpjbPar.getKcmc()+"-"+KcZzThpjbPar.getSkjs()+"-"+KcZzThpjbPar.getSkdd()+"-"+KcZzThpjbPar.getSkdx()+"-"+KcZzThpjbPar.getSkjiaoshou()+"<br/>";
}
}
//update-begin-author:taoyan date:20190528 for:批量插入数据
long start = System.currentTimeMillis();
service.saveBatch(newList);
//400条 saveBatch消耗时间1592毫秒 循环插入消耗时间1947毫秒
//1200条 saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒
log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
//update-end-author:taoyan date:20190528 for:批量插入数据
rest = "文件导入成功!数据行数:" + newList.size();
if(StringUtils.isNotBlank(errorRest)){
errorRest = "<br/>共错误:"+errNum+"行;错误数据如下:<br/>"+errorRest;
}
return Result.ok(rest+errorRest);
} catch (Exception e) {
//update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示
String msg = e.getMessage();
log.error(msg, e);
if(msg!=null && msg.indexOf("Duplicate entry")>=0){
return Result.error("文件导入失败:有重复数据!");
}else{
return Result.error("文件导入失败:" + e.getMessage());
}
//update-end-author:taoyan date:20211124 for: 导入数据重复增加提示
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return Result.error("文件导入失败!");
}
}

View File

@ -0,0 +1,125 @@
package org.jeecg.modules.kc.kcZzThpjb.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: 纸质同行评价表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Data
@TableName("kc_zz_thpjb")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="kc_zz_thpjb对象", description="纸质同行评价表")
public class KcZzThpjb implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**课程编号*/
@Excel(name = "课程编号", width = 15)
@ApiModelProperty(value = "课程编号")
private java.lang.String kcbh;
/**课程名称*/
@Excel(name = "课程名称", width = 15)
@ApiModelProperty(value = "课程名称")
private java.lang.String kcmc;
/**授课教师*/
@Excel(name = "授课教师", width = 15)
@ApiModelProperty(value = "授课教师")
private java.lang.String skjs;
/**授课时间*/
@Excel(name = "授课时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "授课时间")
private java.util.Date sksj;
/**上课地点*/
@Excel(name = "上课地点", width = 15)
@ApiModelProperty(value = "上课地点")
private java.lang.String skdd;
/**使用教材*/
@Excel(name = "使用教材", width = 15)
@ApiModelProperty(value = "使用教材")
private java.lang.String syjc;
@Excel(name = "授课对象", width = 15)
@ApiModelProperty(value = "授课对象")
private java.lang.String skdx;
@Excel(name = "授课教授", width = 15)
@ApiModelProperty(value = "授课教授")
private java.lang.String skjiaoshou;
/**教学理解*/
@Excel(name = "教学理解", width = 15)
@ApiModelProperty(value = "教学理解")
private java.lang.String jxlj;
/**教学态度*/
@Excel(name = "教学态度", width = 15)
@ApiModelProperty(value = "教学态度")
private java.lang.String jxtd;
/**教学过程*/
@Excel(name = "教学过程", width = 15)
@ApiModelProperty(value = "教学过程")
private java.lang.String jxgc;
/**教学效果*/
@Excel(name = "教学效果", width = 15)
@ApiModelProperty(value = "教学效果")
private java.lang.String jxxg;
/**教学特殊*/
@Excel(name = "教学特殊", width = 15)
@ApiModelProperty(value = "教学特殊")
private java.lang.String jxts;
/**总分*/
@Excel(name = "总分", width = 15)
@ApiModelProperty(value = "总分")
private java.lang.String zf;
/**优点或建议*/
@Excel(name = "优点或建议", width = 15)
@ApiModelProperty(value = "优点或建议")
private java.lang.String ydhjy;
/**评价时间*/
@Excel(name = "评价时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "评价时间")
private java.util.Date pjsj;
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.kc.kcZzThpjb.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.kc.kcZzThpjb.entity.KcZzThpjb;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 纸质同行评价表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
public interface KcZzThpjbMapper extends BaseMapper<KcZzThpjb> {
}

View File

@ -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.kcZzThpjb.mapper.KcZzThpjbMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.kc.kcZzThpjb.service;
import org.jeecg.modules.kc.kcZzThpjb.entity.KcZzThpjb;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 纸质同行评价表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
public interface IKcZzThpjbService extends IService<KcZzThpjb> {
}

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.kc.kcZzThpjb.service.impl;
import org.jeecg.modules.kc.kcZzThpjb.entity.KcZzThpjb;
import org.jeecg.modules.kc.kcZzThpjb.mapper.KcZzThpjbMapper;
import org.jeecg.modules.kc.kcZzThpjb.service.IKcZzThpjbService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 纸质同行评价表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Service
public class KcZzThpjbServiceImpl extends ServiceImpl<KcZzThpjbMapper, KcZzThpjb> implements IKcZzThpjbService {
}

View File

@ -0,0 +1,238 @@
package org.jeecg.modules.kc.kcZzXstkb.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.apache.commons.lang.StringUtils;
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.kcZzXstkb.entity.KcZzXstkb;
import org.jeecg.modules.kc.kcZzXstkb.service.IKcZzXstkbService;
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.jeecg.modules.kc.kcZzYbtkb.entity.KcZzYbtkb;
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: 纸质线上听课表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Api(tags="纸质线上听课表")
@RestController
@RequestMapping("/kcZzXstkb/kcZzXstkb")
@Slf4j
public class KcZzXstkbController extends JeecgController<KcZzXstkb, IKcZzXstkbService> {
@Autowired
private IKcZzXstkbService kcZzXstkbService;
/**
* 分页列表查询
*
* @param kcZzXstkb
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "纸质线上听课表-分页列表查询")
@ApiOperation(value="纸质线上听课表-分页列表查询", notes="纸质线上听课表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<KcZzXstkb>> queryPageList(KcZzXstkb kcZzXstkb,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<KcZzXstkb> queryWrapper = QueryGenerator.initQueryWrapper(kcZzXstkb, req.getParameterMap());
Page<KcZzXstkb> page = new Page<KcZzXstkb>(pageNo, pageSize);
IPage<KcZzXstkb> pageList = kcZzXstkbService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param kcZzXstkb
* @return
*/
@AutoLog(value = "纸质线上听课表-添加")
@ApiOperation(value="纸质线上听课表-添加", notes="纸质线上听课表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody KcZzXstkb kcZzXstkb) {
kcZzXstkbService.save(kcZzXstkb);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param kcZzXstkb
* @return
*/
@AutoLog(value = "纸质线上听课表-编辑")
@ApiOperation(value="纸质线上听课表-编辑", notes="纸质线上听课表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody KcZzXstkb kcZzXstkb) {
kcZzXstkbService.updateById(kcZzXstkb);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "纸质线上听课表-通过id删除")
@ApiOperation(value="纸质线上听课表-通过id删除", notes="纸质线上听课表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
kcZzXstkbService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "纸质线上听课表-批量删除")
@ApiOperation(value="纸质线上听课表-批量删除", notes="纸质线上听课表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.kcZzXstkbService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "纸质线上听课表-通过id查询")
@ApiOperation(value="纸质线上听课表-通过id查询", notes="纸质线上听课表-通过id查询")
@GetMapping(value = "/queryById")
public Result<KcZzXstkb> queryById(@RequestParam(name="id",required=true) String id) {
KcZzXstkb kcZzXstkb = kcZzXstkbService.getById(id);
if(kcZzXstkb==null) {
return Result.error("未找到对应数据");
}
return Result.OK(kcZzXstkb);
}
/**
* 导出excel
*
* @param request
* @param kcZzXstkb
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, KcZzXstkb kcZzXstkb) {
return super.exportXls(request, kcZzXstkb, KcZzXstkb.class, "纸质线上听课表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
// 获取上传文件对象
MultipartFile file = entity.getValue();
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<KcZzXstkb> list = ExcelImportUtil.importExcel(file.getInputStream(), KcZzXstkb.class, params);
String rest = "";
String errorRest = "";
List<KcZzXstkb> newList = list;
int errNum = 0;
for(int i=0;i<list.size();i++){
KcZzXstkb KcZzXstkbPar = list.get(i);
QueryWrapper<KcZzXstkb> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("kcbh",KcZzXstkbPar.getKcbh());
queryWrapper.eq("kcmc",KcZzXstkbPar.getKcmc());
queryWrapper.eq("skjs",KcZzXstkbPar.getSkjs());
queryWrapper.eq("skdd",KcZzXstkbPar.getSkdd());
queryWrapper.eq("sksj",KcZzXstkbPar.getSksj());
queryWrapper.eq("tkjsgh",KcZzXstkbPar.getTkjsgh());
queryWrapper.eq("tkjsxm",KcZzXstkbPar.getTkjsxm());
queryWrapper.eq("tksj",KcZzXstkbPar.getTksj());
List<KcZzXstkb> listPar = kcZzXstkbService.list(queryWrapper);
if(listPar!=null&&listPar.size()>0){
errNum++;
newList.remove(KcZzXstkbPar);
errorRest += KcZzXstkbPar.getKcbh()+"-"+KcZzXstkbPar.getKcmc()+"-"+KcZzXstkbPar.getSkjs()+"-"+KcZzXstkbPar.getSkdd()+"-"+KcZzXstkbPar.getTkjsgh()+"-"+KcZzXstkbPar.getTkjsxm()+"<br/>";
}
}
//update-begin-author:taoyan date:20190528 for:批量插入数据
long start = System.currentTimeMillis();
service.saveBatch(newList);
//400条 saveBatch消耗时间1592毫秒 循环插入消耗时间1947毫秒
//1200条 saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒
log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
//update-end-author:taoyan date:20190528 for:批量插入数据
rest = "文件导入成功!数据行数:" + newList.size();
if(StringUtils.isNotBlank(errorRest)){
errorRest = "<br/>共错误:"+errNum+"行;错误数据如下:<br/>"+errorRest;
}
return Result.ok(rest+errorRest);
} catch (Exception e) {
//update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示
String msg = e.getMessage();
log.error(msg, e);
if(msg!=null && msg.indexOf("Duplicate entry")>=0){
return Result.error("文件导入失败:有重复数据!");
}else{
return Result.error("文件导入失败:" + e.getMessage());
}
//update-end-author:taoyan date:20211124 for: 导入数据重复增加提示
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return Result.error("文件导入失败!");
}
}

View File

@ -0,0 +1,148 @@
package org.jeecg.modules.kc.kcZzXstkb.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: 纸质线上听课表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Data
@TableName("kc_zz_xstkb")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="kc_zz_xstkb对象", description="纸质线上听课表")
public class KcZzXstkb implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**课程编号*/
@Excel(name = "课程编号", width = 15)
@ApiModelProperty(value = "课程编号")
private java.lang.String kcbh;
/**课程名称*/
@Excel(name = "课程名称", width = 15)
@ApiModelProperty(value = "课程名称")
private java.lang.String kcmc;
/**授课教师*/
@Excel(name = "授课教师", width = 15)
@ApiModelProperty(value = "授课教师")
private java.lang.String skjs;
/**授课时间*/
@Excel(name = "授课时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "授课时间")
private java.util.Date sksj;
/**上课地点*/
@Excel(name = "上课地点", width = 15)
@ApiModelProperty(value = "上课地点")
private java.lang.String skdd;
/**听课教师姓名*/
@Excel(name = "听课教师姓名", width = 15)
@ApiModelProperty(value = "听课教师姓名")
private java.lang.String tkjsxm;
/**听课教师工号*/
@Excel(name = "听课教师工号", width = 15)
@ApiModelProperty(value = "听课教师工号")
private java.lang.String tkjsgh;
/**听课时间*/
@Excel(name = "听课时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "听课时间")
private java.util.Date tksj;
/**1.声音和画面情况*/
@Excel(name = "1.声音和画面情况", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "1.声音和画面情况")
private java.lang.String ans1;
/**2.ppt等课件情况*/
@Excel(name = "2.ppt等课件情况", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "2.ppt等课件情况")
private java.lang.String ans2;
/**3.教师出镜情况*/
@Excel(name = "3.教师出镜情况", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "3.教师出镜情况")
private java.lang.String ans3;
/**4.教师仪态仪表方面*/
@Excel(name = "4.教师仪态仪表方面", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "4.教师仪态仪表方面")
private java.lang.String ans4;
/**5.教师所在环境情况*/
@Excel(name = "5.教师所在环境情况", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "5.教师所在环境情况")
private java.lang.String ans5;
/**6.学生出席情况*/
@Excel(name = "6.学生出席情况", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "6.学生出席情况")
private java.lang.String ans6;
/**7.课堂秩序情况*/
@Excel(name = "7.课堂秩序情况", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "7.课堂秩序情况")
private java.lang.String ans7;
/**8.课堂教学互动情况*/
@Excel(name = "8.课堂教学互动情况", width = 15, dicCode = "fix_dict")
@Dict(dicCode = "fix_dict")
@ApiModelProperty(value = "8.课堂教学互动情况")
private java.lang.String ans8;
/**9.过程性评价情况*/
@Excel(name = "9.过程性评价情况", width = 15, dicCode = "fix_dict")
@Dict(dicCode = "fix_dict")
@ApiModelProperty(value = "9.过程性评价情况")
private java.lang.String ans9;
/**总体评价*/
@Excel(name = "总体评价", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "总体评价")
private java.lang.String ztpj;
/**您认为课堂值得肯定的方面或者需要改进的方面*/
@Excel(name = "您认为课堂值得肯定的方面或者需要改进的方面", width = 15)
@ApiModelProperty(value = "您认为课堂值得肯定的方面或者需要改进的方面")
private java.lang.String pjnr;
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.kc.kcZzXstkb.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.kc.kcZzXstkb.entity.KcZzXstkb;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 纸质线上听课表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
public interface KcZzXstkbMapper extends BaseMapper<KcZzXstkb> {
}

View File

@ -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.kcZzXstkb.mapper.KcZzXstkbMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.kc.kcZzXstkb.service;
import org.jeecg.modules.kc.kcZzXstkb.entity.KcZzXstkb;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 纸质线上听课表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
public interface IKcZzXstkbService extends IService<KcZzXstkb> {
}

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.kc.kcZzXstkb.service.impl;
import org.jeecg.modules.kc.kcZzXstkb.entity.KcZzXstkb;
import org.jeecg.modules.kc.kcZzXstkb.mapper.KcZzXstkbMapper;
import org.jeecg.modules.kc.kcZzXstkb.service.IKcZzXstkbService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 纸质线上听课表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Service
public class KcZzXstkbServiceImpl extends ServiceImpl<KcZzXstkbMapper, KcZzXstkb> implements IKcZzXstkbService {
}

View File

@ -0,0 +1,237 @@
package org.jeecg.modules.kc.kcZzYbtkb.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.apache.commons.lang.StringUtils;
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.kcZzYbtkb.entity.KcZzYbtkb;
import org.jeecg.modules.kc.kcZzYbtkb.service.IKcZzYbtkbService;
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: 纸质一般听课表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Api(tags="纸质一般听课表")
@RestController
@RequestMapping("/kcZzYbtkb/kcZzYbtkb")
@Slf4j
public class KcZzYbtkbController extends JeecgController<KcZzYbtkb, IKcZzYbtkbService> {
@Autowired
private IKcZzYbtkbService kcZzYbtkbService;
/**
* 分页列表查询
*
* @param kcZzYbtkb
* @param pageNo
* @param pageSize
* @param req
* @return
*/
//@AutoLog(value = "纸质一般听课表-分页列表查询")
@ApiOperation(value="纸质一般听课表-分页列表查询", notes="纸质一般听课表-分页列表查询")
@GetMapping(value = "/list")
public Result<IPage<KcZzYbtkb>> queryPageList(KcZzYbtkb kcZzYbtkb,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<KcZzYbtkb> queryWrapper = QueryGenerator.initQueryWrapper(kcZzYbtkb, req.getParameterMap());
Page<KcZzYbtkb> page = new Page<KcZzYbtkb>(pageNo, pageSize);
IPage<KcZzYbtkb> pageList = kcZzYbtkbService.page(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
*
* @param kcZzYbtkb
* @return
*/
@AutoLog(value = "纸质一般听课表-添加")
@ApiOperation(value="纸质一般听课表-添加", notes="纸质一般听课表-添加")
@PostMapping(value = "/add")
public Result<String> add(@RequestBody KcZzYbtkb kcZzYbtkb) {
kcZzYbtkbService.save(kcZzYbtkb);
return Result.OK("添加成功!");
}
/**
* 编辑
*
* @param kcZzYbtkb
* @return
*/
@AutoLog(value = "纸质一般听课表-编辑")
@ApiOperation(value="纸质一般听课表-编辑", notes="纸质一般听课表-编辑")
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> edit(@RequestBody KcZzYbtkb kcZzYbtkb) {
kcZzYbtkbService.updateById(kcZzYbtkb);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*
* @param id
* @return
*/
@AutoLog(value = "纸质一般听课表-通过id删除")
@ApiOperation(value="纸质一般听课表-通过id删除", notes="纸质一般听课表-通过id删除")
@DeleteMapping(value = "/delete")
public Result<String> delete(@RequestParam(name="id",required=true) String id) {
kcZzYbtkbService.removeById(id);
return Result.OK("删除成功!");
}
/**
* 批量删除
*
* @param ids
* @return
*/
@AutoLog(value = "纸质一般听课表-批量删除")
@ApiOperation(value="纸质一般听课表-批量删除", notes="纸质一般听课表-批量删除")
@DeleteMapping(value = "/deleteBatch")
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) {
this.kcZzYbtkbService.removeByIds(Arrays.asList(ids.split(",")));
return Result.OK("批量删除成功!");
}
/**
* 通过id查询
*
* @param id
* @return
*/
//@AutoLog(value = "纸质一般听课表-通过id查询")
@ApiOperation(value="纸质一般听课表-通过id查询", notes="纸质一般听课表-通过id查询")
@GetMapping(value = "/queryById")
public Result<KcZzYbtkb> queryById(@RequestParam(name="id",required=true) String id) {
KcZzYbtkb kcZzYbtkb = kcZzYbtkbService.getById(id);
if(kcZzYbtkb==null) {
return Result.error("未找到对应数据");
}
return Result.OK(kcZzYbtkb);
}
/**
* 导出excel
*
* @param request
* @param kcZzYbtkb
*/
@RequestMapping(value = "/exportXls")
public ModelAndView exportXls(HttpServletRequest request, KcZzYbtkb kcZzYbtkb) {
return super.exportXls(request, kcZzYbtkb, KcZzYbtkb.class, "纸质一般听课表");
}
/**
* 通过excel导入数据
*
* @param request
* @param response
* @return
*/
@RequestMapping(value = "/importExcel", method = RequestMethod.POST)
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) {
MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request;
Map<String, MultipartFile> fileMap = multipartRequest.getFileMap();
for (Map.Entry<String, MultipartFile> entity : fileMap.entrySet()) {
// 获取上传文件对象
MultipartFile file = entity.getValue();
ImportParams params = new ImportParams();
params.setTitleRows(2);
params.setHeadRows(1);
params.setNeedSave(true);
try {
List<KcZzYbtkb> list = ExcelImportUtil.importExcel(file.getInputStream(), KcZzYbtkb.class, params);
String rest = "";
String errorRest = "";
List<KcZzYbtkb> newList = list;
int errNum = 0;
for(int i=0;i<list.size();i++){
KcZzYbtkb KcZzYbtkbPar = list.get(i);
QueryWrapper<KcZzYbtkb> queryWrapper = new QueryWrapper<>();
queryWrapper.eq("kcbh",KcZzYbtkbPar.getKcbh());
queryWrapper.eq("kcmc",KcZzYbtkbPar.getKcmc());
queryWrapper.eq("skjs",KcZzYbtkbPar.getSkjs());
queryWrapper.eq("skdd",KcZzYbtkbPar.getSkdd());
queryWrapper.eq("skrq",KcZzYbtkbPar.getSkrq());
queryWrapper.eq("tkjsbh",KcZzYbtkbPar.getTkjsbh());
queryWrapper.eq("tkjsxm",KcZzYbtkbPar.getTkjsxm());
queryWrapper.eq("pksj",KcZzYbtkbPar.getPksj());
List<KcZzYbtkb> listPar = kcZzYbtkbService.list(queryWrapper);
if(listPar!=null&&listPar.size()>0){
errNum++;
newList.remove(KcZzYbtkbPar);
errorRest += KcZzYbtkbPar.getKcbh()+"-"+KcZzYbtkbPar.getKcmc()+"-"+KcZzYbtkbPar.getSkjs()+"-"+KcZzYbtkbPar.getSkdd()+"-"+KcZzYbtkbPar.getTkjsbh()+"-"+KcZzYbtkbPar.getTkjsxm()+"<br/>";
}
}
//update-begin-author:taoyan date:20190528 for:批量插入数据
long start = System.currentTimeMillis();
service.saveBatch(newList);
//400条 saveBatch消耗时间1592毫秒 循环插入消耗时间1947毫秒
//1200条 saveBatch消耗时间3687毫秒 循环插入消耗时间5212毫秒
log.info("消耗时间" + (System.currentTimeMillis() - start) + "毫秒");
//update-end-author:taoyan date:20190528 for:批量插入数据
rest = "文件导入成功!数据行数:" + newList.size();
if(StringUtils.isNotBlank(errorRest)){
errorRest = "<br/>共错误:"+errNum+"行;错误数据如下:<br/>"+errorRest;
}
return Result.ok(rest+errorRest);
} catch (Exception e) {
//update-begin-author:taoyan date:20211124 for: 导入数据重复增加提示
String msg = e.getMessage();
log.error(msg, e);
if(msg!=null && msg.indexOf("Duplicate entry")>=0){
return Result.error("文件导入失败:有重复数据!");
}else{
return Result.error("文件导入失败:" + e.getMessage());
}
//update-end-author:taoyan date:20211124 for: 导入数据重复增加提示
} finally {
try {
file.getInputStream().close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
return Result.error("文件导入失败!");
}
}

View File

@ -0,0 +1,143 @@
package org.jeecg.modules.kc.kcZzYbtkb.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: 纸质一般听课表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Data
@TableName("kc_zz_ybtkb")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="kc_zz_ybtkb对象", description="纸质一般听课表")
public class KcZzYbtkb implements Serializable {
private static final long serialVersionUID = 1L;
/**主键*/
@TableId(type = IdType.ASSIGN_ID)
@ApiModelProperty(value = "主键")
private java.lang.String id;
/**创建人*/
@ApiModelProperty(value = "创建人")
private java.lang.String createBy;
/**创建日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "创建日期")
private java.util.Date createTime;
/**更新人*/
@ApiModelProperty(value = "更新人")
private java.lang.String updateBy;
/**更新日期*/
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "更新日期")
private java.util.Date updateTime;
/**所属部门*/
@ApiModelProperty(value = "所属部门")
private java.lang.String sysOrgCode;
/**课程编号*/
@Excel(name = "课程编号", width = 15)
@ApiModelProperty(value = "课程编号")
private java.lang.String kcbh;
/**课程名称*/
@Excel(name = "课程名称", width = 15)
@ApiModelProperty(value = "课程名称")
private java.lang.String kcmc;
/**授课教师*/
@Excel(name = "授课教师", width = 15)
@ApiModelProperty(value = "授课教师")
private java.lang.String skjs;
/**授课时间*/
@Excel(name = "授课时间", width = 15, format = "yyyy-MM-dd")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
@DateTimeFormat(pattern="yyyy-MM-dd")
@ApiModelProperty(value = "授课时间")
private java.util.Date skrq;
/**上课地点*/
@Excel(name = "上课地点", width = 15)
@ApiModelProperty(value = "上课地点")
private java.lang.String skdd;
/**听课教师编号*/
@Excel(name = "听课教师编号", width = 15)
@ApiModelProperty(value = "听课教师编号")
private java.lang.String tkjsbh;
/**听课教师姓名*/
@Excel(name = "听课教师姓名", width = 15)
@ApiModelProperty(value = "听课教师姓名")
private java.lang.String tkjsxm;
/**评课时间*/
@Excel(name = "评课时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
@ApiModelProperty(value = "评课时间")
private java.util.Date pksj;
/**授课有启发性,能给予学生思考、联想、创造的启迪*/
@Excel(name = "授课有启发性,能给予学生思考、联想、创造的启迪", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "授课有启发性,能给予学生思考、联想、创造的启迪")
private java.lang.String ans1;
/**能有效利用各种教学媒体,课件或板书使用效果好*/
@Excel(name = "能有效利用各种教学媒体,课件或板书使用效果好", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "能有效利用各种教学媒体,课件或板书使用效果好")
private java.lang.String ans2;
/**仪表得体,按时上下课,严格要求学生*/
@Excel(name = "仪表得体,按时上下课,严格要求学生", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "仪表得体,按时上下课,严格要求学生")
private java.lang.String ans3;
/**讲课有热情,精神饱满,能调动学生情绪,课堂气氛活跃*/
@Excel(name = "讲课有热情,精神饱满,能调动学生情绪,课堂气氛活跃", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "讲课有热情,精神饱满,能调动学生情绪,课堂气氛活跃")
private java.lang.String ans4;
/**教学目标明确,内容丰富,重点突出,言语表达清楚。*/
@Excel(name = "教学目标明确,内容丰富,重点突出,言语表达清楚。", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "教学目标明确,内容丰富,重点突出,言语表达清楚。")
private java.lang.String ans5;
/**无迟到、早退、旷课现象*/
@Excel(name = "无迟到、早退、旷课现象", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "无迟到、早退、旷课现象")
private java.lang.String ans6;
/**课堂教学秩序好,无喧闹、打瞌睡、发短信、玩手机等现象*/
@Excel(name = "课堂教学秩序好,无喧闹、打瞌睡、发短信、玩手机等现象", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "课堂教学秩序好,无喧闹、打瞌睡、发短信、玩手机等现象")
private java.lang.String ans7;
/**上课认真听讲、积极思考、主动与老师交流互动*/
@Excel(name = "上课认真听讲、积极思考、主动与老师交流互动", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "上课认真听讲、积极思考、主动与老师交流互动")
private java.lang.String ans8;
/**课堂教学总体印象评价*/
@Excel(name = "课堂教学总体印象评价", width = 15, dicCode = "five_dict")
@Dict(dicCode = "five_dict")
@ApiModelProperty(value = "课堂教学总体印象评价")
private java.lang.String ans9;
/**请填写对课堂内容以及其他方面的具体意见或建议*/
@Excel(name = "请填写对课堂内容以及其他方面的具体意见或建议", width = 15)
@ApiModelProperty(value = "请填写对课堂内容以及其他方面的具体意见或建议")
private java.lang.String ans10;
}

View File

@ -0,0 +1,17 @@
package org.jeecg.modules.kc.kcZzYbtkb.mapper;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.kc.kcZzYbtkb.entity.KcZzYbtkb;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @Description: 纸质一般听课表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
public interface KcZzYbtkbMapper extends BaseMapper<KcZzYbtkb> {
}

View File

@ -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.kcZzYbtkb.mapper.KcZzYbtkbMapper">
</mapper>

View File

@ -0,0 +1,14 @@
package org.jeecg.modules.kc.kcZzYbtkb.service;
import org.jeecg.modules.kc.kcZzYbtkb.entity.KcZzYbtkb;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @Description: 纸质一般听课表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
public interface IKcZzYbtkbService extends IService<KcZzYbtkb> {
}

View File

@ -0,0 +1,19 @@
package org.jeecg.modules.kc.kcZzYbtkb.service.impl;
import org.jeecg.modules.kc.kcZzYbtkb.entity.KcZzYbtkb;
import org.jeecg.modules.kc.kcZzYbtkb.mapper.KcZzYbtkbMapper;
import org.jeecg.modules.kc.kcZzYbtkb.service.IKcZzYbtkbService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
/**
* @Description: 纸质一般听课表
* @Author: jeecg-boot
* @Date: 2023-05-24
* @Version: V1.0
*/
@Service
public class KcZzYbtkbServiceImpl extends ServiceImpl<KcZzYbtkbMapper, KcZzYbtkb> implements IKcZzYbtkbService {
}

View File

@ -10,10 +10,13 @@ import java.net.URLDecoder;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import org.apache.commons.lang.StringUtils;
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.kcSzkc.entity.KcSzkc;
import org.jeecg.modules.kc.kcSzkc.service.IKcSzkcService;
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService;
@ -52,7 +55,8 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcKechengbiaoService> {
@Autowired
private IKcKechengbiaoService kcKechengbiaoService;
@Autowired
private IKcSzkcService kcSzkcService;
/**
* 分页列表查询
*
@ -73,10 +77,28 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
if(StringUtils.isNotBlank(kcKechengbiao.getSearchInput())){
queryWrapper.apply(String.format("(kcmc like CONCAT('%',%s,'%') or skjs like CONCAT('%',%s,'%'))",kcKechengbiao.getSearchInput()));
}
queryWrapper.apply(StringUtils.isNotBlank(kcKechengbiao.getYwcol())," length(kcbh)<25");
Page<KcKechengbiao> page = new Page<KcKechengbiao>(pageNo, pageSize);
IPage<KcKechengbiao> pageList = kcKechengbiaoService.page(page, queryWrapper);
return Result.OK(pageList);
}
@ApiOperation(value="课程管理-主表-分页列表查询", notes="课程管理-主表-分页列表查询")
@GetMapping(value = "/listGroupBy")
public Result<IPage<KcKechengbiao>> listGroupBy(KcKechengbiao kcKechengbiao,
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
HttpServletRequest req) {
QueryWrapper<KcKechengbiao> queryWrapper = QueryGenerator.initQueryWrapper("a",kcKechengbiao, req.getParameterMap());
if(StringUtils.isNotBlank(kcKechengbiao.getSearchInput())){
queryWrapper.apply(String.format("(kcmc like CONCAT('%',%s,'%') or skjs like CONCAT('%',%s,'%'))",kcKechengbiao.getSearchInput()));
}
queryWrapper.apply(StringUtils.isNotBlank(kcKechengbiao.getYwcol())," length(kcbh)<25");
Page<KcKechengbiao> page = new Page<KcKechengbiao>(pageNo, pageSize);
IPage<KcKechengbiao> pageList = kcKechengbiaoService.listGroupBy(page, queryWrapper);
return Result.OK(pageList);
}
/**
* 添加
@ -107,7 +129,37 @@ public class KcKechengbiaoController extends JeecgController<KcKechengbiao, IKcK
kcKechengbiaoService.updateById(kcKechengbiao);
return Result.OK("编辑成功!");
}
@AutoLog(value = "修改课程思政课程")
@ApiOperation(value="修改课程思政课程", notes="修改课程思政课程")
@RequestMapping(value = "/editSzkc", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> editSzkc(@RequestBody KcKechengbiao kcKechengbiao) {
UpdateWrapper<KcKechengbiao> updateWrapper = new UpdateWrapper<>();
updateWrapper.setSql("szkc = '1' where kcbh = '"+kcKechengbiao.getKcbh()+"' and kcmc = '"+kcKechengbiao.getKcmc()+"' and kkdw = '"+kcKechengbiao.getKkdw()+"' and kcxz = '"+kcKechengbiao.getKcxz()+"' ");
kcKechengbiaoService.update(updateWrapper);
KcSzkc kcSzkc = new KcSzkc();
kcSzkc.setKcbh(kcKechengbiao.getKcbh());
kcSzkc.setKcmc(kcKechengbiao.getKcmc());
kcSzkc.setKkdw(kcKechengbiao.getKkdw());
kcSzkcService.save(kcSzkc);
return Result.OK("编辑成功!");
}
@AutoLog(value = "移除课程思政课程")
@ApiOperation(value="移除课程思政课程", notes="移除课程思政课程")
@RequestMapping(value = "/editYichu", method = {RequestMethod.PUT,RequestMethod.POST})
public Result<String> editYichu(@RequestBody KcKechengbiao kcKechengbiao) {
UpdateWrapper<KcKechengbiao> updateWrapper = new UpdateWrapper<>();
updateWrapper.setSql("szkc = '0' where kcbh = '"+kcKechengbiao.getKcbh()+"' and kcmc = '"+kcKechengbiao.getKcmc()+"' and kkdw = '"+kcKechengbiao.getKkdw()+"' and kcxz = '"+kcKechengbiao.getKcxz()+"' ");
kcKechengbiaoService.update(updateWrapper);
QueryWrapper<KcSzkc> queryWrapper = new QueryWrapper<>();
queryWrapper.apply("kcbh = '"+kcKechengbiao.getKcbh()+"' and kcmc = '"+kcKechengbiao.getKcmc()+"' and kkdw = '"+kcKechengbiao.getKkdw()+"' ");
kcSzkcService.remove(queryWrapper);
return Result.OK("编辑成功!");
}
/**
* 通过id删除
*

View File

@ -236,6 +236,7 @@ public class KcKechengbiao implements Serializable {
private java.lang.String zt;
private java.lang.String kcdl;
private java.lang.String szkc;//思政课程
/**课程名称或教师名*/
@TableField(exist = false)
@ -247,5 +248,7 @@ public class KcKechengbiao implements Serializable {
private java.lang.String endTime;
@TableField(exist = false)
private java.lang.String ts;
@TableField(exist = false)
private java.lang.String ywcol;
}

View File

@ -243,6 +243,9 @@ public class KcKetangbiao implements Serializable {
@ApiModelProperty(value = "状态")
private java.lang.String zt;
@TableField(exist = false)
private String jssj;
@TableField(exist = false)
private java.lang.String ywmc;

View File

@ -2,6 +2,10 @@ package org.jeecg.modules.kc.ktgl.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@ -19,4 +23,8 @@ public interface KcKechengbiaoMapper extends BaseMapper<KcKechengbiao> {
List<KcKechengbiao> selectSyncList(KcKechengbiao kcKechengbiao);
void saveHis(KcKechengbiao kcKechengbiaohis);
List<KcKechengbiao> getSzkcList();
IPage<KcKechengbiao> listGroupBy(Page<KcKechengbiao> page,@Param(Constants.WRAPPER) QueryWrapper<KcKechengbiao> queryWrapper);
}

View File

@ -45,4 +45,17 @@
insert into kc_kechengbiao_his select * ,#{ts} from kc_kechengbiao
</insert>
<select id="getSzkcList" resultType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao">
select kcbh,kcmc,kkdw from kc_kechengbiao where szkc = '1' group by kcbh,kcmc,kkdw
</select>
<select id="listGroupBy" resultType="org.jeecg.modules.kc.ktgl.entity.KcKechengbiao">
select * from (
select kcbh,kcmc,kkdw,kcxz,szkc from kc_kechengbiao GROUP BY kcbh,kcmc,kkdw,kcxz,szkc
) a
${ew.customSqlSegment}
</select>
</mapper>

View File

@ -34,12 +34,14 @@
<select id="getKclblist" parameterType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao" resultType="org.jeecg.modules.kc.ktgl.entity.KcKetangbiao">
select ktb.*,if(yy.id is null,0,1) as sfyy,yy.isdeleted, case when js.jsbh is NULL then 0 else 1 end sfyzhjs
select ktb.*,if(yy.id is null,0,1) as sfyy,yy.isdeleted, case when js.jsbh is NULL then 0 else 1 end sfyzhjs,
if(jc.hhjs is null,'00:00:00',concat(substr(jc.hhjs,1,2),':',substr(jc.hhjs,3,4),':00')) as jssj
from kc_ketangbiao ktb
left join (select * from kc_yuyue where userid = #{kcKetangbiao.userid}) yy on ktb.id = yy.ketangbiaoid
LEFT JOIN (SELECT DISTINCT jsbh, jsmc from kc_zhihuijiaoshi where sfyx=0) js on ktb.jsbh = js.jsbh
left join xxhbjsjbxx jsjbxx on jsjbxx.jsh = js.jsbh
left join xxhbjxljbxx jxljbxx on jsjbxx.jxlh = jxljbxx.jzwh
left join kc_jieci jc on ktb.hh = jc.jieci
<where>
<if test="kcKetangbiao.ywmc!=null and kcKetangbiao.ywmc!=''">
and (ktb.skjs like concat('%',#{kcKetangbiao.ywmc},'%') or ktb.kcmc like concat('%',#{kcKetangbiao.ywmc},'%') )

View File

@ -1,5 +1,8 @@
package org.jeecg.modules.kc.ktgl.service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
import com.baomidou.mybatisplus.extension.service.IService;
@ -18,4 +21,8 @@ public interface IKcKechengbiaoService extends IService<KcKechengbiao> {
List<KcKechengbiao> selectSyncList(KcKechengbiao kcKechengbiao);
void saveHis(KcKechengbiao kcKechengbiaohis);
List<KcKechengbiao> getSzkcList();
IPage<KcKechengbiao> listGroupBy(Page<KcKechengbiao> page, QueryWrapper<KcKechengbiao> queryWrapper);
}

View File

@ -1,5 +1,8 @@
package org.jeecg.modules.kc.ktgl.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.kc.ktgl.entity.KcKechengbiao;
import org.jeecg.modules.kc.ktgl.mapper.KcKechengbiaoMapper;
import org.jeecg.modules.kc.ktgl.service.IKcKechengbiaoService;
@ -32,4 +35,15 @@ public class KcKechengbiaoServiceImpl extends ServiceImpl<KcKechengbiaoMapper, K
public void saveHis(KcKechengbiao kcKechengbiaohis) {
baseMapper.saveHis(kcKechengbiaohis);
}
@Override
public List<KcKechengbiao> getSzkcList() {
return baseMapper.getSzkcList();
}
@Override
public IPage<KcKechengbiao> listGroupBy(Page<KcKechengbiao> page, QueryWrapper<KcKechengbiao> queryWrapper) {
return baseMapper.listGroupBy(page,queryWrapper);
}
}