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/doublePrevention/service/impl/RiskServiceImpl.java |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 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 d3d4458..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.*;
@@ -1305,7 +1303,27 @@
     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;
+    }
     //    /**
 //     * 全流程隐患上报-附属表信息插入
 //     * */

--
Gitblit v1.9.2