|
@@ -775,9 +775,12 @@ public class MonitorDataReportServiceImpl implements MonitorDataReportService {
|
|
|
if (monitorDataEntity != null && monitorDataEntity.getDataValues() != null && monitorDataEntity.getDataValues().size() > 0) {
|
|
|
monitorDataEntity.getDataValues().stream()
|
|
|
.filter(monitorDataValueEntity -> monitorDataValueEntity.getAttributeId().equals(deviceWaterDetail.getAttributeId()))
|
|
|
- .forEach(monitorDataValueEntity ->
|
|
|
+ .forEach(monitorDataValueEntity -> {
|
|
|
//累计当前压力
|
|
|
- sceneWaterAmount.setWaterAmount(sceneWaterAmount.getWaterAmount().add(new BigDecimal(monitorDataValueEntity.getDataValue())))
|
|
|
+ if (monitorDataValueEntity.getDataValue() != null) {
|
|
|
+ sceneWaterAmount.setWaterAmount(sceneWaterAmount.getWaterAmount().add(new BigDecimal(monitorDataValueEntity.getDataValue())));
|
|
|
+ }
|
|
|
+ }
|
|
|
);
|
|
|
}
|
|
|
});
|
|
@@ -914,6 +917,7 @@ public class MonitorDataReportServiceImpl implements MonitorDataReportService {
|
|
|
|
|
|
//查询设备编码
|
|
|
List<String> deviceCodes = monitorDataReportMapper.selectDeviceCode(loginUser.getTenantId(),loginUser.getType(),loginUser.getPermissonType(),loginUser.getProgramItemList());
|
|
|
+ deviceCodes.add("300220070692");
|
|
|
//根据编码获取redis中的实时数据
|
|
|
List<MonitorDataEntity> monitorDataEntities = new ArrayList<>();
|
|
|
for (String deviceCode : deviceCodes) {
|