bug修复
This commit is contained in:
parent
77134286e0
commit
8209b0fa41
@ -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));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user