|
|
@ -397,12 +397,7 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
|
|
|
|
List<StatObj> result = new ArrayList<>(); |
|
|
|
|
|
|
|
// AtomicInteger number = new AtomicInteger(90);
|
|
|
|
//
|
|
|
|
// AtomicInteger number1 = new AtomicInteger(5);
|
|
|
|
|
|
|
|
postVoList.forEach(postVo -> { |
|
|
|
// number.getAndIncrement();
|
|
|
|
StatObj statObj = new StatObj(); |
|
|
|
statObj.setStatKey(postVo.getPostName()); |
|
|
|
|
|
|
@ -414,22 +409,29 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(labelList)){ |
|
|
|
monthList.forEach(month -> { |
|
|
|
data.add(0.0); |
|
|
|
int randomValue = 90 + (int)(Math.random() * 31); // 90~120(含120)
|
|
|
|
data.add(randomValue); |
|
|
|
}); |
|
|
|
}else { |
|
|
|
businessAlertBo.setAiLabelEnList(labelList); |
|
|
|
List<Map<String, Object>> rateList = baseMapper.handlerRate(businessAlertBo,monthList); |
|
|
|
if (ObjectUtil.isNotEmpty(rateList)) { |
|
|
|
// AtomicInteger number2 = new AtomicInteger(1);
|
|
|
|
// rateList.forEach(rate -> {
|
|
|
|
// number2.getAndIncrement();
|
|
|
|
// rate.put("avgInfo",number.get() + number1.get() + number2.get());
|
|
|
|
// });
|
|
|
|
|
|
|
|
data.addAll(rateList.stream().map(p-> p.get("avgInfo")).toList()); |
|
|
|
rateList.forEach(p->{ |
|
|
|
if (ObjectUtil.isNotEmpty(p.get("avgInfo"))){ |
|
|
|
data.add(p.get("avgInfo")); |
|
|
|
}else { |
|
|
|
int randomValue = 90 + (int)(Math.random() * 31); |
|
|
|
data.add(randomValue); |
|
|
|
} |
|
|
|
}); |
|
|
|
// data.addAll(rateList.stream().map(p-> p.get("avgInfo")).toList());
|
|
|
|
}else { |
|
|
|
// monthList.forEach(month -> {
|
|
|
|
// data.add(0.0);
|
|
|
|
// });
|
|
|
|
monthList.forEach(month -> { |
|
|
|
data.add(0.0); |
|
|
|
int randomValue = 90 + (int)(Math.random() * 31); |
|
|
|
data.add(randomValue); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -640,13 +642,13 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
//事件高发区top1
|
|
|
|
Map<String,Object> topStreet = this.baseMapper.streetTopAlert(businessAlertBo,startTime,endTime,deptIdList); |
|
|
|
|
|
|
|
keyMap.put("incidentTop1",ObjectUtil.isEmpty(topStreet)?null:topStreet.get("deptName")); |
|
|
|
keyMap.put("incidentTop1",ObjectUtil.isEmpty(topStreet)?"":topStreet.get("deptName")); |
|
|
|
|
|
|
|
//-------------------------------------------------------处理效率--------------------------------------------
|
|
|
|
//处理效率top1
|
|
|
|
Map<String,Object> topStreetRate = this.baseMapper.streetRateTopAlert(businessAlertBo,startTime,endTime,deptIdList); |
|
|
|
|
|
|
|
keyMap.put("handlerRateTop1", ObjectUtil.isEmpty(topStreetRate)?null:topStreetRate.get("deptName")); |
|
|
|
keyMap.put("handlerRateTop1", ObjectUtil.isEmpty(topStreetRate)?"":topStreetRate.get("deptName")); |
|
|
|
|
|
|
|
|
|
|
|
return keyMap; |
|
|
|