|
|
@ -43,6 +43,7 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
|
|
|
|
@DubboReference |
|
|
|
RemoteLabelPostService remoteLabelPostService; |
|
|
|
|
|
|
|
@DubboReference |
|
|
|
RemotePostService remotePostService; |
|
|
|
|
|
|
@ -131,10 +132,20 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<StatObj> countPanelAlert(BusinessAlertBo businessAlertBo) { |
|
|
|
if (ObjectUtil.isNotEmpty(businessAlertBo.getPostCode())){ |
|
|
|
LocalDate today = LocalDate.now(); |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(businessAlertBo.getPostCode())){ |
|
|
|
if (ObjectUtil.isEmpty(getAiLabel(businessAlertBo.getPostCode()))){ |
|
|
|
return Stream.of( |
|
|
|
new StatObj("total", 0), |
|
|
|
new StatObj("todoCount", 0), |
|
|
|
new StatObj("finishCount", 0), |
|
|
|
new StatObj("cancelCount", 0) |
|
|
|
).toList(); |
|
|
|
} |
|
|
|
|
|
|
|
businessAlertBo.setCreateTime(today.getYear()+"-"+today.getMonthValue()+"-"+today.getDayOfMonth()); |
|
|
|
|
|
|
|
businessAlertBo.setAiLabelEnList(getAiLabel(businessAlertBo.getPostCode())); |
|
|
|
} |
|
|
|
|
|
|
@ -167,6 +178,21 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
Map<String,Object> result = new HashMap<>(); |
|
|
|
if (ObjectUtil.isNotEmpty(businessAlertBo.getPostCode())){ |
|
|
|
List<String> labelList = getAiLabel(businessAlertBo.getPostCode()); |
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(labelList)){ |
|
|
|
result.put("totalFinishCount", 0); |
|
|
|
result.put("yearTotal", 0); |
|
|
|
result.put("yearFinishCount", 0); |
|
|
|
result.put("yearRate", 0); |
|
|
|
result.put("monthTotal",0); |
|
|
|
result.put("monthFinishCount", 0); |
|
|
|
result.put("monthRate", 0); |
|
|
|
result.put("dayTotal", 0); |
|
|
|
result.put("dayFinishCount", 0); |
|
|
|
result.put("dayTodo", 0); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
businessAlertBo.setAiLabelEnList(labelList); |
|
|
|
} |
|
|
|
|
|
|
@ -218,6 +244,14 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
|
|
|
|
if (ObjectUtil.isNotEmpty(businessAlertBo.getPostCode())){ |
|
|
|
List<String> labelList = getAiLabel(businessAlertBo.getPostCode()); |
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(labelList)){ |
|
|
|
result.put("dayTotal", 0); |
|
|
|
result.put("dayFinishCount", 0); |
|
|
|
result.put("dayTodo", 0); |
|
|
|
return result; |
|
|
|
} |
|
|
|
|
|
|
|
businessAlertBo.setAiLabelEnList(labelList); |
|
|
|
} |
|
|
|
|
|
|
@ -270,14 +304,20 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
return ListUtil.empty(); |
|
|
|
} |
|
|
|
|
|
|
|
postVoList.forEach(postVo -> { |
|
|
|
List<String> labelList = getAiLabel(postVo.getPostCode()); |
|
|
|
businessAlertBo.setAiLabelEnList(labelList); |
|
|
|
List<String> monthList = getLastSixMonths(); |
|
|
|
String startTime = monthList.get(monthList.size() - 1); |
|
|
|
String endTime = monthList.get(0); |
|
|
|
|
|
|
|
Map<String, Object> dateMap = baseMapper.countPastYearAlert(businessAlertBo,startTime,endTime); |
|
|
|
postVoList.forEach(postVo -> { |
|
|
|
List<String> labelList = getAiLabel(postVo.getPostCode()); |
|
|
|
Map<String, Object> dateMap = new HashMap<>(); |
|
|
|
if (ObjectUtil.isEmpty(labelList)) { |
|
|
|
dateMap.put("todoCount",0); |
|
|
|
dateMap.put("finishCount",0); |
|
|
|
}else { |
|
|
|
businessAlertBo.setAiLabelEnList(labelList); |
|
|
|
dateMap = baseMapper.countPastYearAlert(businessAlertBo,startTime,endTime); |
|
|
|
} |
|
|
|
|
|
|
|
result.add(new StatObj( |
|
|
|
postVo.getPostName(), |
|
|
@ -312,12 +352,12 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
postVoList.forEach(postVo -> { |
|
|
|
List<String> labelList = getAiLabel(postVo.getPostCode()); |
|
|
|
StatObj statObj1 = new StatObj(); |
|
|
|
statObj1.setStatKey(postVo.getPostName()); |
|
|
|
if (ObjectUtil.isEmpty(labelList)){ |
|
|
|
statObj1.setStatVal(0); |
|
|
|
}else { |
|
|
|
businessAlertBo.setAiLabelEnList(labelList); |
|
|
|
Map<String,Object> rateMap = baseMapper.handlerRate(businessAlertBo,month); |
|
|
|
statObj1.setStatKey(postVo.getPostName()); |
|
|
|
if (ObjectUtil.isNotEmpty(rateMap)) { |
|
|
|
statObj1.setStatVal(rateMap.get("avgInfo")); |
|
|
|
}else { |
|
|
@ -343,6 +383,11 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
|
Map<String,Object> result = new HashMap<>(); |
|
|
|
|
|
|
|
List<String> aiLabelList = getAiLabel(businessAlertBo.getPostCode()); |
|
|
|
|
|
|
|
if (ObjectUtil.isEmpty(aiLabelList)) { |
|
|
|
return Map.of(); |
|
|
|
} |
|
|
|
|
|
|
|
businessAlertBo.setAiLabelEnList(aiLabelList); |
|
|
|
|
|
|
|
List<String> monthList = getLastSixMonths(); |
|
|
|