bug修改提交

This commit is contained in:
huangzj
2023-08-29 14:24:31 +08:00
parent 5a68b0f29b
commit cddf6ed43b
3 changed files with 22 additions and 4 deletions

View File

@@ -221,6 +221,13 @@ public class StableDataServiceImpl implements StableDataService {
String frequency = Optional.ofNullable(commonStatisticalQueryParam.getFrequency()).orElse("");
List<StatisticalDataDTO> deviceRtData = commonService.getDeviceRtDataByTime(collect, data.getClassId(), data.getName()+frequency, data.getPhase(), commonStatisticalQueryParam.getValueType(),commonStatisticalQueryParam.getStartTime(),commonStatisticalQueryParam.getEndTime());
//获取对应的治理后的指标
if(data.getName().equals("Pq_ThdI")){
EleEpdPqd data1 = epdFeignClient.selectById("1a4c5741bd57bd815b361c53d627a891").getData();
List<StatisticalDataDTO> deviceRtData2 = commonService.getDeviceRtDataByTime(collect, data1.getClassId(), data1.getName()+frequency, data.getPhase(), commonStatisticalQueryParam.getValueType(),commonStatisticalQueryParam.getStartTime(),commonStatisticalQueryParam.getEndTime());
deviceRtData.addAll(deviceRtData2);
}
List<ThdDataVO> collect1 = deviceRtData.stream().map(temp -> {
ThdDataVO vo = new ThdDataVO();
vo.setLineId(temp.getLineId());
@@ -255,6 +262,13 @@ public class StableDataServiceImpl implements StableDataService {
String frequency = Optional.ofNullable(commonStatisticalQueryParam.getFrequency()).orElse("");
List<StatisticalDataDTO> deviceRtData = commonService.getDeviceRtDataByTime(collect, data.getClassId(), data.getName()+frequency, data.getPhase(), commonStatisticalQueryParam.getValueType(),commonStatisticalQueryParam.getStartTime(),commonStatisticalQueryParam.getEndTime());
//获取对应的治理后的指标
if(data.getName().equals("Pq_ThdI")){
EleEpdPqd data1 = epdFeignClient.selectById("1a4c5741bd57bd815b361c53d627a891").getData();
List<StatisticalDataDTO> deviceRtData2 = commonService.getDeviceRtDataByTime(collect, data1.getClassId(), data1.getName()+frequency, data.getPhase(), commonStatisticalQueryParam.getValueType(),commonStatisticalQueryParam.getStartTime(),commonStatisticalQueryParam.getEndTime());
deviceRtData.addAll(deviceRtData2);
}
List<ThdDataVO> collect1 = deviceRtData.stream().map(temp -> {
ThdDataVO vo = new ThdDataVO();
vo.setLineId(temp.getLineId());
@@ -270,7 +284,7 @@ public class StableDataServiceImpl implements StableDataService {
vo.setStatisticalIndex(data.getId());
return vo;
}).collect(Collectors.toList());
collect1 = collect1.stream().distinct().collect(Collectors.toList());
return collect1;
}