Explorar el Código

更新压力值或状态值

wangyangyang hace 4 años
padre
commit
73468d8b3e

+ 2 - 2
sms_water/src/main/java/com/huaxu/controller/MonitorInfoController.java

@@ -168,8 +168,8 @@ public class MonitorInfoController {
         parm.setDeviceId(item.getDeviceId());
         parm.setAttributeId(item.getAttributeId());
         parm.setType(type);
-        if (type == 4) {
-            //更新压力值
+        if (type == 4||type == 3) {
+            //更新压力值或状态值
             item.setAttributeValue(monitorDataReportService.getDeviceAttributeValue(item.getDeviceCode(),item.getAttributeId()).setScale(3,BigDecimal.ROUND_HALF_UP).doubleValue());
         }
         DeviceSetupRecordEntity recordEntity = deviceSetupRecordService.selectLastOne(parm);