|
|
|
@ -346,7 +346,7 @@ public class HzimsDataServiceImpl implements HzimsDataService {
|
|
|
|
|
calendar.add(Calendar.DAY_OF_MONTH,-29); |
|
|
|
|
String startTime = DateUtil.format(calendar.getTime(),DateUtil.PATTERN_DATETIME); |
|
|
|
|
// 查询水位数据
|
|
|
|
|
List<AnalyseDataTaosVO> waters = this.water(startTime,endTime,stationCode); |
|
|
|
|
List<AnalyseDataTaosVO> waters = this.water(startTime,endTime,stationCode,3); |
|
|
|
|
// TODO 查询降雨数据
|
|
|
|
|
// 近30天水位、降雨量
|
|
|
|
|
List<String> days = this.get30Day(); |
|
|
|
@ -438,7 +438,7 @@ public class HzimsDataServiceImpl implements HzimsDataService {
|
|
|
|
|
// 查询功率数据
|
|
|
|
|
List<AnalyseDataTaosVO> loads = this.loads(startTime,endTime,deptId); |
|
|
|
|
// 查询水位数据
|
|
|
|
|
List<AnalyseDataTaosVO> waters = this.water(startTime,endTime,stationCode); |
|
|
|
|
List<AnalyseDataTaosVO> waters = this.water(startTime,endTime,stationCode,2); |
|
|
|
|
return hours.stream().map(hour ->{ |
|
|
|
|
LoadWaterLevelVo loadWater = new LoadWaterLevelVo(); |
|
|
|
|
Date time = DateUtil.parse(hour,"yyyy-MM-dd HH"); |
|
|
|
@ -468,13 +468,13 @@ public class HzimsDataServiceImpl implements HzimsDataService {
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 查询24小时水位数据 |
|
|
|
|
* 查询水位数据 |
|
|
|
|
* @param startTime |
|
|
|
|
* @param endTime |
|
|
|
|
* @param stationCode |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
private List<AnalyseDataTaosVO> water(String startTime, String endTime, String stationCode) { |
|
|
|
|
private List<AnalyseDataTaosVO> water(String startTime, String endTime, String stationCode,Integer cycleType) { |
|
|
|
|
// 查询模型站点
|
|
|
|
|
HzimsAnalyzeModelStationEntity model = modelStationService.getOne(Wrappers.<HzimsAnalyzeModelStationEntity>lambdaQuery() |
|
|
|
|
.eq(HzimsAnalyzeModelStationEntity::getStationId,stationCode) |
|
|
|
@ -483,7 +483,7 @@ public class HzimsDataServiceImpl implements HzimsDataService {
|
|
|
|
|
return new ArrayList<>(); |
|
|
|
|
} |
|
|
|
|
// 水位查询
|
|
|
|
|
return dataService.periodTargetData(startTime,endTime,3,3,model.getInstanceCode(),HomePageConstant.FRONT_WATER_LEVEL); |
|
|
|
|
return dataService.periodTargetData(startTime,endTime,3,cycleType,model.getInstanceCode(),HomePageConstant.FRONT_WATER_LEVEL); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|