|
|
@ -316,14 +316,11 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
return ListUtil.empty(); |
|
|
|
} |
|
|
|
|
|
|
|
AtomicInteger number = new AtomicInteger(1); |
|
|
|
|
|
|
|
postVoList.forEach(postVo -> { |
|
|
|
List<String> labelList = getAiLabel(postVo.getPostCode()).stream().map(RemoteAiLabelPostVo::getLabelEn).collect(Collectors.toList()); |
|
|
|
businessAlertBo.setAiLabelEnList(labelList); |
|
|
|
Map<String, Object> dayMap = this.baseMapper.countCurrentDayAlert(businessAlertBo); |
|
|
|
number.getAndIncrement(); |
|
|
|
result.add(new StatObj(postVo.getPostName(), ObjectUtil.isEmpty(dayMap.get("total"))? number.get() + 1:dayMap.get("total"))); |
|
|
|
result.add(new StatObj(postVo.getPostName(), dayMap.get("total"))); |
|
|
|
}); |
|
|
|
|
|
|
|
return result; |
|
|
@ -358,11 +355,7 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
endTime = dateMap.get("endTime"); |
|
|
|
} |
|
|
|
|
|
|
|
AtomicInteger number = new AtomicInteger(1); |
|
|
|
|
|
|
|
postVoList.forEach(postVo -> { |
|
|
|
number.getAndIncrement(); |
|
|
|
|
|
|
|
List<String> labelList = getAiLabel(postVo.getPostCode()).stream().map(RemoteAiLabelPostVo::getLabelEn).collect(Collectors.toList()); |
|
|
|
Map<String, Object> dateMap = new HashMap<>(); |
|
|
|
if (ObjectUtil.isEmpty(labelList)) { |
|
|
@ -375,8 +368,8 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
|
|
|
|
result.add(new StatObj( |
|
|
|
postVo.getPostName(), |
|
|
|
ObjectUtil.isEmpty(dateMap.get("todoCount"))?number.get() + 1:dateMap.get("todoCount"), |
|
|
|
ObjectUtil.isEmpty(dateMap.get("finishCount"))?number.get() + 2:dateMap.get("finishCount") |
|
|
|
dateMap.get("todoCount"), |
|
|
|
dateMap.get("finishCount") |
|
|
|
)); |
|
|
|
}); |
|
|
|
|
|
|
@ -409,29 +402,16 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(labelList)){ |
|
|
|
monthList.forEach(month -> { |
|
|
|
int randomValue = 90 + (int)(Math.random() * 31); // 90~120(含120)
|
|
|
|
data.add(randomValue); |
|
|
|
data.add(0.0); |
|
|
|
}); |
|
|
|
}else { |
|
|
|
businessAlertBo.setAiLabelEnList(labelList); |
|
|
|
List<Map<String, Object>> rateList = baseMapper.handlerRate(businessAlertBo,monthList); |
|
|
|
if (ObjectUtil.isNotEmpty(rateList)) { |
|
|
|
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());
|
|
|
|
data.addAll(rateList.stream().map(p-> p.get("avgInfo")).toList()); |
|
|
|
}else { |
|
|
|
// monthList.forEach(month -> {
|
|
|
|
// data.add(0.0);
|
|
|
|
// });
|
|
|
|
monthList.forEach(month -> { |
|
|
|
int randomValue = 90 + (int)(Math.random() * 31); |
|
|
|
data.add(randomValue); |
|
|
|
data.add(0.0); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
@ -696,6 +676,6 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
} |
|
|
|
|
|
|
|
private List<RemoteAiLabelPostVo> getAiLabel(String postCode) { |
|
|
|
return remoteLabelPostService.selectLabelByList(postCode,LoginHelper.getDeptId()); |
|
|
|
return remoteLabelPostService.selectLabelByList(postCode,null); |
|
|
|
} |
|
|
|
} |
|
|
|