src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckItemDangerLogController.java
@@ -1,155 +1,157 @@ package com.ruoyi.project.tr.specialCheck.controller; import com.ruoyi.common.utils.BeanCopyUtils; import com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportDangerInfo; import com.ruoyi.doublePrevention.service.baseService.PreventCJReportDangerInfoService; import com.ruoyi.doublePrevention.vo.ResultVO; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.project.tr.riskList.domain.RiskList; import com.ruoyi.project.tr.riskList.service.IRiskListService; import com.ruoyi.project.tr.specialCheck.domin.BO.*; import com.ruoyi.project.tr.specialCheck.domin.DTO.TbSpecialCheckItemDangerLogDTO; import com.ruoyi.project.tr.specialCheck.domin.DTO.TbSpecialCheckTaskLogDTO; import com.ruoyi.project.tr.specialCheck.domin.TbBaseCheckTask; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemDangerLog; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckTaskLog; import com.ruoyi.project.tr.specialCheck.service.SpecialCheckItemDangerLogService; import com.ruoyi.project.tr.specialCheck.service.SpecialCheckTaskService; import com.ruoyi.project.tr.specialCheck.service.TbBaseCheckService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 隐患列表Controller * * @date 2020-05-08 */ @Controller @RequestMapping("/tr/specialCheckItemDangerLog") public class TBSpecialCheckItemDangerLogController extends BaseController { private String prefix = "tr/specialCheckItemDangerLog"; @Autowired private SpecialCheckItemDangerLogService itemDangerLogService; @Autowired private IRiskListService riskListService; @Autowired private TbBaseCheckService tbBaseCheckService; @Autowired private PreventCJReportDangerInfoService preventCJReportDangerInfoService; // @GetMapping() // public String selectTbBaseCheckTaskPage(ModelMap mmap) //package com.ruoyi.project.tr.specialCheck.controller; // //import com.ruoyi.common.utils.BeanCopyUtils; //import com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportDangerInfo; //import com.ruoyi.doublePrevention.service.baseService.PreventCJReportDangerInfoService; //import com.ruoyi.doublePrevention.vo.ResultVO; //import com.ruoyi.framework.web.controller.BaseController; //import com.ruoyi.framework.web.domain.AjaxResult; //import com.ruoyi.framework.web.page.TableDataInfo; //import com.ruoyi.project.tr.riskList.domain.RiskList; //import com.ruoyi.project.tr.riskList.service.IRiskListService; //import com.ruoyi.project.tr.specialCheck.domin.BO.*; //import com.ruoyi.project.tr.specialCheck.domin.DTO.TbSpecialCheckItemDangerLogDTO; //import com.ruoyi.project.tr.specialCheck.domin.DTO.TbSpecialCheckItemLogQueryDTO; //import com.ruoyi.project.tr.specialCheck.domin.DTO.TbSpecialCheckTaskLogDTO; //import com.ruoyi.project.tr.specialCheck.domin.TbBaseCheckTask; //import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemDangerLog; //import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemLog; //import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckTaskLog; //import com.ruoyi.project.tr.specialCheck.service.SpecialCheckItemDangerLogService; //import com.ruoyi.project.tr.specialCheck.service.SpecialCheckTaskService; //import com.ruoyi.project.tr.specialCheck.service.TbBaseCheckService; //import org.springframework.beans.factory.annotation.Autowired; //import org.springframework.stereotype.Controller; //import org.springframework.ui.ModelMap; //import org.springframework.web.bind.annotation.*; // //import java.util.List; // ///** // * 隐患列表Controller // * // * @date 2020-05-08 // */ //@Controller //@RequestMapping("/tr/specialCheckItemDangerLog") //public class TBSpecialCheckItemDangerLogController extends BaseController // { // private String prefix = "tr/specialCheckItemDangerLog"; // // @Autowired // private SpecialCheckItemDangerLogService itemDangerLogService; // // @Autowired // private IRiskListService riskListService; // // @Autowired // private TbBaseCheckService tbBaseCheckService; // // @Autowired // private PreventCJReportDangerInfoService preventCJReportDangerInfoService; // // // //// @GetMapping() //// public String selectTbBaseCheckTaskPage(ModelMap mmap) //// { //// return prefix + "/specialCheckItemDangerLog"; //// } // @GetMapping("{id}") // public String specialCheckItemDangerLog(@PathVariable("id")String id,ModelMap modelMap) // { // modelMap.put("id",id); // return prefix + "/specialCheckItemDangerLog"; // } @GetMapping("{id}") public String specialCheckItemDangerLog(@PathVariable("id")String id,ModelMap modelMap) { modelMap.put("id",id); return prefix + "/specialCheckItemDangerLog"; } @PostMapping("/list") @ResponseBody public TableDataInfo selectSpecialCheckItemDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO ) { ResultVO<List<TbSpecialCheckItemDangerLog>> resultVO = itemDangerLogService.selectSpecialCheckItemDangerLogPage(itemDangerLogBO); List<TbSpecialCheckItemDangerLogDTO> data = (List<TbSpecialCheckItemDangerLogDTO>) resultVO.getData(); TableDataInfo dataTable = getDataTable(data); dataTable.setTotal(resultVO.getCount()); return dataTable; } /** * 新增 */ @GetMapping("/add") public String add(ModelMap mmap) { List<RiskList> riskList = riskListService.listHazardSource(); List<PreventCJReportDangerInfo> dangerList = preventCJReportDangerInfoService.getDangerListForCheckTask(); mmap.put("hazardList", riskList); mmap.put("dangerList", dangerList); return prefix + "/add"; } /** * 新增保存 */ @PostMapping("/add") @ResponseBody public AjaxResult addSpecialItemDanger(TbSpecialCheckItemDangerLog itemDangerLog){ ResultVO<TbSpecialCheckItemDangerLog> resultVO = itemDangerLogService.addSpecialItemDanger(itemDangerLog); String code = resultVO.getCode(); if ("200".equals(code)){ return toAjax(1); }else { return AjaxResult.error(resultVO.getMsg()); } } @GetMapping("/edit/{id}") public String edit(@PathVariable("id") Long indexId, ModelMap mmap) { TbSpecialCheckItemDangerLog specialCheckItem = itemDangerLogService.getSpecialCheckItemDangerLogByIndexId(indexId); mmap.put("specialCheckItem",specialCheckItem); // TbBaseCheckTaskBO tbBaseCheckTaskBO = new TbBaseCheckTaskBO(); // ResultVO<List<TbBaseCheckTask>> listResultVO = tbBaseCheckService.selectTbBaseCheckTaskPage(tbBaseCheckTaskBO); // Object data = listResultVO.getData(); // mmap.put("tbBaseCheckTask", data); return prefix + "/edit"; } /** * 修改保存 */ @PostMapping("/edit") @ResponseBody public AjaxResult editSave(TbSpecialCheckItemDangerLogUpdateBO updateBO) { ResultVO<TbSpecialCheckItemDangerLog> resultVO = itemDangerLogService.updateSpecialCheckItemDangerLog(updateBO); String code = resultVO.getCode(); if ("200".equals(code)){ return toAjax(1); }else { return AjaxResult.error(resultVO.getMsg()); } } @PostMapping("/remove") @ResponseBody public AjaxResult remove(TbSpecialCheckItemDangerLogUpdateBO updateBO){ ResultVO<TbSpecialCheckItemDangerLog> resultVO = itemDangerLogService.deleteTbSpecialItemDangerTaskLog(updateBO); String code = resultVO.getCode(); if ("200".equals(code)){ return toAjax(1); }else { return AjaxResult.error(resultVO.getMsg()); } } } // // // @PostMapping("/list") // @ResponseBody // public TableDataInfo selectSpecialCheckItemDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO ) // { // // ResultVO<List<TbSpecialCheckItemLog>> resultVO = itemDangerLogService.selectSpecialCheckItemDangerLogPage(itemDangerLogBO); // List<TbSpecialCheckItemLogQueryDTO> data = (List<TbSpecialCheckItemLogQueryDTO>) resultVO.getData(); // // // TableDataInfo dataTable = getDataTable(data); // dataTable.setTotal(resultVO.getCount()); // // return dataTable; // } // // /** // * 新增 // */ // @GetMapping("/add") // public String add(ModelMap mmap) // { // List<RiskList> riskList = riskListService.listHazardSource(); // List<PreventCJReportDangerInfo> dangerList = preventCJReportDangerInfoService.getDangerListForCheckTask(); // mmap.put("hazardList", riskList); // mmap.put("dangerList", dangerList); // return prefix + "/add"; // } // // // /** // * 新增保存 // */ // @PostMapping("/add") // @ResponseBody // public AjaxResult addSpecialItemDanger(TbSpecialCheckItemDangerLog itemDangerLog){ // // ResultVO<TbSpecialCheckItemLog> resultVO = itemDangerLogService.addSpecialItemDanger(itemDangerLog); // String code = resultVO.getCode(); // if ("200".equals(code)){ // return toAjax(1); // }else { // return AjaxResult.error(resultVO.getMsg()); // } // } // // @GetMapping("/edit/{id}") // public String edit(@PathVariable("id") Long indexId, ModelMap mmap) // { // TbSpecialCheckItemLog specialCheckItem = itemDangerLogService.getSpecialCheckItemDangerLogByIndexId(indexId); // mmap.put("specialCheckItem",specialCheckItem); // //// TbBaseCheckTaskBO tbBaseCheckTaskBO = new TbBaseCheckTaskBO(); //// ResultVO<List<TbBaseCheckTask>> listResultVO = tbBaseCheckService.selectTbBaseCheckTaskPage(tbBaseCheckTaskBO); //// Object data = listResultVO.getData(); //// mmap.put("tbBaseCheckTask", data); // return prefix + "/edit"; // } // // /** // * 修改保存 // */ // @PostMapping("/edit") // @ResponseBody // public AjaxResult editSave(TbSpecialCheckItemDangerLogUpdateBO updateBO) // { // ResultVO<TbSpecialCheckItemLog> resultVO = itemDangerLogService.updateSpecialCheckItemDangerLog(updateBO); // String code = resultVO.getCode(); // if ("200".equals(code)){ // return toAjax(1); // }else { // return AjaxResult.error(resultVO.getMsg()); // } // } // // // @PostMapping("/remove") // @ResponseBody // public AjaxResult remove(TbSpecialCheckItemDangerLogUpdateBO updateBO){ // ResultVO<TbSpecialCheckItemLog> resultVO = itemDangerLogService.deleteTbSpecialItemDangerTaskLog(updateBO); // String code = resultVO.getCode(); // if ("200".equals(code)){ // return toAjax(1); // }else { // return AjaxResult.error(resultVO.getMsg()); // } // } // //} // // src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckItemLogController.java
对比新文件 @@ -0,0 +1,152 @@ package com.ruoyi.project.tr.specialCheck.controller; import com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportDangerInfo; import com.ruoyi.doublePrevention.service.baseService.PreventCJReportDangerInfoService; import com.ruoyi.doublePrevention.vo.ResultVO; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.project.tr.riskList.domain.RiskList; import com.ruoyi.project.tr.riskList.service.IRiskListService; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogBO; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogUpdateBO; import com.ruoyi.project.tr.specialCheck.domin.DTO.TbSpecialCheckItemDangerLogDTO; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemDangerLog; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemLog; import com.ruoyi.project.tr.specialCheck.service.SpecialCheckItemDangerLogService; import com.ruoyi.project.tr.specialCheck.service.TbBaseCheckService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 隐患列表Controller * * @date 2020-05-08 */ @Controller @RequestMapping("/tr/specialCheckItemDangerLog") public class TBSpecialCheckItemLogController extends BaseController { private String prefix = "tr/specialCheckItemDangerLog"; @Autowired private SpecialCheckItemDangerLogService itemDangerLogService; @Autowired private IRiskListService riskListService; @Autowired private TbBaseCheckService tbBaseCheckService; @Autowired private PreventCJReportDangerInfoService preventCJReportDangerInfoService; // @GetMapping() // public String selectTbBaseCheckTaskPage(ModelMap mmap) // { // return prefix + "/specialCheckItemDangerLog"; // } @GetMapping("{id}") public String specialCheckItemDangerLog(@PathVariable("id")String id,ModelMap modelMap) { modelMap.put("id",id); return prefix + "/specialCheckItemDangerLog"; } @PostMapping("/list") @ResponseBody public TableDataInfo selectSpecialCheckItemDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO ) { ResultVO<List<TbSpecialCheckItemLog>> resultVO = itemDangerLogService.selectSpecialCheckItemDangerLogPage(itemDangerLogBO); List<TbSpecialCheckItemDangerLogDTO> data = (List<TbSpecialCheckItemDangerLogDTO>) resultVO.getData(); TableDataInfo dataTable = getDataTable(data); dataTable.setTotal(resultVO.getCount()); return dataTable; } /** * 新增 */ @GetMapping("/add") public String add(ModelMap mmap) { List<RiskList> riskList = riskListService.listHazardSource(); List<PreventCJReportDangerInfo> dangerList = preventCJReportDangerInfoService.getDangerListForCheckTask(); mmap.put("hazardList", riskList); mmap.put("dangerList", dangerList); return prefix + "/add"; } /** * 新增保存 */ @PostMapping("/add") @ResponseBody public AjaxResult addSpecialItemDanger(TbSpecialCheckItemDangerLog itemDangerLog){ ResultVO<TbSpecialCheckItemLog> resultVO = itemDangerLogService.addSpecialItemDanger(itemDangerLog); String code = resultVO.getCode(); if ("200".equals(code)){ return toAjax(1); }else { return AjaxResult.error(resultVO.getMsg()); } } @GetMapping("/edit/{id}") public String edit(@PathVariable("id") Long indexId, ModelMap mmap) { TbSpecialCheckItemLog specialCheckItem = itemDangerLogService.getSpecialCheckItemDangerLogByIndexId(indexId); mmap.put("specialCheckItem",specialCheckItem); // TbBaseCheckTaskBO tbBaseCheckTaskBO = new TbBaseCheckTaskBO(); // ResultVO<List<TbBaseCheckTask>> listResultVO = tbBaseCheckService.selectTbBaseCheckTaskPage(tbBaseCheckTaskBO); // Object data = listResultVO.getData(); // mmap.put("tbBaseCheckTask", data); return prefix + "/edit"; } /** * 修改保存 */ @PostMapping("/edit") @ResponseBody public AjaxResult editSave(TbSpecialCheckItemDangerLogUpdateBO updateBO) { ResultVO<TbSpecialCheckItemLog> resultVO = itemDangerLogService.updateSpecialCheckItemDangerLog(updateBO); String code = resultVO.getCode(); if ("200".equals(code)){ return toAjax(1); }else { return AjaxResult.error(resultVO.getMsg()); } } @PostMapping("/remove") @ResponseBody public AjaxResult remove(TbSpecialCheckItemDangerLogUpdateBO updateBO){ ResultVO<TbSpecialCheckItemLog> resultVO = itemDangerLogService.deleteTbSpecialItemDangerTaskLog(updateBO); String code = resultVO.getCode(); if ("200".equals(code)){ return toAjax(1); }else { return AjaxResult.error(resultVO.getMsg()); } } } src/main/java/com/ruoyi/project/tr/specialCheck/controller/TBSpecialCheckScoreAndDangerLogController.java
对比新文件 @@ -0,0 +1,147 @@ package com.ruoyi.project.tr.specialCheck.controller; import com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportDangerInfo; import com.ruoyi.doublePrevention.service.baseService.PreventCJReportDangerInfoService; import com.ruoyi.doublePrevention.vo.ResultVO; import com.ruoyi.framework.web.controller.BaseController; import com.ruoyi.framework.web.domain.AjaxResult; import com.ruoyi.framework.web.page.TableDataInfo; import com.ruoyi.project.tr.riskList.domain.RiskList; import com.ruoyi.project.tr.riskList.service.IRiskListService; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogUpdateBO; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckScoreAndDangerLogQueryBO; import com.ruoyi.project.tr.specialCheck.domin.DTO.TbSpecialCheckScoreAndDangerLogRespDTO; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemDangerLog; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog; import com.ruoyi.project.tr.specialCheck.service.SpecialCheckScoreAndDangerDangerLogService; import com.ruoyi.project.tr.specialCheck.service.TbBaseCheckService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 隐患列表Controller * * @date 2020-05-08 */ @Controller @RequestMapping("/tr/TBSpecialCheckScoreAndDangerLog") public class TBSpecialCheckScoreAndDangerLogController extends BaseController { private String prefix = "tr/specialCheckScoreAndDangerLog"; @Autowired private SpecialCheckScoreAndDangerDangerLogService scoreAndDangerDangerLogService; @Autowired private IRiskListService riskListService; @Autowired private TbBaseCheckService tbBaseCheckService; @Autowired private PreventCJReportDangerInfoService preventCJReportDangerInfoService; @GetMapping("{id}") public String specialCheckItemDangerLog(@PathVariable("id")String id,ModelMap modelMap) { modelMap.put("id",id); return prefix + "/specialCheckScoreAndDangerLog"; } @PostMapping("/list") @ResponseBody public TableDataInfo selectSpecialCheckScoreAndDangerLogPage(TbSpecialCheckScoreAndDangerLogQueryBO scoreAndDangerLogBO ) { ResultVO<List<TbSpecialCheckScoreAndDangerLog>> resultVO = scoreAndDangerDangerLogService.selectSpecialCheckScoreAndDangerLogPage(scoreAndDangerLogBO); List<TbSpecialCheckScoreAndDangerLogRespDTO> data = (List<TbSpecialCheckScoreAndDangerLogRespDTO>) resultVO.getData(); TableDataInfo dataTable = getDataTable(data); dataTable.setTotal(resultVO.getCount()); return dataTable; } /** * 新增 */ @GetMapping("/add") public String add(ModelMap mmap) { List<RiskList> riskList = riskListService.listHazardSource(); List<PreventCJReportDangerInfo> dangerList = preventCJReportDangerInfoService.getDangerListForCheckTask(); mmap.put("hazardList", riskList); mmap.put("dangerList", dangerList); return prefix + "/add"; } /** * 新增保存 */ @PostMapping("/add") @ResponseBody public AjaxResult addSpecialItemDanger(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog){ ResultVO<TbSpecialCheckScoreAndDangerLog> resultVO = scoreAndDangerDangerLogService.addSpecialScoreAndDanger(scoreAndDangerLog); String code = resultVO.getCode(); if ("200".equals(code)){ return toAjax(1); }else { return AjaxResult.error(resultVO.getMsg()); } } @GetMapping("/edit/{id}") public String edit(@PathVariable("id") Long indexId, ModelMap mmap) { TbSpecialCheckScoreAndDangerLog specialCheckItem = scoreAndDangerDangerLogService.getSpecialCheckScoreAndDangerLogByIndexId(indexId); mmap.put("specialCheckItem",specialCheckItem); // TbBaseCheckTaskBO tbBaseCheckTaskBO = new TbBaseCheckTaskBO(); // ResultVO<List<TbBaseCheckTask>> listResultVO = tbBaseCheckService.selectTbBaseCheckTaskPage(tbBaseCheckTaskBO); // Object data = listResultVO.getData(); // mmap.put("tbBaseCheckTask", data); return prefix + "/edit"; } /** * 修改保存 */ @PostMapping("/edit") @ResponseBody public AjaxResult editSave(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog) { ResultVO<TbSpecialCheckScoreAndDangerLog> resultVO = scoreAndDangerDangerLogService.updateSpecialCheckScoreAndDangerLog(scoreAndDangerLog); String code = resultVO.getCode(); if ("200".equals(code)){ return toAjax(1); }else { return AjaxResult.error(resultVO.getMsg()); } } @PostMapping("/remove") @ResponseBody public AjaxResult remove(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog){ ResultVO<TbSpecialCheckScoreAndDangerLog> resultVO = scoreAndDangerDangerLogService.deleteTbSpecialScoreAndDangerLog(scoreAndDangerLog); String code = resultVO.getCode(); if ("200".equals(code)){ return toAjax(1); }else { return AjaxResult.error(resultVO.getMsg()); } } } src/main/java/com/ruoyi/project/tr/specialCheck/domin/BO/TbSpecialCheckScoreAndDangerLogQueryBO.java
对比新文件 @@ -0,0 +1,62 @@ package com.ruoyi.project.tr.specialCheck.domin.BO; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.time.LocalDateTime; @Data public class TbSpecialCheckScoreAndDangerLogQueryBO { private Integer pageNum; private Integer pageSize; private Long indexId; private String id; private String companyCode; private String dangerId; private String dangerName; private String taskId; private String checkType; private String checkItemId; private String checkScoreId; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime checkDate; private String checkPay; private String harmType; private String isReject; private String deductPoint; private String deductIllustrate; private String createBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime createDate; private String updateBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime updateDate; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime reportTime; private Byte reportStatus; } src/main/java/com/ruoyi/project/tr/specialCheck/domin/DTO/TbSpecialCheckItemLogQueryDTO.java
对比新文件 @@ -0,0 +1,51 @@ package com.ruoyi.project.tr.specialCheck.domin.DTO; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.time.LocalDateTime; @Data public class TbSpecialCheckItemLogQueryDTO { private Long indexId; private String id; private String companyCode; private String taskId; private String checkItemId; private String checkName; private String checkContent; private String checkWay; private String checkBasis; private String applicablePlace; private String createBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime createDate; private String updateBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime updateDate; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime reportTime; private Byte reportStatus; } src/main/java/com/ruoyi/project/tr/specialCheck/domin/DTO/TbSpecialCheckScoreAndDangerLogQueryDTO.java
对比新文件 @@ -0,0 +1,68 @@ package com.ruoyi.project.tr.specialCheck.domin.DTO; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.time.LocalDateTime; @Data @TableName("tb_special_check_score_and_danger_log") public class TbSpecialCheckScoreAndDangerLogQueryDTO { @TableId(type = IdType.AUTO) private Long indexId; private String id; private String companyCode; private String dangerId; private String dangerName; private String taskId; private String checkType; private String checkItemId; private String checkScoreId; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime checkDate; private String checkPay; private String harmType; private String isReject; private String deductPoint; private String deductIllustrate; private Byte deleted; private String createBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime createDate; private String updateBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime updateDate; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime reportTime; private Byte reportStatus; } src/main/java/com/ruoyi/project/tr/specialCheck/domin/DTO/TbSpecialCheckScoreAndDangerLogRespDTO.java
对比新文件 @@ -0,0 +1,62 @@ package com.ruoyi.project.tr.specialCheck.domin.DTO; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.time.LocalDateTime; @Data public class TbSpecialCheckScoreAndDangerLogRespDTO { private Long indexId; private String id; private String companyCode; private String dangerId; private String dangerName; private String taskId; private String checkType; private String checkItemId; private String checkScoreId; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime checkDate; private String checkPay; private String harmType; private String isReject; private String deductPoint; private String deductIllustrate; private String createBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime createDate; private String updateBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime updateDate; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime reportTime; private Byte reportStatus; } src/main/java/com/ruoyi/project/tr/specialCheck/domin/TbSpecialCheckItemLog.java
对比新文件 @@ -0,0 +1,56 @@ package com.ruoyi.project.tr.specialCheck.domin; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.time.LocalDateTime; @Data @TableName("tb_special_check_item_log") public class TbSpecialCheckItemLog { @TableId(type = IdType.AUTO) private Long indexId; private String id; private String companyCode; private String taskId; private String checkItemId; private String checkName; private String checkContent; private String checkWay; private String checkBasis; private String applicablePlace; private Byte deleted; private String createBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime createDate; private String updateBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime updateDate; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime reportTime; private Byte reportStatus; } src/main/java/com/ruoyi/project/tr/specialCheck/domin/TbSpecialCheckScoreAndDangerLog.java
对比新文件 @@ -0,0 +1,68 @@ package com.ruoyi.project.tr.specialCheck.domin; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.time.LocalDateTime; @Data @TableName("tb_special_check_score_and_danger_log") public class TbSpecialCheckScoreAndDangerLog { @TableId(type = IdType.AUTO) private Long indexId; private String id; private String companyCode; private String dangerId; private String dangerName; private String taskId; private String checkType; private String checkItemId; private String checkScoreId; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime checkDate; private String checkPay; private String harmType; private String isReject; private String deductPoint; private String deductIllustrate; private Byte deleted; private String createBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime createDate; private String updateBy; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime updateDate; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private LocalDateTime reportTime; private Byte reportStatus; } src/main/java/com/ruoyi/project/tr/specialCheck/mapper/TbSpecialCheckItemLogMapper.java
对比新文件 @@ -0,0 +1,30 @@ package com.ruoyi.project.tr.specialCheck.mapper; import com.ruoyi.project.tr.specialCheck.domin.BO.HandlerSpecialCheckReportParam; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogBO; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogUpdateBO; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemDangerLog; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemLog; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface TbSpecialCheckItemLogMapper { List<TbSpecialCheckItemLog> selectSpecialCheckItemDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO); int save(TbSpecialCheckItemLog itemLog); TbSpecialCheckItemLog getSpecialCheckItemDangerLogByIndexId(Long indexId); int updateSpecialCheckItemDangerLogById(TbSpecialCheckItemLog updateBO); int deleteTbSpecialCheckItemDangerLog(TbSpecialCheckItemLog itemLog); List<TbSpecialCheckItemLog> listItemDangerReportTask(); void updateItemDangerReportStatusById(HandlerSpecialCheckReportParam handlerCJReportParam); TbSpecialCheckItemLog getSpecialCheckItemDangerLogById(String id); } src/main/java/com/ruoyi/project/tr/specialCheck/mapper/TbSpecialCheckScoreAndDangerLogMapper.java
对比新文件 @@ -0,0 +1,31 @@ package com.ruoyi.project.tr.specialCheck.mapper; import com.ruoyi.project.tr.specialCheck.domin.BO.HandlerSpecialCheckReportParam; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogBO; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogUpdateBO; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckScoreAndDangerLogQueryBO; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemDangerLog; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog; import org.springframework.stereotype.Repository; import java.util.List; @Repository public interface TbSpecialCheckScoreAndDangerLogMapper { List<TbSpecialCheckScoreAndDangerLog> selectSpecialCheckScoreAndDangerLogPage(TbSpecialCheckScoreAndDangerLogQueryBO scoreAndDangerLogBO); int save(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog); TbSpecialCheckScoreAndDangerLog getSpecialCheckScoreAndDangerLogByIndexId(Long indexId); int updateSpecialCheckScoreAndDangerLogById(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog); int deleteTbSpecialCheckScoreAndDangerLog(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog); List<TbSpecialCheckScoreAndDangerLog> listItemDangerReportTask(); void updateItemDangerReportStatusById(HandlerSpecialCheckReportParam handlerCJReportParam); TbSpecialCheckScoreAndDangerLog getSpecialCheckScoreAndDangerLogById(String id); } src/main/java/com/ruoyi/project/tr/specialCheck/service/SpecialCheckItemDangerLogService.java
@@ -5,21 +5,22 @@ import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogBO; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogUpdateBO; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemDangerLog; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemLog; import java.util.List; public interface SpecialCheckItemDangerLogService { ResultVO<List<TbSpecialCheckItemDangerLog>> selectSpecialCheckItemDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO); ResultVO<List<TbSpecialCheckItemLog>> selectSpecialCheckItemDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO); ResultVO<TbSpecialCheckItemDangerLog> addSpecialItemDanger(TbSpecialCheckItemDangerLog itemDangerLog); ResultVO<TbSpecialCheckItemLog> addSpecialItemDanger(TbSpecialCheckItemDangerLog itemDangerLog); TbSpecialCheckItemDangerLog getSpecialCheckItemDangerLogByIndexId(Long indexId); TbSpecialCheckItemLog getSpecialCheckItemDangerLogByIndexId(Long indexId); ResultVO<TbSpecialCheckItemDangerLog> updateSpecialCheckItemDangerLog(TbSpecialCheckItemDangerLogUpdateBO updateBO); ResultVO<TbSpecialCheckItemLog> updateSpecialCheckItemDangerLog(TbSpecialCheckItemDangerLogUpdateBO updateBO); ResultVO<TbSpecialCheckItemDangerLog> deleteTbSpecialItemDangerTaskLog(TbSpecialCheckItemDangerLogUpdateBO updateBO); ResultVO<TbSpecialCheckItemLog> deleteTbSpecialItemDangerTaskLog(TbSpecialCheckItemDangerLogUpdateBO updateBO); TbSpecialCheckItemDangerLog getSpecialCheckItemDangerLogById(String id); TbSpecialCheckItemLog getSpecialCheckItemDangerLogById(String id); } src/main/java/com/ruoyi/project/tr/specialCheck/service/SpecialCheckScoreAndDangerDangerLogService.java
对比新文件 @@ -0,0 +1,26 @@ package com.ruoyi.project.tr.specialCheck.service; import com.ruoyi.doublePrevention.vo.ResultVO; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogUpdateBO; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckScoreAndDangerLogQueryBO; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemDangerLog; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog; import java.util.List; public interface SpecialCheckScoreAndDangerDangerLogService { ResultVO<List<TbSpecialCheckScoreAndDangerLog>> selectSpecialCheckScoreAndDangerLogPage(TbSpecialCheckScoreAndDangerLogQueryBO scoreAndDangerLogBO ); ResultVO<TbSpecialCheckScoreAndDangerLog> addSpecialScoreAndDanger(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog); TbSpecialCheckScoreAndDangerLog getSpecialCheckScoreAndDangerLogByIndexId(Long indexId); ResultVO<TbSpecialCheckScoreAndDangerLog> updateSpecialCheckScoreAndDangerLog(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog); ResultVO<TbSpecialCheckScoreAndDangerLog> deleteTbSpecialScoreAndDangerLog(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog); TbSpecialCheckScoreAndDangerLog getSpecialCheckScoreAndDangerLogById(String id); } src/main/java/com/ruoyi/project/tr/specialCheck/service/impl/SpecialCheckItemDangerLogServiceImpl.java
@@ -6,22 +6,13 @@ import com.ruoyi.doublePrevention.enums.ErrorCodes; import com.ruoyi.doublePrevention.enums.ResultCodes; import com.ruoyi.doublePrevention.repository.PreventCJReportDangerInfoRepository; import com.ruoyi.doublePrevention.service.baseService.PreventCJReportDangerInfoService; import com.ruoyi.doublePrevention.vo.ResultVO; import com.ruoyi.project.system.user.domain.User; import com.ruoyi.project.tr.riskList.domain.RiskList; import com.ruoyi.project.tr.specialCheck.domin.*; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogBO; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogUpdateBO; import com.ruoyi.project.tr.specialCheck.domin.TbBaseCheckItem; import com.ruoyi.project.tr.specialCheck.domin.TbBaseCheckScore; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemDangerLog; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckTaskLog; import com.ruoyi.project.tr.specialCheck.mapper.TbBaseCheckItemMapper; import com.ruoyi.project.tr.specialCheck.mapper.TbBaseCheckScoreMapper; import com.ruoyi.project.tr.specialCheck.mapper.TbBaseCheckTaskMapper; import com.ruoyi.project.tr.specialCheck.mapper.TbSpecialCheckItemDangerLogMapper; import com.ruoyi.project.tr.specialCheck.mapper.*; import com.ruoyi.project.tr.specialCheck.service.SpecialCheckItemDangerLogService; import com.ruoyi.project.tr.specialCheck.service.TbBaseCheckService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.ObjectUtils; @@ -36,7 +27,7 @@ public class SpecialCheckItemDangerLogServiceImpl implements SpecialCheckItemDangerLogService { @Autowired private TbSpecialCheckItemDangerLogMapper itemDangerLogMapper; private TbSpecialCheckItemLogMapper itemLogMapper; @Autowired private TbBaseCheckTaskMapper baseCheckTaskMapper; @@ -53,21 +44,21 @@ @Override public ResultVO<List<TbSpecialCheckItemDangerLog>> selectSpecialCheckItemDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO) { public ResultVO<List<TbSpecialCheckItemLog>> selectSpecialCheckItemDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO) { Integer pageIndex = itemDangerLogBO.getPageNum(); Integer pageSize = itemDangerLogBO.getPageSize(); if (pageIndex == 0 || pageSize == 0){ return new ResultVO<>(ErrorCodes.REQUEST_PARAM_ERROR.getCode(),"当前页码或当前页显示数不能为0"); } Page<TbSpecialCheckItemDangerLog> page = PageHelper.startPage(pageIndex, pageSize); itemDangerLogMapper.selectSpecialCheckItemDangerLogPage(itemDangerLogBO); Page<TbSpecialCheckItemLog> page = PageHelper.startPage(pageIndex, pageSize); itemLogMapper.selectSpecialCheckItemDangerLogPage(itemDangerLogBO); Long total = page.getTotal(); int count = total.intValue(); List<TbSpecialCheckItemDangerLog> pageResult = null; List<TbSpecialCheckItemLog> pageResult = null; ResultVO<List<TbSpecialCheckItemDangerLog>> resultVO = new ResultVO<>(ResultCodes.OK,pageResult); ResultVO<List<TbSpecialCheckItemLog>> resultVO = new ResultVO<>(ResultCodes.OK,pageResult); resultVO.setData(page.getResult()); resultVO.setCount(count); @@ -78,7 +69,7 @@ } @Override public ResultVO<TbSpecialCheckItemDangerLog> addSpecialItemDanger(TbSpecialCheckItemDangerLog itemDangerLog) { public ResultVO<TbSpecialCheckItemLog> addSpecialItemDanger(TbSpecialCheckItemDangerLog itemDangerLog) { User sysUser = getSysUser(); ResultVO resultVO = new ResultVO<>(); resultVO.setCode(ErrorCodes.REQUEST_PARAM_ERROR.getCode()); @@ -101,68 +92,32 @@ resultVO.setMsg("检查项不存在"); return resultVO; } if (itemDangerLog.getCheckScoreId() == null){ resultVO.setMsg("评分不能为空"); return resultVO; } TbBaseCheckScore baseCheckScoreByScoreId = baseCheckScoreMapper.getBaseCheckScoreByScoreId(itemDangerLog.getCheckScoreId()); if (ObjectUtils.isEmpty(baseCheckScoreByScoreId)){ resultVO.setMsg("评分标准不存在"); return resultVO; } if (itemDangerLog.getDangerId() == null){ resultVO.setMsg("关联隐患不能为空"); return resultVO; } PreventCJReportDangerInfo dangerById = preventCJReportDangerInfoRepository.getDangerById(itemDangerLog.getDangerId()); if (ObjectUtils.isEmpty(dangerById)){ resultVO.setMsg("隐患不存在"); return resultVO; } if (itemDangerLog.getCheckDate() == null){ resultVO.setMsg("检查时间不能为空"); return resultVO; } if (itemDangerLog.getCheckType() == null){ resultVO.setMsg("检查类型不能为空"); return resultVO; } TbSpecialCheckItemLog itemLog = new TbSpecialCheckItemLog(); LocalDateTime dateTime = LocalDateTime.now(); String uuid = UUID.randomUUID().toString(); itemDangerLog.setId(uuid); itemDangerLog.setCompanyCode("652310082"); itemDangerLog.setCreateDate(dateTime); itemDangerLog.setUpdateDate(dateTime); itemDangerLog.setCreateBy(sysUser.getUserName()); itemDangerLog.setUpdateBy(sysUser.getUserName()); itemDangerLog.setReportStatus((byte) 1); itemDangerLog.setReportTime(null); itemDangerLog.setDeleted((byte) 0); // itemDangerLog.setDangerId(itemDangerLog.getDangerId()); // itemDangerLog.setDangerId(itemDangerLog.getTaskId()); // itemDangerLog.setCheckType(itemDangerLog.getCheckType()); // itemDangerLog.setCheckItemId(itemDangerLog.getCheckItemId()); // itemDangerLog.setCheckScoreId(itemDangerLog.getCheckScoreId()); // itemDangerLog.setCheckDate(itemDangerLog.getCheckDate()); // itemDangerLog.setCheckPay(itemDangerLog.getCheckPay()); // itemDangerLog.setHarmType(itemDangerLog.getHarmType()); itemDangerLog.setDangerName(dangerById.getDangerName()); itemDangerLog.setCheckName(baseCheckItemByItemId.getCheckName()); itemDangerLog.setCheckContent(baseCheckItemByItemId.getCheckContent()); itemDangerLog.setCheckWay(null); itemDangerLog.setCheckBasis(baseCheckItemByItemId.getCheckBasis()); itemDangerLog.setApplicablePlace(baseCheckItemByItemId.getApplicablePlace()); itemDangerLog.setIsReject(baseCheckScoreByScoreId.getIsReject()); itemDangerLog.setDeductPoint(baseCheckScoreByScoreId.getDeductPoint()); itemDangerLog.setDeductIllustrate(baseCheckScoreByScoreId.getDeductIllustrate()); itemLog.setId(uuid); itemLog.setCompanyCode("652310082"); itemLog.setCheckItemId(itemDangerLog.getCheckItemId()); itemLog.setTaskId(itemDangerLog.getTaskId()); itemLog.setCheckName(baseCheckItemByItemId.getCheckName()); itemLog.setCheckContent(baseCheckItemByItemId.getCheckContent()); itemLog.setCheckWay(baseCheckItemByItemId.getCheckWay()); itemLog.setCheckBasis(baseCheckItemByItemId.getCheckBasis()); itemLog.setApplicablePlace(baseCheckItemByItemId.getApplicablePlace()); itemLog.setDeleted((byte) 0); itemLog.setCreateDate(dateTime); itemLog.setUpdateDate(dateTime); itemLog.setCreateBy(sysUser.getUserName()); itemLog.setUpdateBy(sysUser.getUserName()); itemLog.setReportStatus((byte) 1); itemLog.setReportTime(null); int saveResult = itemDangerLogMapper.save(itemDangerLog); int saveResult = itemLogMapper.save(itemLog); if (saveResult == 0){ resultVO.setCode(ResultCodes.SERVER_ADD_ERROR.getCode()); resultVO.setMsg(ResultCodes.SERVER_ADD_ERROR.getDesc()); @@ -174,12 +129,12 @@ } @Override public TbSpecialCheckItemDangerLog getSpecialCheckItemDangerLogByIndexId(Long indexId) { return itemDangerLogMapper.getSpecialCheckItemDangerLogByIndexId(indexId); public TbSpecialCheckItemLog getSpecialCheckItemDangerLogByIndexId(Long indexId) { return itemLogMapper.getSpecialCheckItemDangerLogByIndexId(indexId); } @Override public ResultVO<TbSpecialCheckItemDangerLog> updateSpecialCheckItemDangerLog(TbSpecialCheckItemDangerLogUpdateBO updateBO) { public ResultVO<TbSpecialCheckItemLog> updateSpecialCheckItemDangerLog(TbSpecialCheckItemDangerLogUpdateBO updateBO) { User sysUser = getSysUser(); ResultVO resultVO = new ResultVO<>(); resultVO.setCode(ErrorCodes.REQUEST_PARAM_ERROR.getCode()); @@ -202,50 +157,24 @@ resultVO.setMsg("检查项不存在"); return resultVO; } if (updateBO.getCheckScoreId() == null){ resultVO.setMsg("评分不能为空"); return resultVO; } TbBaseCheckScore baseCheckScoreByScoreId = baseCheckScoreMapper.getBaseCheckScoreByScoreId(updateBO.getCheckScoreId()); if (ObjectUtils.isEmpty(baseCheckScoreByScoreId)){ resultVO.setMsg("评分标准不存在"); return resultVO; } if (updateBO.getDangerId() == null){ resultVO.setMsg("关联隐患不能为空"); return resultVO; } PreventCJReportDangerInfo dangerById = preventCJReportDangerInfoRepository.getDangerById(updateBO.getDangerId()); if (ObjectUtils.isEmpty(dangerById)){ resultVO.setMsg("隐患不存在"); return resultVO; } if (updateBO.getCheckDate() == null){ resultVO.setMsg("检查时间不能为空"); return resultVO; } if (updateBO.getCheckType() == null){ resultVO.setMsg("检查类型不能为空"); return resultVO; } TbSpecialCheckItemLog itemLog = new TbSpecialCheckItemLog(); LocalDateTime dateTime = LocalDateTime.now(); updateBO.setUpdateDate(dateTime); updateBO.setUpdateBy(sysUser.getUserName()); updateBO.setReportStatus((byte) 1); updateBO.setDangerName(dangerById.getDangerName()); updateBO.setCheckName(baseCheckItemByItemId.getCheckName()); updateBO.setCheckContent(baseCheckItemByItemId.getCheckContent()); updateBO.setCheckWay(null); updateBO.setCheckBasis(baseCheckItemByItemId.getCheckBasis()); updateBO.setApplicablePlace(baseCheckItemByItemId.getApplicablePlace()); updateBO.setIsReject(baseCheckScoreByScoreId.getIsReject()); updateBO.setDeductPoint(baseCheckScoreByScoreId.getDeductPoint()); updateBO.setDeductIllustrate(baseCheckScoreByScoreId.getDeductIllustrate()); itemLog.setCheckItemId(updateBO.getCheckItemId()); itemLog.setTaskId(updateBO.getTaskId()); itemLog.setCheckName(baseCheckItemByItemId.getCheckName()); itemLog.setCheckContent(baseCheckItemByItemId.getCheckContent()); itemLog.setCheckWay(baseCheckItemByItemId.getCheckWay()); itemLog.setCheckBasis(baseCheckItemByItemId.getCheckBasis()); itemLog.setApplicablePlace(baseCheckItemByItemId.getApplicablePlace()); int updateResult = itemDangerLogMapper.updateSpecialCheckItemDangerLogById(updateBO); int updateResult = itemLogMapper.updateSpecialCheckItemDangerLogById(itemLog); if (updateResult == 0){ resultVO.setCode(ResultCodes.SERVER_UPDATE_ERROR.getCode()); resultVO.setMsg(ResultCodes.SERVER_UPDATE_ERROR.getDesc()); @@ -257,7 +186,7 @@ } @Override public ResultVO<TbSpecialCheckItemDangerLog> deleteTbSpecialItemDangerTaskLog(TbSpecialCheckItemDangerLogUpdateBO updateBO) { public ResultVO<TbSpecialCheckItemLog> deleteTbSpecialItemDangerTaskLog(TbSpecialCheckItemDangerLogUpdateBO updateBO) { User sysUser = getSysUser(); ResultVO resultVO = new ResultVO<>(); resultVO.setCode(ErrorCodes.REQUEST_PARAM_ERROR.getCode()); @@ -266,22 +195,22 @@ resultVO.setMsg("检查项为空"); return resultVO; } TbSpecialCheckItemDangerLog specialCheckItemDangerLogByIndexId = itemDangerLogMapper.getSpecialCheckItemDangerLogByIndexId(updateBO.getIndexId()); if (ObjectUtils.isEmpty(specialCheckItemDangerLogByIndexId)){ TbSpecialCheckItemLog specialCheckItemLogByIndexId = itemLogMapper.getSpecialCheckItemDangerLogByIndexId(updateBO.getIndexId()); if (ObjectUtils.isEmpty(specialCheckItemLogByIndexId)){ resultVO.setMsg("检查项不存在,删除失败"); return resultVO; } TbSpecialCheckItemDangerLog tbSpecialCheckItemDangerLog = new TbSpecialCheckItemDangerLog(); TbSpecialCheckItemLog tbSpecialCheckItemLog = new TbSpecialCheckItemLog(); LocalDateTime dateTime = LocalDateTime.now(); tbSpecialCheckItemDangerLog.setIndexId(updateBO.getIndexId()); tbSpecialCheckItemDangerLog.setUpdateDate(dateTime); tbSpecialCheckItemDangerLog.setUpdateBy(sysUser.getUserName()); tbSpecialCheckItemDangerLog.setReportStatus((byte) 1); tbSpecialCheckItemDangerLog.setDeleted((byte) 1); tbSpecialCheckItemLog.setIndexId(updateBO.getIndexId()); tbSpecialCheckItemLog.setUpdateDate(dateTime); tbSpecialCheckItemLog.setUpdateBy(sysUser.getUserName()); tbSpecialCheckItemLog.setReportStatus((byte) 1); tbSpecialCheckItemLog.setDeleted((byte) 1); int deleteResult = itemDangerLogMapper.deleteTbSpecialCheckItemDangerLog(tbSpecialCheckItemDangerLog); int deleteResult = itemLogMapper.deleteTbSpecialCheckItemDangerLog(tbSpecialCheckItemLog); if (deleteResult == 0){ resultVO.setCode(ResultCodes.SERVER_DEL_ERROR.getCode()); resultVO.setMsg(ResultCodes.SERVER_DEL_ERROR.getDesc()); @@ -293,8 +222,8 @@ } @Override public TbSpecialCheckItemDangerLog getSpecialCheckItemDangerLogById(String id) { return itemDangerLogMapper.getSpecialCheckItemDangerLogById(id); public TbSpecialCheckItemLog getSpecialCheckItemDangerLogById(String id) { return itemLogMapper.getSpecialCheckItemDangerLogById(id); } src/main/java/com/ruoyi/project/tr/specialCheck/service/impl/SpecialCheckScoreAndDangerLogServiceImpl.java
对比新文件 @@ -0,0 +1,277 @@ package com.ruoyi.project.tr.specialCheck.service.impl; import com.github.pagehelper.Page; import com.github.pagehelper.PageHelper; import com.ruoyi.doublePrevention.entity.CJReport.PreventCJReportDangerInfo; import com.ruoyi.doublePrevention.enums.ErrorCodes; import com.ruoyi.doublePrevention.enums.ResultCodes; import com.ruoyi.doublePrevention.repository.PreventCJReportDangerInfoRepository; import com.ruoyi.doublePrevention.vo.ResultVO; import com.ruoyi.project.system.user.domain.User; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogUpdateBO; import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckScoreAndDangerLogQueryBO; import com.ruoyi.project.tr.specialCheck.domin.TbBaseCheckItem; import com.ruoyi.project.tr.specialCheck.domin.TbBaseCheckScore; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemDangerLog; import com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog; import com.ruoyi.project.tr.specialCheck.mapper.*; import com.ruoyi.project.tr.specialCheck.service.SpecialCheckScoreAndDangerDangerLogService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.util.ObjectUtils; import java.time.LocalDateTime; import java.util.List; import java.util.UUID; import static com.ruoyi.common.utils.security.ShiroUtils.getSysUser; @Service public class SpecialCheckScoreAndDangerLogServiceImpl implements SpecialCheckScoreAndDangerDangerLogService { @Autowired private TbSpecialCheckScoreAndDangerLogMapper scoreAndDangerLogMapper; @Autowired private TbBaseCheckTaskMapper baseCheckTaskMapper; @Autowired private TbBaseCheckItemMapper baseCheckItemMapper; @Autowired private TbBaseCheckScoreMapper baseCheckScoreMapper; @Autowired private PreventCJReportDangerInfoRepository preventCJReportDangerInfoRepository; @Override public ResultVO<List<TbSpecialCheckScoreAndDangerLog>> selectSpecialCheckScoreAndDangerLogPage(TbSpecialCheckScoreAndDangerLogQueryBO scoreAndDangerLogBO) { Integer pageIndex = scoreAndDangerLogBO.getPageNum(); Integer pageSize = scoreAndDangerLogBO.getPageSize(); if (pageIndex == 0 || pageSize == 0){ return new ResultVO<>(ErrorCodes.REQUEST_PARAM_ERROR.getCode(),"当前页码或当前页显示数不能为0"); } Page<TbSpecialCheckScoreAndDangerLog> page = PageHelper.startPage(pageIndex, pageSize); scoreAndDangerLogMapper.selectSpecialCheckScoreAndDangerLogPage(scoreAndDangerLogBO); Long total = page.getTotal(); int count = total.intValue(); List<TbSpecialCheckScoreAndDangerLog> pageResult = null; ResultVO<List<TbSpecialCheckScoreAndDangerLog>> resultVO = new ResultVO<>(ResultCodes.OK,pageResult); resultVO.setData(page.getResult()); resultVO.setCount(count); resultVO.setCount((int) page.getTotal()); resultVO.setPageNum(page.getPageNum()); resultVO.setPageSize(page.getPageSize()); return resultVO; } @Override public ResultVO<TbSpecialCheckScoreAndDangerLog> addSpecialScoreAndDanger(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog) { User sysUser = getSysUser(); ResultVO resultVO = new ResultVO<>(); resultVO.setCode(ErrorCodes.REQUEST_PARAM_ERROR.getCode()); if (scoreAndDangerLog.getTaskId() == null){ resultVO.setMsg("任务不能为空"); return resultVO; } TbBaseCheckTaskMapper baseCheckTaskByTaskId = baseCheckTaskMapper.getBaseCheckTaskByTaskId(scoreAndDangerLog.getTaskId()); if (ObjectUtils.isEmpty(baseCheckTaskByTaskId)){ resultVO.setMsg("任务不存在"); return resultVO; } if (scoreAndDangerLog.getCheckItemId() == null){ resultVO.setMsg("检查项不能为空"); return resultVO; } TbBaseCheckItem baseCheckItemByItemId = baseCheckItemMapper.getBaseCheckItemByItemId(scoreAndDangerLog.getCheckItemId()); if (ObjectUtils.isEmpty(baseCheckItemByItemId)){ resultVO.setMsg("检查项不存在"); return resultVO; } if (scoreAndDangerLog.getCheckScoreId() == null){ resultVO.setMsg("评分不能为空"); return resultVO; } TbBaseCheckScore baseCheckScoreByScoreId = baseCheckScoreMapper.getBaseCheckScoreByScoreId(scoreAndDangerLog.getCheckScoreId()); if (ObjectUtils.isEmpty(baseCheckScoreByScoreId)){ resultVO.setMsg("评分标准不存在"); return resultVO; } if (scoreAndDangerLog.getDangerId() == null){ resultVO.setMsg("关联隐患不能为空"); return resultVO; } PreventCJReportDangerInfo dangerById = preventCJReportDangerInfoRepository.getDangerById(scoreAndDangerLog.getDangerId()); if (ObjectUtils.isEmpty(dangerById)){ resultVO.setMsg("隐患不存在"); return resultVO; } if (scoreAndDangerLog.getCheckDate() == null){ resultVO.setMsg("检查时间不能为空"); return resultVO; } if (scoreAndDangerLog.getCheckType() == null){ resultVO.setMsg("检查类型不能为空"); return resultVO; } LocalDateTime dateTime = LocalDateTime.now(); String uuid = UUID.randomUUID().toString(); scoreAndDangerLog.setId(uuid); scoreAndDangerLog.setCompanyCode("652310082"); scoreAndDangerLog.setCreateDate(dateTime); scoreAndDangerLog.setUpdateDate(dateTime); scoreAndDangerLog.setCreateBy(sysUser.getUserName()); scoreAndDangerLog.setUpdateBy(sysUser.getUserName()); scoreAndDangerLog.setReportStatus((byte) 1); scoreAndDangerLog.setReportTime(null); scoreAndDangerLog.setDeleted((byte) 0); scoreAndDangerLog.setDangerName(dangerById.getDangerName()); scoreAndDangerLog.setIsReject(baseCheckScoreByScoreId.getIsReject()); scoreAndDangerLog.setDeductPoint(baseCheckScoreByScoreId.getDeductPoint()); scoreAndDangerLog.setDeductIllustrate(baseCheckScoreByScoreId.getDeductIllustrate()); int saveResult = scoreAndDangerLogMapper.save(scoreAndDangerLog); if (saveResult == 0){ resultVO.setCode(ResultCodes.SERVER_ADD_ERROR.getCode()); resultVO.setMsg(ResultCodes.SERVER_ADD_ERROR.getDesc()); return resultVO; } resultVO.setCode(ResultCodes.OK.getCode()); resultVO.setMsg("新增检查成功"); return resultVO; } @Override public TbSpecialCheckScoreAndDangerLog getSpecialCheckScoreAndDangerLogByIndexId(Long indexId) { return scoreAndDangerLogMapper.getSpecialCheckScoreAndDangerLogByIndexId(indexId); } @Override public ResultVO<TbSpecialCheckScoreAndDangerLog> updateSpecialCheckScoreAndDangerLog(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog) { User sysUser = getSysUser(); ResultVO resultVO = new ResultVO<>(); resultVO.setCode(ErrorCodes.REQUEST_PARAM_ERROR.getCode()); if (scoreAndDangerLog.getTaskId() == null){ resultVO.setMsg("任务不能为空"); return resultVO; } TbBaseCheckTaskMapper baseCheckTaskByTaskId = baseCheckTaskMapper.getBaseCheckTaskByTaskId(scoreAndDangerLog.getTaskId()); if (ObjectUtils.isEmpty(baseCheckTaskByTaskId)){ resultVO.setMsg("任务不存在"); return resultVO; } if (scoreAndDangerLog.getCheckItemId() == null){ resultVO.setMsg("检查项不能为空"); return resultVO; } TbBaseCheckItem baseCheckItemByItemId = baseCheckItemMapper.getBaseCheckItemByItemId(scoreAndDangerLog.getCheckItemId()); if (ObjectUtils.isEmpty(baseCheckItemByItemId)){ resultVO.setMsg("检查项不存在"); return resultVO; } if (scoreAndDangerLog.getCheckScoreId() == null){ resultVO.setMsg("评分不能为空"); return resultVO; } TbBaseCheckScore baseCheckScoreByScoreId = baseCheckScoreMapper.getBaseCheckScoreByScoreId(scoreAndDangerLog.getCheckScoreId()); if (ObjectUtils.isEmpty(baseCheckScoreByScoreId)){ resultVO.setMsg("评分标准不存在"); return resultVO; } if (scoreAndDangerLog.getDangerId() == null){ resultVO.setMsg("关联隐患不能为空"); return resultVO; } PreventCJReportDangerInfo dangerById = preventCJReportDangerInfoRepository.getDangerById(scoreAndDangerLog.getDangerId()); if (ObjectUtils.isEmpty(dangerById)){ resultVO.setMsg("隐患不存在"); return resultVO; } if (scoreAndDangerLog.getCheckDate() == null){ resultVO.setMsg("检查时间不能为空"); return resultVO; } if (scoreAndDangerLog.getCheckType() == null){ resultVO.setMsg("检查类型不能为空"); return resultVO; } LocalDateTime dateTime = LocalDateTime.now(); scoreAndDangerLog.setUpdateDate(dateTime); scoreAndDangerLog.setUpdateBy(sysUser.getUserName()); scoreAndDangerLog.setReportStatus((byte) 1); scoreAndDangerLog.setDangerName(dangerById.getDangerName()); scoreAndDangerLog.setIsReject(baseCheckScoreByScoreId.getIsReject()); scoreAndDangerLog.setDeductPoint(baseCheckScoreByScoreId.getDeductPoint()); scoreAndDangerLog.setDeductIllustrate(baseCheckScoreByScoreId.getDeductIllustrate()); int updateResult = scoreAndDangerLogMapper.updateSpecialCheckScoreAndDangerLogById(scoreAndDangerLog); if (updateResult == 0){ resultVO.setCode(ResultCodes.SERVER_UPDATE_ERROR.getCode()); resultVO.setMsg(ResultCodes.SERVER_UPDATE_ERROR.getDesc()); return resultVO; } resultVO.setCode(ResultCodes.OK.getCode()); resultVO.setMsg("更新成功"); return resultVO; } @Override public ResultVO<TbSpecialCheckScoreAndDangerLog> deleteTbSpecialScoreAndDangerLog(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog) { User sysUser = getSysUser(); ResultVO resultVO = new ResultVO<>(); resultVO.setCode(ErrorCodes.REQUEST_PARAM_ERROR.getCode()); if (scoreAndDangerLog.getIndexId() == null){ resultVO.setMsg("评分项为空"); return resultVO; } TbSpecialCheckScoreAndDangerLog specialCheckScoreAndDangerLogByIndexId = scoreAndDangerLogMapper.getSpecialCheckScoreAndDangerLogByIndexId(scoreAndDangerLog.getIndexId()); if (ObjectUtils.isEmpty(specialCheckScoreAndDangerLogByIndexId)){ resultVO.setMsg("评分项不存在,删除失败"); return resultVO; } TbSpecialCheckScoreAndDangerLog tbSpecialCheckItemDangerLog = new TbSpecialCheckScoreAndDangerLog(); LocalDateTime dateTime = LocalDateTime.now(); tbSpecialCheckItemDangerLog.setIndexId(scoreAndDangerLog.getIndexId()); tbSpecialCheckItemDangerLog.setUpdateDate(dateTime); tbSpecialCheckItemDangerLog.setUpdateBy(sysUser.getUserName()); tbSpecialCheckItemDangerLog.setReportStatus((byte) 1); tbSpecialCheckItemDangerLog.setDeleted((byte) 1); int deleteResult = scoreAndDangerLogMapper.deleteTbSpecialCheckScoreAndDangerLog(tbSpecialCheckItemDangerLog); if (deleteResult == 0){ resultVO.setCode(ResultCodes.SERVER_DEL_ERROR.getCode()); resultVO.setMsg(ResultCodes.SERVER_DEL_ERROR.getDesc()); return resultVO; } resultVO.setCode(ResultCodes.OK.getCode()); resultVO.setMsg("删除成功"); return resultVO; } @Override public TbSpecialCheckScoreAndDangerLog getSpecialCheckScoreAndDangerLogById(String id) { return scoreAndDangerLogMapper.getSpecialCheckScoreAndDangerLogById(id); } } src/main/java/com/ruoyi/project/tr/specialCheck/service/impl/TbBaseCheckServiceImpl.java
@@ -93,7 +93,7 @@ if (pageIndex == 0 || pageSize == 0){ return new ResultVO<>(ErrorCodes.REQUEST_PARAM_ERROR.getCode(),"当前页码或当前页显示数不能为0"); } TbSpecialCheckItemDangerLog specialCheckItemDangerLogById = itemDangerLogService.getSpecialCheckItemDangerLogById(tbBaseCheckScoreBO.getId()); TbSpecialCheckItemLog specialCheckItemDangerLogById = itemDangerLogService.getSpecialCheckItemDangerLogById(tbBaseCheckScoreBO.getId()); Page<TbBaseCheckScore> page = PageHelper.startPage(pageIndex, pageSize); tbBaseCheckScoreBO.setCheckItemId(specialCheckItemDangerLogById.getCheckItemId()); src/main/resources/mybatis/tr/TbSpecialCheckItemLogMapper.xml
对比新文件 @@ -0,0 +1,175 @@ <?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="com.ruoyi.project.tr.specialCheck.mapper.TbSpecialCheckItemLogMapper"> <resultMap id="BaseResultMap" type="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemLog"> <id property="indexId" column="index_id"/> <result property="id" column="id"/> <result property="companyCode" column="company_code"/> <result property="taskId" column="task_id"/> <result property="checkItemId" column="check_item_id"/> <result property="checkName" column="check_name"/> <result property="checkContent" column="check_content"/> <result property="checkWay" column="check_way"/> <result property="checkBasis" column="check_basis"/> <result property="applicablePlace" column="applicable_place"/> <result property="deleted" column="deleted"/> <result property="createBy" column="create_by"/> <result property="createDate" column="create_date"/> <result property="updateBy" column="update_by"/> <result property="updateDate" column="update_date"/> <result property="reportTime" column="report_time"/> <result property="reportStatus" column="report_status"/> </resultMap> <!-- List<TbSpecialCheckItemDangerLog> selectSpecialCheckItemDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO);--> <select id="selectSpecialCheckItemDangerLogPage" resultMap="BaseResultMap"> select * from tb_special_check_item_log <where> deleted = 0 <if test="id != null"> and task_id = #{id} </if> <if test="reportStatus != null"> and report_status = #{reportStatus} </if> order by create_date desc </where> </select> <!-- TbSpecialCheckItemDangerLog getSpecialCheckItemDangerLogByIndexId(Long indexId);;--> <select id="getSpecialCheckItemDangerLogByIndexId" resultMap="BaseResultMap"> select * from tb_special_check_item_log where deleted = 0 and index_id = #{indexId} </select> <!-- TbSpecialCheckTaskLog save(TbSpecialCheckTaskLog tbSpecialCheckTaskLog);--> <insert id="save" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemLog"> insert into tb_special_check_item_log <!-- (index_id,company_code)values(null,#{companyCode},#{hazardCode})--> <trim prefix="(" suffix=")" suffixOverrides=","> index_id, <if test="id != null ">id,</if> <if test="companyCode != null ">company_code,</if> <if test="taskId != null ">task_id,</if> <if test="checkItemId != null ">check_item_id,</if> <if test="checkName != null ">check_name,</if> <if test="checkContent != null ">check_content,</if> <if test="checkWay != null ">check_way,</if> <if test="checkBasis != null ">check_basis,</if> <if test="applicablePlace != null ">applicable_place,</if> <if test="deleted != null">deleted,</if> <if test="createBy != null">create_by,</if> <if test="createDate != null">create_date,</if> <if test="updateBy != null ">update_by,</if> <if test="updateDate != null ">update_date,</if> report_time, <if test="reportStatus != null ">report_status,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> null, <if test="id != null ">#{id},</if> <if test="companyCode != null ">#{companyCode},</if> <if test="taskId != null ">#{taskId},</if> <if test="checkItemId != null ">#{checkItemId},</if> <if test="checkName != null ">#{checkName},</if> <if test="checkContent != null ">#{checkContent},</if> <if test="checkWay != null ">#{checkWay},</if> <if test="checkBasis != null">#{checkBasis},</if> <if test="applicablePlace != null ">#{applicablePlace},</if> <if test="deleted != null ">#{deleted},</if> <if test="createBy != null">#{createBy},</if> <if test="createDate != null">#{createDate},</if> <if test="updateBy != null ">#{updateBy},</if> <if test="updateDate != null ">#{updateDate},</if> null, <if test="reportStatus != null ">#{reportStatus},</if> </trim> </insert> <!-- int updateSpecialCheckItemDangerLogById(TbSpecialCheckItemDangerLogUpdateBO updateBO);--> <update id="updateSpecialCheckItemDangerLogById" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemLog"> update tb_special_check_item_log <set> <if test="taskId != null"> task_id = #{taskId}, </if> <if test="checkItemId != null"> check_item_id = #{checkItemId}, </if> <if test="checkName != null"> check_name = #{checkName}, </if> <if test="checkContent != null"> check_content = #{checkContent}, </if> <if test="checkWay != null"> check_way = #{checkWay}, </if> <if test="checkBasis != null"> check_basis = #{checkBasis}, </if> <if test="applicablePlace != null"> applicable_place = #{applicablePlace}, </if> <if test="resultStatus != null"> result_status = #{resultStatus}, </if> <if test="reportStatus != null"> report_status = #{reportStatus}, </if> <if test="updateBy != null"> update_by = #{updateBy}, </if> <if test="updateDate != null"> update_date = #{updateDate}, </if> </set> where index_id = #{indexId} and deleted = 0 </update> <!-- int deleteTbSpecialCheckItemDangerLog(TbSpecialCheckItemDangerLog tbSpecialCheckItemDangerLog);--> <update id="deleteTbSpecialCheckItemDangerLog" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemLog"> update tb_special_check_item_log <set> <if test="deleted != null "> deleted = #{deleted}, </if> <if test="reportStatus != null"> report_status = #{reportStatus}, </if> <if test="updateBy != null"> update_by = #{updateBy}, </if> <if test="updateDate != null"> update_date = #{updateDate}, </if> </set> where index_id = #{indexId} and deleted = 0 </update> <!-- List<TbSpecialCheckItemDangerLog> listItemDangerReportTask();--> <select id="listItemDangerReportTask" resultMap="BaseResultMap"> select * from tb_special_check_item_log where deleted = 0 and report_status = 1 </select> <!-- void updateItemDangerReportStatusById(HandlerSpecialCheckReportParam handlerCJReportParam);--> <update id="updateItemDangerReportStatusById" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckItemLog"> update tb_special_check_item_log report_status = #{reportStatus}, report_time = #{reportTime} where id = #{indexId} and deleted = 0 </update> <!-- TbSpecialCheckItemDangerLog getSpecialCheckItemDangerLogById(String id);--> <select id="getSpecialCheckItemDangerLogById" resultMap="BaseResultMap"> select * from tb_special_check_item_log where deleted = 0 and id = #{id} </select> </mapper> src/main/resources/mybatis/tr/TbSpecialCheckScoreAndDangerLogMapper.xml
对比新文件 @@ -0,0 +1,209 @@ <?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="com.ruoyi.project.tr.specialCheck.mapper.TbSpecialCheckScoreAndDangerLogMapper"> <resultMap id="BaseResultMap" type="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog"> <id property="indexId" column="index_id"/> <result property="id" column="id"/> <result property="companyCode" column="company_code"/> <result property="dangerId" column="danger_id"/> <result property="dangerName" column="danger_name"/> <result property="taskId" column="task_id"/> <result property="checkType" column="check_type"/> <result property="checkItemId" column="check_item_id"/> <result property="checkScoreId" column="check_score_id"/> <result property="checkDate" column="check_date"/> <result property="checkPay" column="check_pay"/> <result property="harmType" column="harm_type"/> <result property="isReject" column="is_reject"/> <result property="deductPoint" column="deduct_point"/> <result property="deductIllustrate" column="deduct_illustrate"/> <result property="deleted" column="deleted"/> <result property="createBy" column="create_by"/> <result property="createDate" column="create_date"/> <result property="updateBy" column="update_by"/> <result property="updateDate" column="update_date"/> <result property="reportTime" column="report_time"/> <result property="reportStatus" column="report_status"/> </resultMap> <!-- List<TbSpecialCheckItemDangerLog> selectSpecialCheckScoreAndDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO);--> <select id="selectSpecialCheckScoreAndDangerLogPage" resultMap="BaseResultMap"> select * from tb_special_check_score_and_danger_log <where> deleted = 0 <if test="id != null"> and check_item_id = #{id} </if> <if test="checkType != null"> and check_type like concat('%',#{checkType},'%') </if> <if test="reportStatus != null"> and report_status = #{reportStatus} </if> order by create_date desc </where> </select> <!-- TbSpecialCheckItemDangerLog getSpecialCheckScoreAndDangerLogByIndexId(Long indexId);;--> <select id="getSpecialCheckScoreAndDangerLogByIndexId" resultMap="BaseResultMap"> select * from tb_special_check_score_and_danger_log where deleted = 0 and index_id = #{indexId} </select> <!-- TbSpecialCheckTaskLog save(TbSpecialCheckTaskLog tbSpecialCheckTaskLog);--> <insert id="save" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog"> insert into tb_special_check_score_and_danger_log <!-- (index_id,company_code)values(null,#{companyCode},#{hazardCode})--> <trim prefix="(" suffix=")" suffixOverrides=","> index_id, <if test="id != null ">id,</if> <if test="companyCode != null ">company_code,</if> <if test="dangerId != null ">danger_id,</if> <if test="dangerName != null ">danger_name,</if> <if test="taskId != null ">task_id,</if> <if test="checkType != null ">check_type,</if> <if test="checkItemId != null ">check_item_id,</if> <if test="checkScoreId != null ">check_score_id,</if> <if test="checkDate != null ">check_date,</if> <if test="checkPay != null ">check_pay,</if> <if test="harmType != null ">harm_type,</if> <if test="isReject != null ">is_reject,</if> <if test="deductPoint != null ">deduct_point,</if> <if test="deductIllustrate != null ">deduct_illustrate,</if> <if test="deleted != null">deleted,</if> <if test="createBy != null">create_by,</if> <if test="createDate != null">create_date,</if> <if test="updateBy != null ">update_by,</if> <if test="updateDate != null ">update_date,</if> report_time, <if test="reportStatus != null ">report_status,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> null, <if test="id != null ">#{id},</if> <if test="companyCode != null ">#{companyCode},</if> <if test="dangerId != null ">#{dangerId},</if> <if test="dangerName != null ">#{dangerName},</if> <if test="taskId != null ">#{taskId},</if> <if test="checkType != null ">#{checkType},</if> <if test="checkItemId != null ">#{checkItemId},</if> <if test="checkScoreId != null ">#{checkScoreId},</if> <if test="checkDate != null">#{checkDate},</if> <if test="checkPay != null ">#{checkPay},</if> <if test="harmType != null ">#{harmType},</if> <if test="isReject != null ">#{isReject},</if> <if test="deductPoint != null ">#{deductPoint},</if> <if test="deductIllustrate != null ">#{deductIllustrate},</if> <if test="deleted != null ">#{deleted},</if> <if test="createBy != null">#{createBy},</if> <if test="createDate != null">#{createDate},</if> <if test="updateBy != null ">#{updateBy},</if> <if test="updateDate != null ">#{updateDate},</if> null, <if test="reportStatus != null ">#{reportStatus},</if> </trim> </insert> <!-- int updateSpecialCheckScoreAndDangerLogById(TbSpecialCheckScoreAndDangerLog scoreAndDangerLog);--> <update id="updateSpecialCheckScoreAndDangerLogById" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog"> update tb_special_check_score_and_danger_log <set> <if test="dangerId != null "> danger_id = #{dangerId}, </if> <if test="dangerName != null "> danger_name= #{dangerName}, </if> <if test="taskId != null"> task_id = #{taskId}, </if> <if test="checkType != null"> check_type = #{checkType}, </if> <if test="checkItemId != null"> check_item_id = #{checkItemId}, </if> <if test="checkScoreId != null"> check_score_id = #{checkScoreId}, </if> <if test="checkPay != null"> check_pay = #{checkPay}, </if> <if test="harmType != null"> harm_type = #{harmType}, </if> <if test="isReject != null"> is_reject = #{isReject}, </if> <if test="deductPoint != null"> deduct_point = #{deductPoint}, </if> <if test="deductIllustrate != null"> deduct_illustrate = #{deductIllustrate}, </if> <if test="checkDate != null"> check_date = #{checkDate}, </if> <if test="resultStatus != null"> result_status = #{resultStatus}, </if> <if test="reportStatus != null"> report_status = #{reportStatus}, </if> <if test="updateBy != null"> update_by = #{updateBy}, </if> <if test="updateDate != null"> update_date = #{updateDate}, </if> </set> where index_id = #{indexId} and deleted = 0 </update> <!-- int deleteTbSpecialCheckScoreAndDangerLog(TbSpecialCheckItemDangerLog tbSpecialCheckItemDangerLog);--> <update id="deleteTbSpecialCheckScoreAndDangerLog" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog"> update tb_special_check_score_and_danger_log <set> <if test="deleted != null "> deleted = #{deleted}, </if> <if test="reportStatus != null"> report_status = #{reportStatus}, </if> <if test="updateBy != null"> update_by = #{updateBy}, </if> <if test="updateDate != null"> update_date = #{updateDate}, </if> </set> where index_id = #{indexId} and deleted = 0 </update> <!-- List<TbSpecialCheckItemDangerLog> listItemDangerReportTask();--> <select id="listItemDangerReportTask" resultMap="BaseResultMap"> select * from tb_special_check_score_and_danger_log where deleted = 0 and report_status = 1 </select> <!-- void updateItemDangerReportStatusById(HandlerSpecialCheckReportParam handlerCJReportParam);--> <update id="updateItemDangerReportStatusById" parameterType="com.ruoyi.project.tr.specialCheck.domin.TbSpecialCheckScoreAndDangerLog"> update tb_special_check_score_and_danger_log report_status = #{reportStatus}, report_time = #{reportTime} where id = #{indexId} and deleted = 0 </update> <!-- TbSpecialCheckItemDangerLog getSpecialCheckScoreAndDangerLogById(String id);--> <select id="getSpecialCheckScoreAndDangerLogById" resultMap="BaseResultMap"> select * from tb_special_check_score_and_danger_log where deleted = 0 and id = #{id} </select> </mapper>