From 73d5cb4c8b3def02dda3addb09469713cc878ba1 Mon Sep 17 00:00:00 2001
From: 16639036659 <577530412@qq.com>
Date: Tue, 06 Jun 2023 08:53:33 +0800
Subject: [PATCH] 临时提交
---
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerPlanExecuteController.java | 25 +++++++++++++++++++++++--
1 files changed, 23 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerPlanExecuteController.java b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerPlanExecuteController.java
index ad76739..369996b 100644
--- a/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerPlanExecuteController.java
+++ b/src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerPlanExecuteController.java
@@ -6,6 +6,7 @@
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.poi.ExcelUtil;
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;
@@ -24,6 +25,7 @@
import com.ruoyi.project.tr.riskEvaluationPlan.service.IRiskEvaluationPlanService;
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.*;
@@ -54,6 +56,9 @@
@Autowired
private IRiskCheckPointService riskCheckPointService;
+
+ @Autowired
+ private RiskService riskService;
@Autowired
@@ -395,11 +400,13 @@
/**
- * 检查点隐患登记--保存
+ * 检查点隐患登记--保存 na li lai de huo dong ,rang ye hen xin dong ,wojiu zhiji na zou le a
+ * todo-2022 手机端
*/
@Log(title = "检查点隐患登记--保存", businessType = BusinessType.UPDATE)
@PostMapping("/editPointDangerRegisterSave")
@ResponseBody
+ @Transactional
public AjaxResult editPointDangerRegisterSave(HiddenDangerCheckPoint hiddenDangerCheckPoint) {
hiddenDangerCheckPoint.setRegisterCreateTime(DateUtils.getNowDate());//设置隐患登记上报创建时间
hiddenDangerCheckPoint.setRegisterUserId(getSysUser().getUserId());//设置隐患登记上报创建人ID
@@ -412,7 +419,6 @@
hiddenDangerCheckPoint.setStage(TrHiddenDangerCheckConstants.DANGER_STAGE_PLAN_EXAMINE);//隐患核查阶段(数据进入到隐患核查阶段)
hiddenDangerCheckPoint.setDangerSources(TrHiddenDangerCheckConstants.DANGER_SOURCES_PLAN_PRODUCE); //隐患来源(隐患计划排查生成)
-
HiddenDangerCheckPoint queryExist = new HiddenDangerCheckPoint();
queryExist.setWhetherDanger(TrHiddenDangerCheckConstants.WHETHER_DANGER_YES);//是否为隐患(是隐患)
@@ -427,10 +433,25 @@
hiddenDangerCheckPoint.setCreateTime(DateUtils.getNowDate());
hiddenDangerCheckPoint.setCompanyId(getSysUser().getCompanyId());
i = hiddenDangerCheckPointService.insertHiddenDangerCheckPoint(hiddenDangerCheckPoint);
+
+// // todo-2022 此处插入附属表
+// //获取Id返回值
+// hiddenDangerCheckPoint.getId();
+// int result = riskService.insertDangerInfo(hiddenDangerCheckPoint.getId(), hiddenDangerCheckPoint);
+// if (result< 1){
+// throw new RuntimeException("添加隐患附属信息失败");
+// }
+
} else {
hiddenDangerCheckPoint.setUpdateBy(getSysUser().getLoginName());
hiddenDangerCheckPoint.setUpdateTime(DateUtils.getNowDate());
i = hiddenDangerCheckPointService.updateHiddenDangerCheckPoint(hiddenDangerCheckPoint);
+
+// // todo-2022 此处修改附属表
+// int result = riskService.updateDangerInfo(hiddenDangerCheckPoint);
+// if (result < 1){
+// throw new RuntimeException("修改失败");
+// }
}
hiddenDangerCheckPointService.getTaskCountTotal(getSysUser().getUserId());//查询未执行任务总数量并推送
return toAjax(i);
--
Gitblit v1.9.2