Browse Source

#演示大屏

zhongwei
yang_shj 9 months ago
parent
commit
1f35ad9916
  1. 10
      hzims-service/operational/src/main/java/com/hnac/hzims/operational/data/service/impl/HzimsDataServiceImpl.java

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

Loading…
Cancel
Save