|
|
@@ -108,7 +108,7 @@ public class CockpitStatsHandler { |
|
|
|
private List<CockpitStatsVO.MapProjectsData> convertMapProjectsData(CockpitStats cockpitStats) { |
|
|
|
List<CockpitStatsVO.MapProjectsData> mapProjectsDatas = Lists.newArrayList(); |
|
|
|
List<RegionDTO> regions = regionCacheHelper.listChildren(RegionConst.RC_LS, RegionConst.RL_CITY); |
|
|
|
regions = regions.stream().sorted(Comparator.comparing(RegionDTO::getRegionCode)).collect(Collectors.toList()); |
|
|
|
regions = regions.stream().filter(r -> r.getRegionLevel() != 2).sorted(Comparator.comparing(RegionDTO::getRegionCode)).collect(Collectors.toList()); |
|
|
|
for(RegionDTO region : regions){ |
|
|
|
CockpitStatsVO.MapProjectsData mapProjectsData = new CockpitStatsVO.MapProjectsData(); |
|
|
|
mapProjectsData.setRegionCode(region.getRegionCode()); |
|
|
@@ -133,7 +133,7 @@ public class CockpitStatsHandler { |
|
|
|
private List<CockpitStatsVO.ExpertRegion> buidExpertRegionData(CockpitStats cockpitStats) { |
|
|
|
List<CockpitStatsVO.ExpertRegion> regionData = Lists.newArrayList(); |
|
|
|
List<RegionDTO> regions = regionCacheHelper.listChildren(RegionConst.RC_LS, RegionConst.RL_CITY); |
|
|
|
regions = regions.stream().sorted(Comparator.comparing(RegionDTO::getRegionCode)).collect(Collectors.toList()); |
|
|
|
regions = regions.stream().filter(r -> r.getRegionLevel() != 2).sorted(Comparator.comparing(RegionDTO::getRegionCode)).collect(Collectors.toList()); |
|
|
|
|
|
|
|
List<CockpitStats> cs = cockpitStatsService.list(); |
|
|
|
Map<String, Integer> csMap = cs.stream().collect(Collectors.toMap(c -> c.getRegionCode() + c.getYear(), CockpitStats::getExpertTotalNum)); |
|
|
|