| | |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import oshi.driver.mac.net.NetStat; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletOutputStream; |
| | |
| | | private TNoticeService noticeService; |
| | | @Resource |
| | | private TNoticeSetService noticeSetService; |
| | | @Resource |
| | | private TEarlyWarningService earlyWarningService; |
| | | @Resource |
| | | private TTaskDetailService taskDetailService; |
| | | |
| | |
| | | tNotice.setDataId(task.getId()); |
| | | tNotice.setNoticeSetType(noticeSet.getNoticeType()); |
| | | if (dto.getAuditStatus()==2){ |
| | | if (StringUtils.hasLength(location.getUnqualifiedTaskId())){ |
| | | if (location.getUnqualifiedTaskId().split(",").length==2){ |
| | | // 已经两条不合格了 生成点位不合格预警记录 |
| | | location.setUnqualifiedTaskId(location.getUnqualifiedTaskId()+","+dto.getTaskId()); |
| | | TEarlyWarning tEarlyWarning = new TEarlyWarning(); |
| | | tEarlyWarning.setWarningType(2); |
| | | tEarlyWarning.setTaskId(location.getUnqualifiedTaskId()); |
| | | earlyWarningService.save(tEarlyWarning); |
| | | location.setUnqualifiedTaskId(""); |
| | | locationService.updateById(location); |
| | | } |
| | | }else{ |
| | | location.setUnqualifiedTaskId(dto.getTaskId()); |
| | | locationService.updateById(location); |
| | | } |
| | | dto.setHandleType(3); |
| | | // 将任务修改为待整改 |
| | | task.setStatus(4); |
| | |
| | | // 增加消息 |
| | | tNotice.setNoticeType(1); |
| | | tNotice.setNoticeContent("【"+location.getLocationName()+"】任务不合格,请重新上传!"); |
| | | |
| | | }else{ |
| | | |
| | | if (dto.getClearStatus()==2){ |
| | | if (StringUtils.hasLength(location.getUnqualifiedTaskId())){ |
| | | if (location.getUnqualifiedTaskId().split(",").length==2){ |
| | | // 已经两条不合格了 生成点位不合格预警记录 |
| | | location.setUnqualifiedTaskId(location.getUnqualifiedTaskId()+","+dto.getTaskId()); |
| | | TEarlyWarning tEarlyWarning = new TEarlyWarning(); |
| | | tEarlyWarning.setWarningType(2); |
| | | tEarlyWarning.setTaskId(location.getUnqualifiedTaskId()); |
| | | earlyWarningService.save(tEarlyWarning); |
| | | location.setUnqualifiedTaskId(""); |
| | | locationService.updateById(location); |
| | | } |
| | | }else{ |
| | | location.setUnqualifiedTaskId(dto.getTaskId()); |
| | | locationService.updateById(location); |
| | | } |
| | | } |
| | | dto.setHandleType(2); |
| | | // 如果是初次审核就通过 将状态设置为已完成 |
| | | List<TTaskDetail> list = tTaskDetailService.lambdaQuery() |