| | |
| | | import com.ruoyi.project.tr.specialCheck.domin.BO.TbSpecialCheckItemDangerLogUpdateBO;
|
| | | import com.ruoyi.project.tr.specialCheck.mapper.*;
|
| | | import com.ruoyi.project.tr.specialCheck.service.SpecialCheckItemDangerLogService;
|
| | | 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;
|
| | |
| | | @Autowired
|
| | | private PreventCJReportDangerInfoRepository preventCJReportDangerInfoRepository;
|
| | |
|
| | |
|
| | | @Autowired
|
| | | private SpecialCheckScoreAndDangerDangerLogService scoreAndDangerDangerLogService;
|
| | |
|
| | | @Override
|
| | | public ResultVO<List<TbSpecialCheckItemLog>> selectSpecialCheckItemDangerLogPage(TbSpecialCheckItemDangerLogBO itemDangerLogBO) {
|
| | |
| | | ResultVO resultVO = new ResultVO<>();
|
| | | resultVO.setCode(ErrorCodes.REQUEST_PARAM_ERROR.getCode());
|
| | |
|
| | | if (updateBO.getTaskId() == null){
|
| | | if (updateBO.getIndexId() == null){
|
| | | resultVO.setMsg("任务不能为空");
|
| | | return resultVO;
|
| | | }
|
| | | if (updateBO.getTaskId() == null){
|
| | | resultVO.setMsg("专项任务不能为空");
|
| | | return resultVO;
|
| | | }
|
| | | TbBaseCheckTaskMapper baseCheckTaskByTaskId = baseCheckTaskMapper.getBaseCheckTaskByTaskId(updateBO.getTaskId());
|
| | | if (ObjectUtils.isEmpty(baseCheckTaskByTaskId)){
|
| | | resultVO.setMsg("任务不存在");
|
| | | resultVO.setMsg("专项任务不存在");
|
| | | return resultVO;
|
| | | }
|
| | | if (updateBO.getCheckItemId() == null){
|
| | |
| | | resultVO.setMsg("检查项不存在,删除失败");
|
| | | return resultVO;
|
| | | }
|
| | |
|
| | | TbSpecialCheckScoreAndDangerLog specialCheckScoreAndDangerLogById = scoreAndDangerDangerLogService.getSpecialCheckScoreAndDangerLogById(specialCheckItemLogByIndexId.getCheckItemId());
|
| | | if (!ObjectUtils.isEmpty(specialCheckScoreAndDangerLogById)){
|
| | | resultVO.setMsg("该检查项存在评价记录,无法删除");
|
| | | return resultVO;
|
| | | }
|
| | | TbSpecialCheckItemLog tbSpecialCheckItemLog = new TbSpecialCheckItemLog();
|
| | | LocalDateTime dateTime = LocalDateTime.now();
|
| | |
|