|
@ -494,6 +494,43 @@ public class BusinessAlertStatisticsServiceImpl implements IBusinessAlertStatist |
|
|
return result; |
|
|
return result; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
|
|
public List<StatObj> countPostAllAlert(BusinessAlertBo businessAlertBo) { |
|
|
|
|
|
|
|
|
|
|
|
//构建查询数据权限
|
|
|
|
|
|
createPermissions(businessAlertBo); |
|
|
|
|
|
|
|
|
|
|
|
//查询所有的职能岗位
|
|
|
|
|
|
List<RemotePostVo> postVoList = remotePostService.listPost(); |
|
|
|
|
|
postVoList = postVoList.stream().filter(item -> StrUtil.equals("0",item.getStatus())).toList();//剔除禁用规则
|
|
|
|
|
|
|
|
|
|
|
|
List<StatObj> result = new ArrayList<>(); |
|
|
|
|
|
if (ObjectUtil.isEmpty(postVoList)) { |
|
|
|
|
|
return ListUtil.empty(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
postVoList.forEach(postVo -> { |
|
|
|
|
|
List<String> labelList = getAiLabel(postVo.getPostCode()).stream().map(RemoteAiLabelPostVo::getLabelEn).collect(Collectors.toList()); |
|
|
|
|
|
Map<String, Object> dateMap = new HashMap<>(); |
|
|
|
|
|
if (ObjectUtil.isEmpty(labelList)) { |
|
|
|
|
|
dateMap.put("todoCount",0); |
|
|
|
|
|
dateMap.put("finishCount",0); |
|
|
|
|
|
}else { |
|
|
|
|
|
businessAlertBo.setAiLabelEnList(labelList); |
|
|
|
|
|
dateMap = baseMapper.countTotalAlert(businessAlertBo); |
|
|
|
|
|
} |
|
|
|
|
|
result.add(new StatObj( |
|
|
|
|
|
postVo.getPostName(), |
|
|
|
|
|
dateMap.get("todoCount"), |
|
|
|
|
|
dateMap.get("finishCount") |
|
|
|
|
|
)); |
|
|
|
|
|
}); |
|
|
|
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 出警效率 |
|
|
* 出警效率 |
|
|
* @param businessAlertBo |
|
|
* @param businessAlertBo |
|
|