|
|
@ -254,21 +254,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { |
|
|
|
if (!CollectionUtils.isEmpty(projectAutoNoMyList)){ |
|
|
|
Map<String, List<AutoNoMyResultDTO>> groupByGrid = projectAutoNoMyList.stream().collect(Collectors.groupingBy(AutoNoMyResultDTO::getGridId)); |
|
|
|
groupByGrid.forEach((gridId,projectList) -> { |
|
|
|
Map<String, List<AutoNoMyResultDTO>> groupByProject = projectList.stream().collect(Collectors.groupingBy(AutoNoMyResultDTO::getProjectId)); |
|
|
|
AtomicReference<Boolean> autoSelf = new AtomicReference<>(true); |
|
|
|
AtomicReference<Integer> count = new AtomicReference<>(NumConstant.ZERO); |
|
|
|
groupByProject.forEach((projectId,projects) -> { |
|
|
|
String disposeGrid = projects.get(NumConstant.ZERO).getGridId(); |
|
|
|
projects.forEach(p -> { |
|
|
|
if (!disposeGrid.equals(p.getGridId())){ |
|
|
|
autoSelf.set(false); |
|
|
|
} |
|
|
|
}); |
|
|
|
if (autoSelf.get()) { |
|
|
|
count.getAndSet(count.get() + NumConstant.ONE); |
|
|
|
} |
|
|
|
}); |
|
|
|
autoMap.put(gridId,count.get()); |
|
|
|
autoMap.put(gridId,projectList.size()); |
|
|
|
}); |
|
|
|
} |
|
|
|
//网格办结项目数
|
|
|
@ -370,17 +356,21 @@ public class CalGridIndexServiceImpl implements CalGridIndexService { |
|
|
|
}); |
|
|
|
} |
|
|
|
// 5. 网格内解决的项目的满意度
|
|
|
|
if (!CollectionUtils.isEmpty(resultSatisfactionScore)){ |
|
|
|
resultSatisfactionScore.forEach((k, v) -> { |
|
|
|
if (r.getGridId().equals(k)) { |
|
|
|
r.setSatisfactionRatio(v); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
// 6. 网格自治项目数
|
|
|
|
if (!CollectionUtils.isEmpty(autoMap)){ |
|
|
|
autoMap.forEach((k, v) -> { |
|
|
|
if (r.getGridId().equals(k)) { |
|
|
|
r.setSelfSolveProjectCount(v); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}); |
|
|
|
delGovernAbility(customerId, monthId); |
|
|
|
List<List<GovernAbilityGridMonthlyFormDTO>> resultList = ListUtils.partition(result, NumConstant.ONE_HUNDRED); |
|
|
|