|
|
|
|
@ -104,7 +104,7 @@ public class ProfilePoliceController {
|
|
|
|
|
.in(Negative::getCheckStatus, List.of(InspectCaseEnum.TRUE.getValue(), InspectCaseEnum.PARTIALLY_TRUE.getValue()))); |
|
|
|
|
// 问题来源占比
|
|
|
|
|
Map<String, List<Negative>> problemSourcesGroup = list.stream().collect(Collectors.groupingBy(Negative::getProblemSourcesCode)); |
|
|
|
|
List<PieItem> problemSourcesList = problemSourcesGroup.keySet().stream().map(key -> new PieItem(ProblemSourcesEnum.get(key).getLabel(), problemSourcesGroup.get(key).size())).toList(); |
|
|
|
|
List<PieItem> problemSourcesList = problemSourcesGroup.keySet().stream().map(key -> new PieItem(Optional.ofNullable(ProblemSourcesEnum.get(key)).map(ProblemSourcesEnum::getLabel).orElse(key), problemSourcesGroup.get(key).size())).toList(); |
|
|
|
|
profilePolice.setProblemSourcesList(problemSourcesList); |
|
|
|
|
// 业务类型占比
|
|
|
|
|
Map<String, List<Negative>> businessTypeGroup = list.stream().collect(Collectors.groupingBy(Negative::getBusinessTypeCode)); |
|
|
|
|
|