|
@@ -25,7 +25,8 @@ public class DataStore {
|
|
|
|
|
|
|
|
|
|
public <T> void setData(List<T> t, String stationCode) {
|
|
public <T> void setData(List<T> t, String stationCode) {
|
|
- this.map.put(stationCode + t.get(0).getClass().getName(), t);
|
|
|
|
|
|
+ if (t.size()>0)
|
|
|
|
+ this.map.put(stationCode + t.get(0).getClass().getName(), t);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -69,8 +70,8 @@ public class DataStore {
|
|
ISysConfigService configService = SpringUtils.getBean(ISysConfigService.class);
|
|
ISysConfigService configService = SpringUtils.getBean(ISysConfigService.class);
|
|
ElectricFieldService electricFieldService = SpringUtils.getBean(ElectricFieldService.class);
|
|
ElectricFieldService electricFieldService = SpringUtils.getBean(ElectricFieldService.class);
|
|
PowerStationStatusDataService powerStationStatusDataService = SpringUtils.getBean(PowerStationStatusDataService.class);
|
|
PowerStationStatusDataService powerStationStatusDataService = SpringUtils.getBean(PowerStationStatusDataService.class);
|
|
- ForecastPowerShortTermStationService forecastPowerShortTermStationService = SpringUtils.getBean(ForecastPowerShortTermStationService.class);
|
|
|
|
- ForecastPowerUltraShortTermStationService forecastPowerUltraShortTermStationService = SpringUtils.getBean(ForecastPowerUltraShortTermStationService.class);
|
|
|
|
|
|
+ ForecastPowerShortTermRegulationService forecastPowerShortTermRegulationService = SpringUtils.getBean(ForecastPowerShortTermRegulationService.class);
|
|
|
|
+ ForecastPowerUltraShortTermRegulationService forecastPowerUltraShortTermRegulationService = SpringUtils.getBean(ForecastPowerUltraShortTermRegulationService.class);
|
|
WindTowerStatusDataService windTowerStatusDataService = SpringUtils.getBean(WindTowerStatusDataService.class);
|
|
WindTowerStatusDataService windTowerStatusDataService = SpringUtils.getBean(WindTowerStatusDataService.class);
|
|
WeatherStationStatusDataService weatherStationStatusDataService = SpringUtils.getBean(WeatherStationStatusDataService.class);
|
|
WeatherStationStatusDataService weatherStationStatusDataService = SpringUtils.getBean(WeatherStationStatusDataService.class);
|
|
|
|
|
|
@@ -102,8 +103,8 @@ public class DataStore {
|
|
}
|
|
}
|
|
|
|
|
|
Map<String, List<PowerStationStatusData>> powerStationStatusDataListMap = powerStationStatusDataService.findByTimeBetween(dayStartTime, dayEndTime).stream().collect(Collectors.groupingBy(PowerStationStatusData::getStationCode, Collectors.toList()));
|
|
Map<String, List<PowerStationStatusData>> powerStationStatusDataListMap = powerStationStatusDataService.findByTimeBetween(dayStartTime, dayEndTime).stream().collect(Collectors.groupingBy(PowerStationStatusData::getStationCode, Collectors.toList()));
|
|
- Map<String, List<ForecastPowerShortTermStation>> forecastPowerShortTermStationListMap = forecastPowerShortTermStationService.findByForecastTimeBetweenAndHowLongAgo(dayStartTime, dayEndTime, dqAgo).stream().collect(Collectors.groupingBy(ForecastPowerShortTermStation::getStationCode, Collectors.toList()));
|
|
|
|
- Map<String, List<ForecastPowerUltraShortTermStation>> forecastPowerUltraShortTermStationListMap = forecastPowerUltraShortTermStationService.findByForecastTimeBetweenAndHowLongAgo(dayStartTime, dayEndTime, cdqAgo).stream().collect(Collectors.groupingBy(ForecastPowerUltraShortTermStation::getStationCode, Collectors.toList()));
|
|
|
|
|
|
+ Map<String, List<ForecastPowerShortTermRegulation>> forecastPowerShortTermRegulationListMap = forecastPowerShortTermRegulationService.findByForecastTimeBetweenAndHowLongAgo(dayStartTime, dayEndTime, dqAgo).stream().collect(Collectors.groupingBy(ForecastPowerShortTermRegulation::getStationCode, Collectors.toList()));
|
|
|
|
+ Map<String, List<ForecastPowerUltraShortTermRegulation>> forecastPowerUltraShortTermRegulationListMap = forecastPowerUltraShortTermRegulationService.findByForecastTimeBetweenAndHowLongAgo(dayStartTime, dayEndTime, cdqAgo).stream().collect(Collectors.groupingBy(ForecastPowerUltraShortTermRegulation::getStationCode, Collectors.toList()));
|
|
Map<String, List<WindTowerStatusData>> windTowerStatusDataListMap = windTowerStatusDataService.findByBetweenTimeAndStationCode(dayStartTime, dayEndTime, null).stream().collect(Collectors.groupingBy(WindTowerStatusData::getStationCode, Collectors.toList()));
|
|
Map<String, List<WindTowerStatusData>> windTowerStatusDataListMap = windTowerStatusDataService.findByBetweenTimeAndStationCode(dayStartTime, dayEndTime, null).stream().collect(Collectors.groupingBy(WindTowerStatusData::getStationCode, Collectors.toList()));
|
|
Map<String, List<WeatherStationStatusData>> weatherStationStatusDataListMap = weatherStationStatusDataService.findByBetweenTimeAndStationCode(dayStartTime, dayEndTime, null).stream().collect(Collectors.groupingBy(WeatherStationStatusData::getStationCode, Collectors.toList()));
|
|
Map<String, List<WeatherStationStatusData>> weatherStationStatusDataListMap = weatherStationStatusDataService.findByBetweenTimeAndStationCode(dayStartTime, dayEndTime, null).stream().collect(Collectors.groupingBy(WeatherStationStatusData::getStationCode, Collectors.toList()));
|
|
|
|
|
|
@@ -127,15 +128,15 @@ public class DataStore {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- if (forecastPowerShortTermStationListMap.containsKey(stationCode)) {
|
|
|
|
- List<ForecastPowerShortTermStation> forecastPowerShortTermStations = forecastPowerShortTermStationListMap.get(stationCode);
|
|
|
|
- setData(forecastPowerShortTermStations, stationCode);
|
|
|
|
|
|
+ if (forecastPowerShortTermRegulationListMap.containsKey(stationCode)) {
|
|
|
|
+ List<ForecastPowerShortTermRegulation> forecastPowerShortTermRegulations = forecastPowerShortTermRegulationListMap.get(stationCode);
|
|
|
|
+ setData(forecastPowerShortTermRegulations, stationCode);
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
- if (forecastPowerUltraShortTermStationListMap.containsKey(stationCode)) {
|
|
|
|
- List<ForecastPowerUltraShortTermStation> forecastPowerUltraShortTermStations = forecastPowerUltraShortTermStationListMap.get(stationCode);
|
|
|
|
- setData(forecastPowerUltraShortTermStations, stationCode);
|
|
|
|
|
|
+ if (forecastPowerUltraShortTermRegulationListMap.containsKey(stationCode)) {
|
|
|
|
+ List<ForecastPowerUltraShortTermRegulation> forecastPowerUltraShortTermRegulations = forecastPowerUltraShortTermRegulationListMap.get(stationCode);
|
|
|
|
+ setData(forecastPowerUltraShortTermRegulations, stationCode);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|