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