A17404李放 3 лет назад
Родитель
Сommit
3e9c5ed96c

+ 6 - 4
nb-system/src/main/java/com/nb/bus/service/LocalBusDeviceAlarmService.java

@@ -90,11 +90,13 @@ public class LocalBusDeviceAlarmService extends BaseService<BusDeviceAlarmMapper
            //无警报信息,存储失败
            return false;
        }
+       if(infusionHistoryEntity!=null){
+           BusDeviceAlarmEntity existAlarm = BusDeviceAlarmEntity.parseRunning(infusionHistoryEntity);
+           if (entity.signParm().equalsIgnoreCase(existAlarm.signParm())) {
+               return false;
+           }
+       }
 
-        BusDeviceAlarmEntity existAlarm = BusDeviceAlarmEntity.parseRunning(infusionHistoryEntity);
-        if (entity.signParm().equalsIgnoreCase(existAlarm.signParm())) {
-            return false;
-        }
         //再判断是否报警或提示是否发生重复
         //满足以上条件进行保存
         return super.save(entity);