Commit eaa4fc32 by 汪志阳

fix:离床预警多个不同config

parent 8be6c5a8
...@@ -134,7 +134,8 @@ public class OffBedAlarm implements IAlarm { ...@@ -134,7 +134,8 @@ public class OffBedAlarm implements IAlarm {
boolean over = (Math.abs(Duration.between(LocalDateTime.now(), startTime).toMillis())) / 1000 >= duration * 60; boolean over = (Math.abs(Duration.between(LocalDateTime.now(), startTime).toMillis())) / 1000 >= duration * 60;
if (over) { if (over) {
platAlarmCheckDTO.setAbnormalValue(String.valueOf(localDateLong - firstOffBedLong)); platAlarmCheckDTO.setAbnormalValue(String.valueOf(localDateLong - firstOffBedLong));
log.info("离床告警离床时间在范围前,发送预警"); platAlarmCheckDTO.setPlatAlarmConfig(config);
log.info("离床告警离床时间在范围前,发送预警,配置:{}", config);
noticeAlarm(alarmRedisDTO, platAlarmCheckDTO, deviceId); noticeAlarm(alarmRedisDTO, platAlarmCheckDTO, deviceId);
return; return;
} }
...@@ -145,7 +146,8 @@ public class OffBedAlarm implements IAlarm { ...@@ -145,7 +146,8 @@ public class OffBedAlarm implements IAlarm {
boolean isInRange = LocalDateTime.now().isAfter(startTime) && LocalDateTime.now().isBefore(endTime); boolean isInRange = LocalDateTime.now().isAfter(startTime) && LocalDateTime.now().isBefore(endTime);
if (isOffBedValid && isInRange && isOverTime) { if (isOffBedValid && isInRange && isOverTime) {
platAlarmCheckDTO.setAbnormalValue(String.valueOf(localDateLong - firstOffBedLong)); platAlarmCheckDTO.setAbnormalValue(String.valueOf(localDateLong - firstOffBedLong));
log.info("离床告警离床时间在范围时间内(小于范围结束时间-持续分钟)"); platAlarmCheckDTO.setPlatAlarmConfig(config);
log.info("离床告警离床时间在范围时间内(小于范围结束时间-持续分钟),配置:{}", config);
noticeAlarm(alarmRedisDTO, platAlarmCheckDTO, deviceId); noticeAlarm(alarmRedisDTO, platAlarmCheckDTO, deviceId);
return; return;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment