diff --git a/src/main/java/com/zcloud/controller/hidden/HiddenController.java b/src/main/java/com/zcloud/controller/hidden/HiddenController.java
index 80fc098..ff7f195 100644
--- a/src/main/java/com/zcloud/controller/hidden/HiddenController.java
+++ b/src/main/java/com/zcloud/controller/hidden/HiddenController.java
@@ -1974,6 +1974,7 @@ public class HiddenController extends BaseController {
pd.put("RECTIFICATIONTYPE","2");
if (list.size() == 0) {
inspection.put("INSPECTION_STATUS", "5"); // 指派完成
+ pd.put("STATE", "1"); //未整改
} else {
inspection.put("INSPECTION_STATUS", "4"); // 指派中
}
diff --git a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java
index d6e116f..1e019fc 100644
--- a/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java
+++ b/src/main/java/com/zcloud/service/inspection/impl/SafetyEnvironmentalServiceImpl.java
@@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject;
import com.zcloud.entity.Page;
import com.zcloud.entity.PageData;
import com.zcloud.mapper.datasource.inspection.SafetyEnvironmentalMapper;
+import com.zcloud.mapper.datasource.system.UsersMapper;
import com.zcloud.service.bus.*;
import com.zcloud.service.hidden.HiddenService;
import com.zcloud.service.inspection.*;
@@ -59,6 +60,8 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
private DepartmentService departmentService;
@Autowired
private SafetyEnvironmentalExplainService explainService;
+ @Resource
+ private UsersMapper usersMapper;
@Resource
private NoticeCorpUtil noticeCorpUtil;
@@ -150,18 +153,23 @@ public class SafetyEnvironmentalServiceImpl implements SafetyEnvironmentalServic
hidden.put("HIDDENDESCR", json.getString("HIDDENDESCR")); //隐患描述
hidden.put("HIDDENPART", json.getString("HIDDENPART")); //隐患部位
hidden.put("HIDDENLEVEL", json.getString("HIDDENLEVEL")); //隐患级别
- hidden.put("HIDDENTYPE_NAME", json.getString("HIDDENTYPENAME"));//隐患类型名称
+ hidden.put("HIDDENTYPE_NAME", json.getString("HIDDENTYPE_NAME"));//隐患类型名称
hidden.put("LONGITUDE", json.getString("LONGITUDE")); //隐患位置经度
hidden.put("LATITUDE", json.getString("LATITUDE")); //隐患位置纬度
hidden.put("DISCOVERYTIME", json.getString("DISCOVERYTIME")); //隐患发现时间
- hidden.put("HIDDENFINDDEPT", json.getString("HIDDENFINDDEPT")); //隐患发现部门(隐患责任人部门)
hidden.put("CREATOR", json.getString("CREATOR")); //发现人(隐患责任人)
+ PageData user = new PageData();
+ user.put("USER_ID",json.getString("CREATOR"));
+ user = usersMapper.findById(user);
+ if (user != null) {
+ hidden.put("HIDDENFINDDEPT", user.getString("DEPARTMENT_ID")); //隐患发现部门(隐患责任人部门)
+ }
hidden.put("SOURCE", json.getString("SOURCE")); //发现人(隐患责任人)
hidden.put("ISRELEVANT",json.getString("ISRELEVANT"));//是否相关方1是2否
hidden.put("STATE", "100"); //隐患状态 100-安全环保检查暂存的隐患(流程完转0)
hidden.put("CREATTIME", time); //发现时间
hidden.put("CORPINFO_ID", pd.getString("CORPINFO_ID"));
- hidden.put("RECTIFICATIONTYPE", pd.getString("RECTIFICATIONTYPE"));
+ hidden.put("RECTIFICATIONTYPE", "2");
hidden.put("ISDELETE", "0"); //是否删除(0:有效 1:删除)
hidden.put("POSITIONDESC",json.getString("POSITIONDESC"));
hiddenService.save(hidden);
diff --git a/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml b/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml
index 1c8eb8e..879cc3b 100644
--- a/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml
+++ b/src/main/resources/mybatis/datasource/hidden/HiddenMapper.xml
@@ -2546,22 +2546,42 @@
update
set
- STATE = #{STATE},
- CONFIRM_USER = #{CONFIRM_USER},
- CONFIRM_TIME = #{CONFIRM_TIME},
- RECTIFICATIONTYPE = #{RECTIFICATIONTYPE},
- RECTIFICATIONDEADLINE = #{RECTIFICATIONDEADLINE},
- ISCONFIRM = #{ISCONFIRM},
- RECTIFICATIONDEPT = #{RECTIFICATIONDEPT},
- RECTIFICATIONOR = #{RECTIFICATIONOR},
- CHECKDEPT = #{CHECKDEPT},
- CHECKOR = #{CHECKOR},
- HIDDEN_ID = HIDDEN_ID
+
+ STATE = #{STATE},
+
+
+ CONFIRM_USER = #{CONFIRM_USER},
+
+
+ CONFIRM_TIME = #{CONFIRM_TIME},
+
+
+ RECTIFICATIONTYPE = #{RECTIFICATIONTYPE},
+
+
+ RECTIFICATIONDEADLINE = #{RECTIFICATIONDEADLINE},
+
+
+ ISCONFIRM = #{ISCONFIRM},
+
+
+ RECTIFICATIONDEPT = #{RECTIFICATIONDEPT},
+
+
+ RECTIFICATIONOR = #{RECTIFICATIONOR},
+
+
+ CHECKDEPT = #{CHECKDEPT},
+
+
+ CHECKOR = #{CHECKOR},
+
+ HIDDEN_ID = HIDDEN_ID
,RECTIFICATIONTYPE = #{RECTIFICATIONTYPE}
where
- HIDDEN_ID = #{HIDDEN_ID}
+ HIDDEN_ID = #{HIDDEN_ID}