From 8209b0fa41f3d89f4c9aad4fc039391fab71aa9c Mon Sep 17 00:00:00 2001 From: GUO <1923636941@qq.com> Date: Wed, 19 Jun 2024 23:37:29 +0800 Subject: [PATCH] =?UTF-8?q?bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/xz/controller/XzRiskPredictionController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/zhgd/xmgl/modules/xz/controller/XzRiskPredictionController.java b/src/main/java/com/zhgd/xmgl/modules/xz/controller/XzRiskPredictionController.java index ff1f517f3..aedb773f4 100644 --- a/src/main/java/com/zhgd/xmgl/modules/xz/controller/XzRiskPredictionController.java +++ b/src/main/java/com/zhgd/xmgl/modules/xz/controller/XzRiskPredictionController.java @@ -272,7 +272,7 @@ public class XzRiskPredictionController { BigDecimal riskScore = this.getRiskScore(projectSn, date, enterpriseIds, safeInspections); BigDecimal aiScore = this.getAiScore(projectSn, date, aiAnalyseHardWareAlarmRecords, enterpriseIds, hardwareIds, aiAnalyseHardWareAlarmRecordLastMonths); BigDecimal total = hiddenDangerScore.add(dangerEngScore).add(riskScore).add(aiScore).add(new BigDecimal(30)).setScale(0, RoundingMode.HALF_UP); - oneVo.setMonthlySafetyScoreRate(total.doubleValue()); + oneVo.setMonthlySafetyScoreRate(NumberUtils.div(total.doubleValue(), 100D,2)); oneVo.setTotalPersonnelRiskRate(0.0D); @@ -443,7 +443,7 @@ public class XzRiskPredictionController { long specialCount = inspectionRecords.stream().filter(r -> r.getStatus() != 6 && r.getType() != null).count(); vo.setTotalSpecialOperationsRiskRate(NumberUtils.div(specialNotCount, specialCount, 2)); JSONObject ssJo = BeanUtil.toBean(securityQualityInspectionRecordController.getStatScore(projectSn), JSONObject.class); - vo.setMonthlySafetyScoreRate(ssJo.getDouble("total")); + vo.setMonthlySafetyScoreRate(NumberUtils.div(ssJo.getDouble("total"), 100D,2)); long inspectionCount = inspectionRecords.stream().filter(r -> r.getStatus() != 6).count(); long inspectionNotCount = inspectionRecords.stream().filter(r -> r.getStatus() != 6 && r.getStatus() != 5).count(); vo.setUnclosedHiddenDangersRate(NumberUtils.div(inspectionNotCount, inspectionCount, 2));