From 33f692fba1149bfe60be2e9f9cdcd149b0ca3ba5 Mon Sep 17 00:00:00 2001 From: 16639036659 <577530412@qq.com> Date: 星期二, 11 七月 2023 10:04:57 +0800 Subject: [PATCH] 自动上报开关 --- 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..a09fcee 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.isEmpty(hdcp.getDangerSrc())){ + throw new RuntimeException("隐患来源为空"); + } + if (ObjectUtils.isEmpty(hdcp.getHazardDangerType())){ + throw new RuntimeException("隐患类型为空"); + } dangerInfo.setUuid(dangerInfoUuid); dangerInfo.setDangerCheckPointId(id); -- Gitblit v1.9.2