|
|
@ -136,7 +136,7 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
List<Integer> storage = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WIND_POWER, HomePageConstant.WATER_CONSERVANCY,HomePageConstant.PUMPING,HomePageConstant.GATE, HomePageConstant.ENERGY_STORAGE, |
|
|
|
List<Integer> storage = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WIND_POWER, HomePageConstant.WATER_CONSERVANCY,HomePageConstant.PUMPING,HomePageConstant.GATE, HomePageConstant.ENERGY_STORAGE, |
|
|
|
HomePageConstant.DISTRIBUTION_NETWORK, HomePageConstant.PHOTOVOLTAIC, HomePageConstant.WATER_AFFAIRS, HomePageConstant.CHARGE); |
|
|
|
HomePageConstant.DISTRIBUTION_NETWORK, HomePageConstant.PHOTOVOLTAIC, HomePageConstant.WATER_AFFAIRS, HomePageConstant.CHARGE); |
|
|
|
// 站点查询
|
|
|
|
// 站点查询
|
|
|
|
List<StationEntity> stationList = stationService.getStationType(serveType, storage, null); |
|
|
|
List<StationEntity> stationList = stationService.getStationType(serveType, storage, null,true); |
|
|
|
// 站点根据type类型分组
|
|
|
|
// 站点根据type类型分组
|
|
|
|
Map<Integer, List<StationEntity>> stationGrpMap = stationList.stream().collect(Collectors.groupingBy(StationEntity::getType)); |
|
|
|
Map<Integer, List<StationEntity>> stationGrpMap = stationList.stream().collect(Collectors.groupingBy(StationEntity::getType)); |
|
|
|
// 遍历分组之后的站点信息
|
|
|
|
// 遍历分组之后的站点信息
|
|
|
@ -240,7 +240,7 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
@Override |
|
|
|
@Override |
|
|
|
public void loadPowerData(String param,List<Integer> types, Integer serveType, int year) { |
|
|
|
public void loadPowerData(String param,List<Integer> types, Integer serveType, int year) { |
|
|
|
// 站点查询
|
|
|
|
// 站点查询
|
|
|
|
List<StationEntity> stationList = stationService.getStationType(serveType, types, null); |
|
|
|
List<StationEntity> stationList = stationService.getStationType(serveType, types, null,true); |
|
|
|
// 设备信息
|
|
|
|
// 设备信息
|
|
|
|
List<EminfoAndEmParamVo> devices = maintenanceTaskService.getEmInfoList(); |
|
|
|
List<EminfoAndEmParamVo> devices = maintenanceTaskService.getEmInfoList(); |
|
|
|
// 开始时间
|
|
|
|
// 开始时间
|
|
|
@ -351,7 +351,7 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
List<Integer> storage = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WIND_POWER, HomePageConstant.WATER_CONSERVANCY, HomePageConstant.PUMPING, HomePageConstant.GATE, HomePageConstant.ENERGY_STORAGE, |
|
|
|
List<Integer> storage = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WIND_POWER, HomePageConstant.WATER_CONSERVANCY, HomePageConstant.PUMPING, HomePageConstant.GATE, HomePageConstant.ENERGY_STORAGE, |
|
|
|
HomePageConstant.DISTRIBUTION_NETWORK, HomePageConstant.PHOTOVOLTAIC, HomePageConstant.WATER_AFFAIRS, HomePageConstant.CHARGE); |
|
|
|
HomePageConstant.DISTRIBUTION_NETWORK, HomePageConstant.PHOTOVOLTAIC, HomePageConstant.WATER_AFFAIRS, HomePageConstant.CHARGE); |
|
|
|
// 查询站点
|
|
|
|
// 查询站点
|
|
|
|
List<StationEntity> stationEntityList = stationService.getStationList(R.getData(),deptId,storage,serveType); |
|
|
|
List<StationEntity> stationEntityList = stationService.getStationList(R.getData(),deptId,storage,serveType,true); |
|
|
|
List<OldStationCountVo> list = new ArrayList<>(); |
|
|
|
List<OldStationCountVo> list = new ArrayList<>(); |
|
|
|
storage.forEach(item->{ |
|
|
|
storage.forEach(item->{ |
|
|
|
if(HomePageConstant.PUMPING.equals(item) || HomePageConstant.GATE.equals(item)){ |
|
|
|
if(HomePageConstant.PUMPING.equals(item) || HomePageConstant.GATE.equals(item)){ |
|
|
@ -516,7 +516,7 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
// 查询站点
|
|
|
|
// 查询站点
|
|
|
|
List<StationEntity> stationList = stationService.getStationList(R.getData(),deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE); |
|
|
|
List<StationEntity> stationList = stationService.getStationList(R.getData(),deptId,Collections.singletonList(HomePageConstant.HYDROPOWER),HomePageConstant.HYDROPOWER_SERVETYPE,true); |
|
|
|
if(CollectionUtil.isEmpty(stationList)){ |
|
|
|
if(CollectionUtil.isEmpty(stationList)){ |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
@ -624,7 +624,7 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
} |
|
|
|
} |
|
|
|
List<Integer> storage = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WIND_POWER, HomePageConstant.PHOTOVOLTAIC); |
|
|
|
List<Integer> storage = Arrays.asList(HomePageConstant.HYDROPOWER, HomePageConstant.WIND_POWER, HomePageConstant.PHOTOVOLTAIC); |
|
|
|
// 查询站点数据
|
|
|
|
// 查询站点数据
|
|
|
|
List<StationEntity> stationEntityList = stationService.getStationList(R.getData(),deptId, storage,HomePageConstant.HYDROPOWER_SERVETYPE); |
|
|
|
List<StationEntity> stationEntityList = stationService.getStationList(R.getData(),deptId, storage,HomePageConstant.HYDROPOWER_SERVETYPE,true); |
|
|
|
if(CollectionUtil.isEmpty(stationEntityList)){ |
|
|
|
if(CollectionUtil.isEmpty(stationEntityList)){ |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
@ -819,7 +819,7 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
private Map<Integer, List<Long>> getStorageMap(List<Dept> all,Integer serveType) { |
|
|
|
private Map<Integer, List<Long>> getStorageMap(List<Dept> all,Integer serveType) { |
|
|
|
Map<Integer, List<Long>> map = new HashMap<>(); |
|
|
|
Map<Integer, List<Long>> map = new HashMap<>(); |
|
|
|
// 储能
|
|
|
|
// 储能
|
|
|
|
List<StationEntity> energy = this.stationService.getStationType(serveType,Collections.singletonList(HomePageConstant.ENERGY_STORAGE),null); |
|
|
|
List<StationEntity> energy = this.stationService.getStationType(serveType,Collections.singletonList(HomePageConstant.ENERGY_STORAGE),null,true); |
|
|
|
if(CollectionUtil.isNotEmpty(energy)){ |
|
|
|
if(CollectionUtil.isNotEmpty(energy)){ |
|
|
|
List<Long> refDeptList = energy.stream().map(StationEntity::getRefDept).collect(Collectors.toList()); |
|
|
|
List<Long> refDeptList = energy.stream().map(StationEntity::getRefDept).collect(Collectors.toList()); |
|
|
|
if(CollectionUtil.isNotEmpty(refDeptList)){ |
|
|
|
if(CollectionUtil.isNotEmpty(refDeptList)){ |
|
|
@ -827,7 +827,7 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 水利
|
|
|
|
// 水利
|
|
|
|
List<StationEntity> water = this.stationService.getStationType(serveType,HomePageConstant.waterList,null); |
|
|
|
List<StationEntity> water = this.stationService.getStationType(serveType,HomePageConstant.waterList,null,true); |
|
|
|
if(CollectionUtil.isNotEmpty(water)){ |
|
|
|
if(CollectionUtil.isNotEmpty(water)){ |
|
|
|
List<Long> refDeptList = water.stream().map(StationEntity::getRefDept).collect(Collectors.toList()); |
|
|
|
List<Long> refDeptList = water.stream().map(StationEntity::getRefDept).collect(Collectors.toList()); |
|
|
|
if(CollectionUtil.isNotEmpty(refDeptList)){ |
|
|
|
if(CollectionUtil.isNotEmpty(refDeptList)){ |
|
|
@ -1526,7 +1526,7 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
OldHydropowerScoreVo hydropowerScoreVo = new OldHydropowerScoreVo(); |
|
|
|
OldHydropowerScoreVo hydropowerScoreVo = new OldHydropowerScoreVo(); |
|
|
|
hydropowerScoreVo.setDepartId(key); |
|
|
|
hydropowerScoreVo.setDepartId(key); |
|
|
|
// 站点查询
|
|
|
|
// 站点查询
|
|
|
|
List<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), value); |
|
|
|
List<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), value,true); |
|
|
|
if (CollectionUtil.isEmpty(stationList)) { |
|
|
|
if (CollectionUtil.isEmpty(stationList)) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -2074,7 +2074,7 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
getChildDept(departList, dept.getId(), list); |
|
|
|
getChildDept(departList, dept.getId(), list); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
List<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), list); |
|
|
|
List<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), list,true); |
|
|
|
if (CollectionUtil.isEmpty(stationList)) { |
|
|
|
if (CollectionUtil.isEmpty(stationList)) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
@ -2160,7 +2160,7 @@ public class HomePageServiceImpl implements IHomePageService { |
|
|
|
if (CollectionUtil.isEmpty(deptList)) { |
|
|
|
if (CollectionUtil.isEmpty(deptList)) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
List<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), deptList); |
|
|
|
List<StationEntity> stationList = stationService.getStationType(HomePageConstant.HYDROPOWER_SERVETYPE, Collections.singletonList(HomePageConstant.HYDROPOWER), deptList,true); |
|
|
|
if (CollectionUtil.isEmpty(deptList)) { |
|
|
|
if (CollectionUtil.isEmpty(deptList)) { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|