From bec2f0453d651e8b567ba14c596eca452526a2bd Mon Sep 17 00:00:00 2001
From: 16639036659 <577530412@qq.com>
Date: Mon, 31 Oct 2022 16:15:15 +0800
Subject: [PATCH] 返回隐患信息
---
src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java | 41 ++++++++++++++++++++++++++++++++++-------
1 files changed, 34 insertions(+), 7 deletions(-)
diff --git a/src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java b/src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java
index bbfefa2..f41c0fd 100644
--- a/src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java
+++ b/src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java
@@ -8,10 +8,8 @@
import com.ruoyi.doublePrevention.entity.*;
import com.ruoyi.doublePrevention.entity.dto.req.*;
import com.ruoyi.doublePrevention.entity.dto.resp.*;
-import com.ruoyi.doublePrevention.enums.ErrorCodes;
-import com.ruoyi.doublePrevention.enums.ResultCodes;
-import com.ruoyi.doublePrevention.enums.StatusEnum;
-import com.ruoyi.doublePrevention.enums.SyncEnum;
+import com.ruoyi.doublePrevention.enums.*;
+import com.ruoyi.doublePrevention.exception.AusinessException;
import com.ruoyi.doublePrevention.repository.param.PreventPointAndMeasureParams;
import com.ruoyi.doublePrevention.service.RiskService;
import com.ruoyi.doublePrevention.service.baseService.*;
@@ -803,7 +801,7 @@
@Override
public int insertJobAndMeasure(Long jobId, HiddenDangerCheckJob hiddenDangerCheckJob) {
- String jobUuid = UUID.randomUUID().toString();
+
PreventRiskJobAndMeasure jobAndMeasure = new PreventRiskJobAndMeasure();
//根据RiskId查询对应的管控措施
@@ -811,6 +809,7 @@
//遍历管控措施集合
for (PreventRiskCheckUnit checkUnit : unitByRiskId) {
+ String jobUuid = UUID.randomUUID().toString();
PreventRiskControlMeasure preventRiskControlMeasureById = riskControlMeasureService.getPreventRiskControlMeasureById(checkUnit.getControlMeasureId());
//封装数据
jobAndMeasure.setJobId(jobId);
@@ -944,7 +943,7 @@
PreventRiskDangerCheckLog dangerCheck = new PreventRiskDangerCheckLog();
dangerCheck.setUuid(dangerCheckUuid);
- dangerCheck.setCheckStatus(null);
+ dangerCheck.setCheckStatus(null);//
dangerCheck.setCheckId(checkId);
dangerCheck.setJobId(hdc.getJobId());
//获取上报主配置信息
@@ -1024,6 +1023,7 @@
return StatusEnum.EXEC_FAIL.getCode();
}
}
+
//2、删除核查任务-检查点的附属表----老代码未删除检查点信息,此处暂不做处理
return StatusEnum.EXEC_SUCCESS.getCode();
@@ -1296,8 +1296,35 @@
ResultVO<List<PreventRiskControlMeasureListQueryRespDTO>> resultVO = new ResultVO<>(ResultCodes.OK,pageResult);
return resultVO;
}
+ /**
+ * 通过排查点,查找管控措施id
+ */
+ @Override
+ public PreventRiskCheckUnit getRiskControlMeasureByCheckPointId(Long checkPointId) {
+ return preventRiskCheckUnitService.getUnitByBaseCheckPointId(checkPointId);
+ }
+ /**
+ * 查询管控措施信息
+ */
+ @Override
+ public PreventRiskControlMeasure getRiskControlMeasureInfo(Long checkPointId) {
-// /**
+ PreventRiskCheckUnit unitByBaseCheckPointId = preventRiskCheckUnitService.getUnitByBaseCheckPointId(checkPointId);
+// if (ObjectUtils.isEmpty(unitByBaseCheckPointId)){
+// throw new AusinessException(E.DATA_DATABASE_DUPLICATED, "数据不存在或已被删除");
+// }
+ return riskControlMeasureService.getPreventRiskControlMeasureById(unitByBaseCheckPointId.getControlMeasureId());
+ }
+
+ /**
+ * 查询隐患附属表信息
+ */
+ @Override
+ public PreventRiskDangerInfo getDangerInfoById(Long id) {
+ PreventRiskDangerInfo dangerInfobyHiddenDangerId = preventRiskDangerInfoService.getByHiddenDangerId(id);
+ return dangerInfobyHiddenDangerId;
+ }
+ // /**
// * 全流程隐患上报-附属表信息插入
// * */
// @Override
--
Gitblit v1.9.2