From 706885f9fcf74cafdd82f0ab324b825c4d5dbf0c Mon Sep 17 00:00:00 2001
From: 16639036659 <577530412@qq.com>
Date: 星期二, 11 七月 2023 08:43:48 +0800
Subject: [PATCH] 数据上报改为20分钟一次
---
src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java | 12 +++++++++---
1 files changed, 9 insertions(+), 3 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 54b89ea..63a4fc9 100644
--- a/src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java
+++ b/src/main/java/com/ruoyi/doublePrevention/service/impl/RiskServiceImpl.java
@@ -982,12 +982,12 @@
if (checkUnit == null){
throw new RuntimeException("基础检查点不存在");
}
- System.out.println("通过一次检验");
+// System.out.println("通过一次检验");
PreventRiskControlMeasure controlMeasure = riskControlMeasureService.getPreventRiskControlMeasureById(checkUnit.getControlMeasureId());
if (controlMeasure == null){
throw new RuntimeException("管控措施已经被删除");
}
- System.out.println("通过二次检验");
+// System.out.println("通过二次检验");
//封装数据
checkAndMeasure.setCheckId(hdcp.getCheckId());
checkAndMeasure.setDangerCheckPointId(id);
@@ -995,7 +995,7 @@
checkAndMeasure.setControlMeasureId(controlMeasure.getId());
checkAndMeasure.setCheckContent(controlMeasure.getCheckContent());
checkAndMeasure.setCheckResult((byte) 4);
- System.out.println("数据封装完成");
+// System.out.println("数据封装完成");
//写入核查任务检查点与管控措施信息
int result = preventRiskDangerCheckAndMeasureService.insertCheckAndMeasure(checkAndMeasure);
if (result <1){
@@ -1037,6 +1037,12 @@
String dangerInfoUuid = UUID.randomUUID().toString();
PreventRiskDangerInfo dangerInfo = new PreventRiskDangerInfo();
+ if (ObjectUtils.isNotEmpty(hdcp.getDangerSrc())){
+ throw new RuntimeException("隐患来源为空");
+ }
+ if (ObjectUtils.isNotEmpty(hdcp.getHazardDangerType())){
+ throw new RuntimeException("隐患类型为空");
+ }
dangerInfo.setUuid(dangerInfoUuid);
dangerInfo.setDangerCheckPointId(id);
--
Gitblit v1.9.2