From faee962a89c0b2379be11e66b6ada1e0379c9144 Mon Sep 17 00:00:00 2001
From: 16639036659 <577530412@qq.com>
Date: 星期二, 19 三月 2024 15:46:00 +0800
Subject: [PATCH] 新增检索条件
---
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java | 25 ++++++++++++++++++++++---
1 files changed, 22 insertions(+), 3 deletions(-)
diff --git a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java
index 96eab59..608337a 100644
--- a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java
+++ b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerReportController.java
@@ -8,6 +8,7 @@
import com.ruoyi.doublePrevention.entity.PreventRiskDangerInfo;
import com.ruoyi.doublePrevention.entity.dto.resp.PreventRiskUnitCodeAndNameListQueryRespDTO;
import com.ruoyi.doublePrevention.service.RiskService;
+import com.ruoyi.doublePrevention.service.baseService.PreventRiskDangerConfirmLogService;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
@@ -57,6 +58,9 @@
@Autowired
private RiskService riskService;
+
+ @Autowired
+ private PreventRiskDangerConfirmLogService confirmLogService;
@GetMapping()
public String hiddenDangerCheck(ModelMap mmap) {
@@ -158,6 +162,12 @@
@ResponseBody
@Transactional
public AjaxResult addDangerReportSave(HiddenDangerCheckPoint hdcp) {
+ if (ObjectUtils.isEmpty(hdcp.getCheckPerson())){
+ throw new RuntimeException("检查人不能为空");
+ }
+ if (ObjectUtils.isEmpty(hdcp.getFindTime())){
+ throw new RuntimeException("发现时间不能为空");
+ }
HiddenDangerCheck hiddenDangerCheck = new HiddenDangerCheck();
hiddenDangerCheck.setCreateBy(ShiroUtils.getLoginName());//创建者
hiddenDangerCheck.setCreateTime(DateUtils.getNowDate());//获取创建时间
@@ -230,7 +240,12 @@
HiddenDangerCheck hiddenDangerCheck = new HiddenDangerCheck();
// hiddenDangerCheck.setCreateBy(ShiroUtils.getLoginName());//创建者
// hiddenDangerCheck.setCreateTime(DateUtils.getNowDate());//获取创建时间
-
+ if (ObjectUtils.isEmpty(hdcp.getCheckPerson())){
+ throw new RuntimeException("检查人不能为空");
+ }
+ if (ObjectUtils.isEmpty(hdcp.getFindTime())){
+ throw new RuntimeException("发现时间不能为空");
+ }
hiddenDangerCheck.setCreateBy(ShiroUtils.getLoginName());//创建者
hiddenDangerCheck.setCreateTime(hdcp.getRectifyCreateTime());//获取创建时间
@@ -437,7 +452,6 @@
/**
* 修改判定隐患上报保存
- * todo-2022 隐患核查(判定隐患) 以判定的隐患,才需要上报
*/
@Log(title = "修改判定隐患上报保存", businessType = BusinessType.UPDATE)
@PostMapping("/editJudgeDangerReportSave")
@@ -456,7 +470,7 @@
hiddenDangerCheckPoint.setStage(TrHiddenDangerCheckConstants.DANGER_STAGE_PLAN_EXAMINE);//隐患核查阶段(数据进入到隐患核查阶段)
hiddenDangerCheckPoint.setExamineStatus(TrHiddenDangerCheckConstants.EXAMINE_STATUS_NOT_EXAMINE);//核查状态(待核查)
-// // todo-2022 隐患信息判定
+// //
// int result = riskService.updateDangerInfoJudge(hiddenDangerCheckPoint);
// if (result < 1){
// throw new RuntimeException("整改信息保存失败");
@@ -466,6 +480,11 @@
}
int i = hiddenDangerCheckPointService.updateHiddenDangerCheckPoint(hiddenDangerCheckPoint);
+ int result = confirmLogService.saveConfirmLog(hiddenDangerCheckPoint);
+ if (result < 1){
+ return AjaxResult.error("操作失败");
+ }
+
hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送
return toAjax(i);
--
Gitblit v1.9.2