From 475a645bf6778711ea007a92f4880e843b07a7bc Mon Sep 17 00:00:00 2001
From: 16639036659 <577530412@qq.com>
Date: 星期一, 31 十月 2022 16:47:28 +0800
Subject: [PATCH] 隐患信息补全
---
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java
index 677e71a..032f88f 100644
--- a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java
+++ b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java
@@ -3,6 +3,7 @@
import com.ruoyi.common.constant.TrHiddenDangerCheckConstants;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.security.ShiroUtils;
+import com.ruoyi.doublePrevention.service.RiskService;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
import com.ruoyi.framework.web.controller.BaseController;
@@ -15,6 +16,7 @@
import com.ruoyi.project.tr.hiddenDangerCheckPoint.service.IHiddenDangerCheckPointService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
+import org.springframework.transaction.annotation.Transactional;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
@@ -40,6 +42,9 @@
@Autowired
JpushService jpushService;
+ @Autowired
+ private RiskService riskService;
+
@GetMapping()
public String hiddenDangerCheckPoint() {
return prefix + "/dangerRectify";
@@ -59,6 +64,7 @@
/**
* 隐患整改--整改
+ *
*/
@Log(title = "隐患整改--整改")
@GetMapping("/editDangerRectify/{id}")
@@ -85,6 +91,7 @@
@Log(title = "隐患整改--保存", businessType = BusinessType.UPDATE)
@PostMapping("/editDangerRectifySave")
@ResponseBody
+ @Transactional
public AjaxResult editDangerRectifySave(HiddenDangerCheckPoint hiddenDangerCheckPoint) {
//获取当前更新用户信息
hiddenDangerCheckPoint.setUpdateBy(ShiroUtils.getLoginName());
@@ -95,6 +102,12 @@
hiddenDangerCheckPoint.setStage(TrHiddenDangerCheckConstants.DANGER_STAGE_PLAN_ACCEPT);//隐患验收阶段(数据进入到隐患验收阶段)
int i = hiddenDangerCheckPointService.updateHiddenDangerCheckPoint(hiddenDangerCheckPoint);
+ // todo-2022 隐患信息保存
+ int result = riskService.updateDangerInfoRectify(hiddenDangerCheckPoint);
+ if (result < 1){
+ throw new RuntimeException("整改信息保存失败");
+ }
+
hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送
return toAjax(i);
--
Gitblit v1.9.2