2023-05-22 16:20:46 优化完善温度传感器查询接口,补充空判断处理!

master
魔神煜修罗皇 2 years ago
parent 3d928674fd
commit bd8e3dd33c
  1. 2
      psdc-business/src/main/java/com/psdc/service/impl/PsdcThermometerHtdataServiceImpl.java

@ -122,6 +122,7 @@ public class PsdcThermometerHtdataServiceImpl implements IPsdcThermometerHtdataS
List<PsdcThermometerDataRes> dataResList = psdcThermometerRtdataMapper.selWenDu(SecurityUtils.getUserId(), 16); List<PsdcThermometerDataRes> dataResList = psdcThermometerRtdataMapper.selWenDu(SecurityUtils.getUserId(), 16);
for (PsdcThermometerDataRes dec : dataResList ){ for (PsdcThermometerDataRes dec : dataResList ){
PsdcThermometerDataRes dataRes = psdcThermometerRtdataMapper.queryById(dec.getDeviceId(), sdf.format(date)); PsdcThermometerDataRes dataRes = psdcThermometerRtdataMapper.queryById(dec.getDeviceId(), sdf.format(date));
if (null != dataRes){
List<PsdcThermometerHtdata> htdata = psdcThermometerHtdataMapper.selTodayThermometer(dec.getDeviceId(), tb, te); List<PsdcThermometerHtdata> htdata = psdcThermometerHtdataMapper.selTodayThermometer(dec.getDeviceId(), tb, te);
List<Double> listTemp = new ArrayList(); // 今天历史温度集合 List<Double> listTemp = new ArrayList(); // 今天历史温度集合
@ -145,6 +146,7 @@ public class PsdcThermometerHtdataServiceImpl implements IPsdcThermometerHtdataS
map3.put("times", times); map3.put("times", times);
ary.add(map3); ary.add(map3);
} }
}
return ary; return ary;

Loading…
Cancel
Save