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 | 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