refactor(service):更新方法调用从getDeviceRtDataByTime到getNewDeviceRtDataByTime

This commit is contained in:
贾同学
2025-11-13 09:47:32 +08:00
parent ce0b9892c2
commit 400b9fd9c1

View File

@@ -797,9 +797,8 @@ public class CsGroupServiceImpl extends ServiceImpl<CsGroupMapper, CsGroup> impl
Double pt = finalCsLinePO.getPtRatio(); Double pt = finalCsLinePO.getPtRatio();
if(CollectionUtil.isNotEmpty(trendDataQueryParam.getList())) { if(CollectionUtil.isNotEmpty(trendDataQueryParam.getList())) {
for (TrendDataQueryParam param : trendDataQueryParam.getList()) { for (TrendDataQueryParam param : trendDataQueryParam.getList()) {
List<EleEpdPqd> eleEpdPqds = csStatisticalSetFeignClient.queryStatisticalSelect(param.getStatisticalId()).getData(); List<EleEpdPqd> eleEpdPqds = csStatisticalSetFeignClient.queryStatisticalSelect(param.getStatisticalId()).getData();
eleEpdPqds.forEach(epdPqd -> { for (EleEpdPqd epdPqd : eleEpdPqds) {
CommonQueryParam commonQueryParam = new CommonQueryParam(); CommonQueryParam commonQueryParam = new CommonQueryParam();
commonQueryParam.setLineId(finalCsLinePO.getLineId()); commonQueryParam.setLineId(finalCsLinePO.getLineId());
commonQueryParam.setTableName(influxDbParamUtil.getTableNameByClassId(epdPqd.getClassId())); commonQueryParam.setTableName(influxDbParamUtil.getTableNameByClassId(epdPqd.getClassId()));
@@ -813,7 +812,7 @@ public class CsGroupServiceImpl extends ServiceImpl<CsGroupMapper, CsGroup> impl
commonQueryParam.setClDid(influxDbParamUtil.getClDidByLineId(finalCsLinePO.getLineId())); commonQueryParam.setClDid(influxDbParamUtil.getClDidByLineId(finalCsLinePO.getLineId()));
List<StatisticalDataDTO> deviceRtData = commonService.getDeviceRtDataByTime(Collections.singletonList(commonQueryParam)); List<StatisticalDataDTO> deviceRtData = commonService.getNewDeviceRtDataByTime(Collections.singletonList(commonQueryParam));
List<ThdDataVO> collect1 = deviceRtData.stream().map(temp -> { List<ThdDataVO> collect1 = deviceRtData.stream().map(temp -> {
String unit; String unit;
ThdDataVO vo = new ThdDataVO(); ThdDataVO vo = new ThdDataVO();
@@ -927,7 +926,7 @@ public class CsGroupServiceImpl extends ServiceImpl<CsGroupMapper, CsGroup> impl
return vo; return vo;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
result.addAll(collect1); result.addAll(collect1);
}); }
} }
} }
return result; return result;