鞍钢bug修改
This commit is contained in:
parent
b6f534ab44
commit
bbc47c627f
@ -448,6 +448,10 @@ public class XzRiskPredictionController {
|
|||||||
return new BigDecimal(35);
|
return new BigDecimal(35);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
@Autowired
|
||||||
|
SafetyInspectionStandardBigScreenController safetyInspectionStandardBigScreenController;
|
||||||
|
|
||||||
@ApiOperation(value = "总包(含下面分包)事故风险预测趋势by项目", notes = "总包(含下面分包)事故风险预测趋势by项目", httpMethod = "POST")
|
@ApiOperation(value = "总包(含下面分包)事故风险预测趋势by项目", notes = "总包(含下面分包)事故风险预测趋势by项目", httpMethod = "POST")
|
||||||
@ApiImplicitParams({
|
@ApiImplicitParams({
|
||||||
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
@ApiImplicitParam(name = "projectSn", value = "项目sn", paramType = "body", required = true, dataType = "String"),
|
||||||
@ -468,8 +472,11 @@ public class XzRiskPredictionController {
|
|||||||
long specialNotCount = inspectionRecords.stream().filter(r -> r.getStatus() != 5 && r.getType() != null && r.getType() != 1).count();
|
long specialNotCount = inspectionRecords.stream().filter(r -> r.getStatus() != 5 && r.getType() != null && r.getType() != 1).count();
|
||||||
long specialCount = inspectionRecords.stream().filter(r -> r.getType() != null && r.getType() != 1).count();
|
long specialCount = inspectionRecords.stream().filter(r -> r.getType() != null && r.getType() != 1).count();
|
||||||
o.setTotalSpecialOperationsRiskRate(NumberUtils.div(specialNotCount, specialCount, 2));
|
o.setTotalSpecialOperationsRiskRate(NumberUtils.div(specialNotCount, specialCount, 2));
|
||||||
JSONObject ssJo = BeanUtil.toBean(securityQualityInspectionRecordController.getStatScore(projectSn), JSONObject.class);
|
JSONObject ssJo = BeanUtil.toBean(safetyInspectionStandardBigScreenController.getFiveScores(new MapBuilder<String, Object>()
|
||||||
o.setMonthlySafetyScoreRate(NumberUtils.subtract(1D, NumberUtils.div(ssJo.getJSONObject("result").getDouble("total"), 100D, 2), 2));
|
.put("projectSn", projectSn)
|
||||||
|
.build()), JSONObject.class);
|
||||||
|
// JSONObject ssJo = BeanUtil.toBean(securityQualityInspectionRecordController.getStatScore(projectSn), JSONObject.class);
|
||||||
|
o.setMonthlySafetyScoreRate(NumberUtils.subtract(1D, NumberUtils.div(ssJo.getJSONObject("result").getDouble("monthScore"), 100D, 2), 2));
|
||||||
long inspectionCount = inspectionRecords.stream().filter(r -> true).count();
|
long inspectionCount = inspectionRecords.stream().filter(r -> true).count();
|
||||||
long inspectionNotCount = inspectionRecords.stream().filter(r -> r.getStatus() != 5).count();
|
long inspectionNotCount = inspectionRecords.stream().filter(r -> r.getStatus() != 5).count();
|
||||||
o.setUnclosedHiddenDangersRate(NumberUtils.div(inspectionNotCount, inspectionCount, 2));
|
o.setUnclosedHiddenDangersRate(NumberUtils.div(inspectionNotCount, inspectionCount, 2));
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user