diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/data/service/impl/HzimsDataServiceImpl.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/data/service/impl/HzimsDataServiceImpl.java index d96bdbe..fa6e2a5 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/data/service/impl/HzimsDataServiceImpl.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/data/service/impl/HzimsDataServiceImpl.java @@ -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 waters = this.water(startTime,endTime,stationCode); + List waters = this.water(startTime,endTime,stationCode,3); // TODO 查询降雨数据 // 近30天水位、降雨量 List days = this.get30Day(); @@ -438,7 +438,7 @@ public class HzimsDataServiceImpl implements HzimsDataService { // 查询功率数据 List loads = this.loads(startTime,endTime,deptId); // 查询水位数据 - List waters = this.water(startTime,endTime,stationCode); + List 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 water(String startTime, String endTime, String stationCode) { + private List water(String startTime, String endTime, String stationCode,Integer cycleType) { // 查询模型站点 HzimsAnalyzeModelStationEntity model = modelStationService.getOne(Wrappers.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); }