diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/detection/controller/KcDetectionMainController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/detection/controller/KcDetectionMainController.java index 94945fd0..3985375a 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/detection/controller/KcDetectionMainController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/detection/controller/KcDetectionMainController.java @@ -14,6 +14,7 @@ import javax.servlet.http.HttpServletResponse; import com.beust.jcommander.internal.Sets; import com.google.common.collect.Maps; import org.apache.commons.compress.utils.Lists; +import org.apache.commons.lang3.StringUtils; import org.jeecg.common.api.vo.Result; import org.jeecg.common.system.query.QueryGenerator; import org.jeecg.common.util.oConvertUtils; @@ -27,6 +28,7 @@ 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.KcKetangbiao; import org.jeecgframework.poi.excel.ExcelImportUtil; import org.jeecgframework.poi.excel.def.NormalExcelConstants; import org.jeecgframework.poi.excel.entity.ExportParams; @@ -78,6 +80,14 @@ public class KcDetectionMainController extends JeecgController queryWrapper = QueryGenerator.initQueryWrapper(kcDetectionMain, req.getParameterMap()); + //补充搜索 + if(StringUtils.isNotBlank(kcDetectionMain.getSearchSkrq())){ + queryWrapper.eq("JSON_VALUE(ketangbiao_info,'$.skrq')", kcDetectionMain.getSearchSkrq()); + } + if(StringUtils.isNotBlank(kcDetectionMain.getSearchHh())){ + queryWrapper.eq("ketangbiao_info -> '$.hh'", kcDetectionMain.getSearchHh()); + } + Page page = new Page<>(pageNo, pageSize); IPage pageList = kcDetectionMainService.page(page, queryWrapper); //补充查询子列表 @@ -88,11 +98,15 @@ public class KcDetectionMainController extends JeecgController qw = new QueryWrapper<>(); qw.lambda().in(KcDetectionDetailed::getPid,pidSet); - qw.orderByAsc("detection_num", "create_time"); +// qw.orderByAsc("detection_num"); + qw.orderByDesc("create_time"); List detailedList = kcDetectionDetailedService.list(qw); detailedList.forEach(x -> { if(detectionMainMap.containsKey(x.getPid())){ @@ -100,7 +114,6 @@ public class KcDetectionMainController extends JeecgController detectionDetailedList; /***/ @TableField(exist = false) private Boolean isSelectKcDetailed; + + /**搜索上课日期*/ + @TableField(exist = false) + private String searchSkrq; + + /**搜索节次*/ + @TableField(exist = false) + private String searchHh; } diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentOneController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentOneController.java index 725b2cf7..4bb67035 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentOneController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentOneController.java @@ -143,50 +143,67 @@ public class KcTeachingUnitContentOneController extends JeecgController add(@RequestBody KcTeachingUnitContentSave teachingUnitContentSave) { -// kcTeachingUnitContentOneService.saveAll(teachingUnitContentSave); -// return Result.OK("添加成功!"); -// } + /** + * 编辑 + * + * @param teachingUnitContentSave + * @return + */ + @AutoLog(value = "教学单元内容-全部-编辑") + @ApiOperation(value="教学单元内容-全部-编辑", notes="教学单元内容-全部-编辑") +// @RequiresPermissions("teachingunitcontent:kc_teaching_unit_content_one:edit") + @RequestMapping(value = "/editAll", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result editAll(@RequestBody KcTeachingUnitContentSave teachingUnitContentSave) { + kcTeachingUnitContentOneService.updateAllById(teachingUnitContentSave); + return Result.OK("编辑成功!"); + } + + /** + * 添加 + * + * @param kcTeachingUnitContentOne + * @return + */ + @AutoLog(value = "教学单元内容-第一层-添加") + @ApiOperation(value="教学单元内容-第一层-添加", notes="教学单元内容-第一层-添加") +// @RequiresPermissions("teachingunitcontent:kc_teaching_unit_content_one:add") + @PostMapping(value = "/add") + public Result add(@RequestBody KcTeachingUnitContentOne kcTeachingUnitContentOne) { + kcTeachingUnitContentOneService.save(kcTeachingUnitContentOne); + Result r = Result.OK("添加成功!"); + r.setResult(kcTeachingUnitContentOne); + return r; + } /** * 编辑 * - * @param teachingUnitContentSave + * @param kcTeachingUnitContentOne * @return */ @AutoLog(value = "教学单元内容-第一层-编辑") @ApiOperation(value="教学单元内容-第一层-编辑", notes="教学单元内容-第一层-编辑") // @RequiresPermissions("teachingunitcontent:kc_teaching_unit_content_one:edit") @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) - public Result edit(@RequestBody KcTeachingUnitContentSave teachingUnitContentSave) { - kcTeachingUnitContentOneService.updateAllById(teachingUnitContentSave); + public Result edit(@RequestBody KcTeachingUnitContentOne kcTeachingUnitContentOne) { + kcTeachingUnitContentOneService.updateById(kcTeachingUnitContentOne); return Result.OK("编辑成功!"); } -// /** -// * 通过id删除 -// * -// * @param id -// * @return -// */ -// @AutoLog(value = "教学单元内容-第一层-通过id删除") -// @ApiOperation(value="教学单元内容-第一层-通过id删除", notes="教学单元内容-第一层-通过id删除") + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "教学单元内容-第一层-通过id删除") + @ApiOperation(value="教学单元内容-第一层-通过id删除", notes="教学单元内容-第一层-通过id删除") // @RequiresPermissions("teachingunitcontent:kc_teaching_unit_content_one:delete") -// @DeleteMapping(value = "/delete") -// public Result delete(@RequestParam(name="id",required=true) String id) { -// kcTeachingUnitContentOneService.removeById(id); -// return Result.OK("删除成功!"); -// } + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + kcTeachingUnitContentOneService.removeById(id); + return Result.OK("删除成功!"); + } // // /** // * 批量删除 diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentThreeController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentThreeController.java index 13d8ab3b..0e51aed9 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentThreeController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentThreeController.java @@ -12,6 +12,7 @@ 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.teachingunitcontent.entity.KcTeachingUnitContentOne; import org.jeecg.modules.kc.teachingunitcontent.entity.KcTeachingUnitContentThree; import org.jeecg.modules.kc.teachingunitcontent.service.IKcTeachingUnitContentThreeService; @@ -73,50 +74,52 @@ public class KcTeachingUnitContentThreeController extends JeecgController add(@RequestBody KcTeachingUnitContentThree kcTeachingUnitContentThree) { -// kcTeachingUnitContentThreeService.save(kcTeachingUnitContentThree); -// return Result.OK("添加成功!"); -// } -// -// /** -// * 编辑 -// * -// * @param kcTeachingUnitContentThree -// * @return -// */ -// @AutoLog(value = "教学单元内容-第三层-编辑") -// @ApiOperation(value="教学单元内容-第三层-编辑", notes="教学单元内容-第三层-编辑") + @PostMapping(value = "/add") + public Result add(@RequestBody KcTeachingUnitContentThree kcTeachingUnitContentThree) { + kcTeachingUnitContentThreeService.save(kcTeachingUnitContentThree); + Result r = Result.OK("添加成功!"); + r.setResult(kcTeachingUnitContentThree); + return r; + } + + /** + * 编辑 + * + * @param kcTeachingUnitContentThree + * @return + */ + @AutoLog(value = "教学单元内容-第三层-编辑") + @ApiOperation(value="教学单元内容-第三层-编辑", notes="教学单元内容-第三层-编辑") // @RequiresPermissions("teachingunitcontent:kc_teaching_unit_content_three:edit") -// @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) -// public Result edit(@RequestBody KcTeachingUnitContentThree kcTeachingUnitContentThree) { -// kcTeachingUnitContentThreeService.updateById(kcTeachingUnitContentThree); -// return Result.OK("编辑成功!"); -// } -// -// /** -// * 通过id删除 -// * -// * @param id -// * @return -// */ -// @AutoLog(value = "教学单元内容-第三层-通过id删除") -// @ApiOperation(value="教学单元内容-第三层-通过id删除", notes="教学单元内容-第三层-通过id删除") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody KcTeachingUnitContentThree kcTeachingUnitContentThree) { + kcTeachingUnitContentThreeService.updateById(kcTeachingUnitContentThree); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "教学单元内容-第三层-通过id删除") + @ApiOperation(value="教学单元内容-第三层-通过id删除", notes="教学单元内容-第三层-通过id删除") // @RequiresPermissions("teachingunitcontent:kc_teaching_unit_content_three:delete") -// @DeleteMapping(value = "/delete") -// public Result delete(@RequestParam(name="id",required=true) String id) { -// kcTeachingUnitContentThreeService.removeById(id); -// return Result.OK("删除成功!"); -// } + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + kcTeachingUnitContentThreeService.removeById(id); + return Result.OK("删除成功!"); + } // // /** // * 批量删除 diff --git a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentTwoController.java b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentTwoController.java index ed53d93d..4226238e 100644 --- a/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentTwoController.java +++ b/jeecg-module-main/src/main/java/org/jeecg/modules/kc/teachingunitcontent/controller/KcTeachingUnitContentTwoController.java @@ -12,6 +12,7 @@ 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.teachingunitcontent.entity.KcTeachingUnitContentOne; import org.jeecg.modules.kc.teachingunitcontent.entity.KcTeachingUnitContentTwo; import org.jeecg.modules.kc.teachingunitcontent.service.IKcTeachingUnitContentTwoService; @@ -73,50 +74,52 @@ public class KcTeachingUnitContentTwoController extends JeecgController add(@RequestBody KcTeachingUnitContentTwo kcTeachingUnitContentTwo) { -// kcTeachingUnitContentTwoService.save(kcTeachingUnitContentTwo); -// return Result.OK("添加成功!"); -// } -// -// /** -// * 编辑 -// * -// * @param kcTeachingUnitContentTwo -// * @return -// */ -// @AutoLog(value = "教学单元内容-第二层-编辑") -// @ApiOperation(value="教学单元内容-第二层-编辑", notes="教学单元内容-第二层-编辑") + @PostMapping(value = "/add") + public Result add(@RequestBody KcTeachingUnitContentTwo kcTeachingUnitContentTwo) { + kcTeachingUnitContentTwoService.save(kcTeachingUnitContentTwo); + Result r = Result.OK("添加成功!"); + r.setResult(kcTeachingUnitContentTwo); + return r; + } + + /** + * 编辑 + * + * @param kcTeachingUnitContentTwo + * @return + */ + @AutoLog(value = "教学单元内容-第二层-编辑") + @ApiOperation(value="教学单元内容-第二层-编辑", notes="教学单元内容-第二层-编辑") // @RequiresPermissions("teachingunitcontent:kc_teaching_unit_content_two:edit") -// @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) -// public Result edit(@RequestBody KcTeachingUnitContentTwo kcTeachingUnitContentTwo) { -// kcTeachingUnitContentTwoService.updateById(kcTeachingUnitContentTwo); -// return Result.OK("编辑成功!"); -// } -// -// /** -// * 通过id删除 -// * -// * @param id -// * @return -// */ -// @AutoLog(value = "教学单元内容-第二层-通过id删除") -// @ApiOperation(value="教学单元内容-第二层-通过id删除", notes="教学单元内容-第二层-通过id删除") + @RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) + public Result edit(@RequestBody KcTeachingUnitContentTwo kcTeachingUnitContentTwo) { + kcTeachingUnitContentTwoService.updateById(kcTeachingUnitContentTwo); + return Result.OK("编辑成功!"); + } + + /** + * 通过id删除 + * + * @param id + * @return + */ + @AutoLog(value = "教学单元内容-第二层-通过id删除") + @ApiOperation(value="教学单元内容-第二层-通过id删除", notes="教学单元内容-第二层-通过id删除") // @RequiresPermissions("teachingunitcontent:kc_teaching_unit_content_two:delete") -// @DeleteMapping(value = "/delete") -// public Result delete(@RequestParam(name="id",required=true) String id) { -// kcTeachingUnitContentTwoService.removeById(id); -// return Result.OK("删除成功!"); -// } + @DeleteMapping(value = "/delete") + public Result delete(@RequestParam(name="id",required=true) String id) { + kcTeachingUnitContentTwoService.removeById(id); + return Result.OK("删除成功!"); + } // // /** // * 批量删除