|
|
|
@ -1539,6 +1539,10 @@ public class HydropowerServiceImpl implements HydropowerService {
|
|
|
|
|
Map<String, HeWeatherWeatherDailyResponse> weekWeather = this.weatherService.getWeekWeather(stations.stream().map(StationEntity::getCode).collect(Collectors.toList())); |
|
|
|
|
// 实时监测点数据
|
|
|
|
|
List<HydropowerUnitRealVo> reals = (List<HydropowerUnitRealVo>) redisTemplate.opsForValue().get(load_hydropower_unit_real_key); |
|
|
|
|
/** |
|
|
|
|
* 水位 |
|
|
|
|
*/ |
|
|
|
|
List<WaterLevelVo> levelList = (List<WaterLevelVo>) redisTemplate.opsForValue().get(loadwater_level_key); |
|
|
|
|
return stations.stream().map(station -> { |
|
|
|
|
AppHydropowerStationVo hydropower = new AppHydropowerStationVo(); |
|
|
|
|
hydropower.setDeptId(station.getRefDept()); |
|
|
|
@ -1582,6 +1586,13 @@ public class HydropowerServiceImpl implements HydropowerService {
|
|
|
|
|
}).sorted(Comparator.comparing(AppHydropowerDeviceVo::getOrd)).collect(Collectors.toList())); |
|
|
|
|
hydropower.setLoadUnit(hydropower.getDevices().get(0).getLoadUnit()); |
|
|
|
|
} |
|
|
|
|
if(!CollectionUtil.isEmpty(levelList)){ |
|
|
|
|
List<WaterLevelVo> validList = levelList.stream().filter(o-> station.getCode().equals(o.getStationCode())).collect(Collectors.toList()); |
|
|
|
|
if(!CollectionUtil.isEmpty(validList)){ |
|
|
|
|
WaterLevelVo level = validList.get(0); |
|
|
|
|
hydropower.setFrontWaterLevel(level.getFrontWaterLevel()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return hydropower; |
|
|
|
|
}).sorted(Comparator.comparing(AppHydropowerStationVo::getSort)).collect(Collectors.toList()); |
|
|
|
|
} |
|
|
|
|