Commit 2e60d81c by 李小龙

fix

parent 9f2927c3
...@@ -47,9 +47,14 @@ public class FallAlarm implements IAlarm { ...@@ -47,9 +47,14 @@ public class FallAlarm implements IAlarm {
String deviceId = platDevice.getOriDeviceId(); String deviceId = platDevice.getOriDeviceId();
String personState = Convert.toStr(properties.get("personState")); String personState = Convert.toStr(properties.get("personState"));
AlarmRedisDTO alarmRedisDTO = RedisUtil.get(RedisConst.ALARM_DEVICE_FALL_ID + deviceId); AlarmRedisDTO alarmRedisDTO = RedisUtil.get(RedisConst.ALARM_DEVICE_FALL_ID + deviceId);
if(alarmRedisDTO==null){
alarmRedisDTO = new AlarmRedisDTO();
alarmRedisDTO.setAlarm(CommonEnum.NO.getValue());
}
if (StringUtils.equals(personState, CommonEnum.YES.getValue())) { if (StringUtils.equals(personState, CommonEnum.YES.getValue())) {
if (StringUtils.equals(alarmRedisDTO.getAlarm(),CommonEnum.YES.getValue())){ if (StringUtils.equals(alarmRedisDTO.getAlarm(),CommonEnum.YES.getValue())){
log.error("长者跌倒,已告警过,设备iot_id:"+deviceId); log.error("长者跌倒,已告警过,设备iot_id:"+deviceId);
return;
} }
notice(platAlarmCheckDTO); notice(platAlarmCheckDTO);
alarmRedisDTO.setAlarm(CommonEnum.YES.getValue()); alarmRedisDTO.setAlarm(CommonEnum.YES.getValue());
......
...@@ -119,7 +119,7 @@ mqtt: ...@@ -119,7 +119,7 @@ mqtt:
defaultTopic: /device/*/*/** defaultTopic: /device/*/*/**
timeout: 10 timeout: 10
keepalive: 60 keepalive: 60
msgSwitch: false msgSwitch: true
wx: wx:
miniapp: miniapp:
......
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