Commit bd0b5024 authored by wujiang's avatar wujiang

修改计算天

parent 1d580963
...@@ -196,7 +196,7 @@ public class TdengineTimeServiceImpl { ...@@ -196,7 +196,7 @@ public class TdengineTimeServiceImpl {
// saveBatchFan(fanHealthIndices, "fan_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), levelList); // saveBatchFan(fanHealthIndices, "fan_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), levelList);
List<IdxBizFanHealthLevel> levelList = idxBizFanHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, "测点").last("limit 4")); List<IdxBizFanHealthLevel> levelList = idxBizFanHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, "测点").last("limit 4"));
List<FanHealthIndex> fanHealthIndices = fanHealthIndexMapper.getInfoListByGroupByCdFan(startTime, "fan_health_index_hour", "测点"); List<FanHealthIndex> fanHealthIndices = fanHealthIndexMapper.getInfoListByGroupByCdFan(startTime, "fan_health_index_hour", "测点");
saveBatchFan(fanHealthIndices, "pv_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), levelList); saveBatchFan(fanHealthIndices, "fan_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), levelList);
// 子系统 // 子系统
List<IdxBizFanHealthLevel> levelListZxt = idxBizFanHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, "子系统").last("limit 4")); List<IdxBizFanHealthLevel> levelListZxt = idxBizFanHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, "子系统").last("limit 4"));
List<FanHealthIndex> fanHealthIndicesZxt = fanHealthIndexService.getInfoListByGroupByZxtFan(startTime, "fan_health_index_day", "测点"); List<FanHealthIndex> fanHealthIndicesZxt = fanHealthIndexService.getInfoListByGroupByZxtFan(startTime, "fan_health_index_day", "测点");
...@@ -543,14 +543,17 @@ public class TdengineTimeServiceImpl { ...@@ -543,14 +543,17 @@ public class TdengineTimeServiceImpl {
recOriginalDate = DateUtil.offsetDay(recOriginalDate, -1); recOriginalDate = DateUtil.offsetDay(recOriginalDate, -1);
String recDate = DateUtil.format(recOriginalDate, "yyyy-MM-dd"); String recDate = DateUtil.format(recOriginalDate, "yyyy-MM-dd");
String startTime = DateUtils.dateFormat(DateUtils.dateAddHours(new Date(), -32), DateUtils.DATE_TIME_PATTERN); String startTime = DateUtils.dateFormat(DateUtils.dateAddHours(new Date(), -32), DateUtils.DATE_TIME_PATTERN);
// 全域【所有 / 全国】 // 全域【所有 / 全国】
List<HealthIndexDTO> healthIndexQgDTOS = fanHealthIndexService.getInfoListByGroupByQg(startTime, "fan_health_index_day", "fan_health_index_day", "片区"); List<HealthIndexDTO> healthIndexQgDTOS = fanHealthIndexService.getInfoListByGroupByQg(startTime, "fan_health_index_day", "pv_health_index_day", "片区");
List<IdxBizFanHealthLevel> levelListQg = idxBizFanHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, "全域").last("limit 4")); List<IdxBizFanHealthLevel> levelListQg = idxBizFanHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizFanHealthLevel>().eq(IdxBizFanHealthLevel::getAnalysisObjType, "全域").last("limit 4"));
List<FanHealthIndex> fanHealthIndicesQg = healthIndexQgDTOS.stream().map(o -> fanHealthIndexService.toFanHealthIndex(o)).collect(Collectors.toList()); List<FanHealthIndex> fanHealthIndicesQg = healthIndexQgDTOS.stream().map(o -> fanHealthIndexService.toFanHealthIndex(o)).collect(Collectors.toList());
saveBatchFan(fanHealthIndicesQg, "fan_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), levelListQg); // saveBatchFan(fanHealthIndicesQg, "fan_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), levelListQg);
// 全域【所有 / 全国】 // 全域【所有 / 全国】
List<IdxBizPvHealthLevel> pvLevelListQg = idxBizPvHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizPvHealthLevel>().eq(IdxBizPvHealthLevel::getAnalysisObjType, "全域").last("limit 4")); List<IdxBizPvHealthLevel> pvLevelListQg = idxBizPvHealthLevelMapper.selectList(new LambdaQueryWrapper<IdxBizPvHealthLevel>().eq(IdxBizPvHealthLevel::getAnalysisObjType, "全域").last("limit 4"));
List<PvHealthIndex> pvHealthIndicesQg = healthIndexQgDTOS.stream().map(o -> fanHealthIndexService.toPvHealthIndex(o)).collect(Collectors.toList()); List<PvHealthIndex> pvHealthIndicesQg = healthIndexQgDTOS.stream().map(o -> fanHealthIndexService.toPvHealthIndex(o)).collect(Collectors.toList());
saveBatchPv(pvHealthIndicesQg, "pv_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), pvLevelListQg); // saveBatchPv(pvHealthIndicesQg, "pv_health_index_day", recDate, WarningPeriodEnum.DAY.getName(), pvLevelListQg);
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment