Explorar o código

add 智能泵加档、减档校验

A17404李放 %!s(int64=3) %!d(string=hai) anos
pai
achega
bae712eec0

+ 3 - 4
nb-system/src/main/java/com/nb/bus/websocket/listener/DeviceInfoListener.java

@@ -175,8 +175,7 @@ public class DeviceInfoListener {
 
             //所有事务处理完成后更新缓存信息
             cacheOperation.forEach(Supplier::get);
-            log.info("设备数据处理结束:{}",JSONUtil.toJsonStr(infoEvent.getContent()));
-            log.info("设备数据处理耗时:{}",(System.currentTimeMillis()-startTime));
+            log.info("设备数据处理结束:{},耗时【{}】",JSONUtil.toJsonStr(device),(System.currentTimeMillis()-startTime));
             return infusionHistory.getTenantId();
         }
     }
@@ -202,10 +201,10 @@ public class DeviceInfoListener {
                 log.warn("设备【{}】流速在缓存中不存在",device.getContinueDose());
             }else {
                 if(CompareUtil.compare(device.getContinueDose(),lastContinueDose)>0){
-                    log.info("消息【{}】,设备【{}】加档",device.getMsgId(),device.getDeviceId());
+                    log.info("消息【{}】,设备【{}】,当前流速【{}】,上一状态流速【{}】,加档",device.getMsgId(),device.getContinueDose(),lastContinueDose,device.getDeviceId());
                     device.setWarnFlow(FlowStatusEnum.Up);
                 }else if(CompareUtil.compare(device.getContinueDose(),lastContinueDose)<0){
-                    log.info("消息【{}】,设备【{}】减档",device.getMsgId(),device.getDeviceId());
+                    log.info("消息【{}】,设备【{}】,当前流速【{}】,上一状态流速【{}】,减档",device.getMsgId(),device.getContinueDose(),lastContinueDose,device.getDeviceId());
                     device.setWarnFlow(FlowStatusEnum.Down);
                 }else {
                     device.setWarnFlow(null);