From 247a4a1f10f233c89a4bd054dee3cb9b7d4a76f1 Mon Sep 17 00:00:00 2001
From: heheng <475597332@qq.com>
Date: 星期三, 19 十一月 2025 08:40:12 +0800
Subject: [PATCH] 新增数据上传准东
---
src/main/java/com/ruoyi/project/tr/hiddenDangerCheck/controller/DangerRectifyController.java | 37 +++++++++++++++++++++++++++++++++++--
1 files changed, 35 insertions(+), 2 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 1269eea..0eaccea 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
@@ -4,6 +4,7 @@
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.common.utils.security.ShiroUtils;
+import com.ruoyi.doublePrevention.entity.PreventRiskDangerInfo;
import com.ruoyi.doublePrevention.service.RiskService;
import com.ruoyi.framework.aspectj.lang.annotation.Log;
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
@@ -86,6 +87,28 @@
return prefix + "/editDangerRectify";
}
+ /**
+ * 隐患整改--延期
+ *
+ */
+ @Log(title = "隐患整改--整改")
+ @GetMapping("/delayDangerRectify/{id}")
+ public String delayDangerRectify(@PathVariable("id") Long id, ModelMap mmap) {
+ //隐患排查实体
+ HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.selectHiddenDangerCheckPointById(Long.valueOf(id));
+ mmap.put("hdcp", hiddenDangerCheckPoint);
+
+ //获取所在公司人员信息
+ User sysUser = getSysUser();
+ if (sysUser != null && sysUser.getCompanyId() != null) {
+ User userTemp = new User();
+ userTemp.setCompanyId(sysUser.getCompanyId());
+ List<User> userList = userService.selectUserList(userTemp);
+ mmap.put("userList", userList);
+ }
+ return prefix + "/delayDangerRectify";
+ }
+
/**
* 隐患整改--保存
@@ -125,18 +148,27 @@
public String detailDangerRectify(@PathVariable("id") Long id, ModelMap mmap) {
//隐患排查实体
HiddenDangerCheckPoint hiddenDangerCheckPoint = hiddenDangerCheckPointService.selectHiddenDangerCheckPointById(Long.valueOf(id));
+ PreventRiskDangerInfo dangerInfo = riskService.getDangerInfoById(hiddenDangerCheckPoint.getId());
+ if (ObjectUtils.isNotEmpty(dangerInfo)){
+ hiddenDangerCheckPoint.setHazardCode(dangerInfo.getHazardCode());
+ hiddenDangerCheckPoint.setDangerSrc(dangerInfo.getDangerSrc());
+ hiddenDangerCheckPoint.setDangerReason(dangerInfo.getDangerReason());
+ hiddenDangerCheckPoint.setHazardDangerType(dangerInfo.getHazardDangerType());
+ hiddenDangerCheckPoint.setDangerResult(dangerInfo.getDangerResult());
+ }
mmap.put("hdcp", hiddenDangerCheckPoint);
return prefix + "/detailDangerRectify";
}
+
/**
- * 隐患整改延期
+ * 隐患整改延期 - 保存
*/
@Log(title = "隐患上报", businessType = BusinessType.DELETE)
@PostMapping("/rectifyTimeOut")
@ResponseBody
@Transactional
- public AjaxResult rectifyTimeOut(HiddenDangerCheckPoint hdcp) {
+ public AjaxResult rectifyTimeOutSave(HiddenDangerCheckPoint hdcp) {
if(ObjectUtils.isEmpty(hdcp.getId())){
return AjaxResult.error("id不能为空");
}
@@ -150,4 +182,5 @@
return AjaxResult.success();
}
+
}
--
Gitblit v1.9.2