Browse Source

绩效改为星级

master
PoffyZhang 1 year ago
parent
commit
8987327026
2 changed files with 3 additions and 3 deletions
  1. +2
    -2
      pmapi/src/main/java/com/ningdatech/pmapi/dashboard/handle/CockpitStatsHandler.java
  2. +1
    -1
      pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java

+ 2
- 2
pmapi/src/main/java/com/ningdatech/pmapi/dashboard/handle/CockpitStatsHandler.java View File

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


+ 1
- 1
pmapi/src/main/java/com/ningdatech/pmapi/scheduler/task/CockpitStatsStatisticsTask.java View File

@@ -104,7 +104,7 @@ public class CockpitStatsStatisticsTask {
} }


List<RegionDTO> regions = regionCacheHelper.listChildren(RegionConst.RC_LS, RegionConst.RL_CITY); List<RegionDTO> regions = regionCacheHelper.listChildren(RegionConst.RC_LS, RegionConst.RL_CITY);
regions = regions.stream().filter(r -> r.getRegionLevel() != 2).collect(Collectors.toList());
for(RegionDTO regionDto : regions){ for(RegionDTO regionDto : regions){
res.add(statisticsData(regionDto.getRegionCode(),regionDto.getRegionName(),0)); res.add(statisticsData(regionDto.getRegionCode(),regionDto.getRegionName(),0));
for(Integer year : years){ for(Integer year : years){


Loading…
Cancel
Save