Commit bfbb7acc by 杨伟程
parents 7385367b 109e82a8
......@@ -50,6 +50,7 @@ public class FallAlarm implements IAlarm {
if(alarmRedisDTO==null){
alarmRedisDTO = new AlarmRedisDTO();
alarmRedisDTO.setAlarm(CommonEnum.NO.getValue());
RedisUtil.set(RedisConst.ALARM_DEVICE_FALL_ID+ deviceId, alarmRedisDTO);
}
if (StringUtils.equals(personState, CommonEnum.YES.getValue())) {
if (StringUtils.equals(alarmRedisDTO.getAlarm(),CommonEnum.YES.getValue())){
......@@ -58,10 +59,12 @@ public class FallAlarm implements IAlarm {
}
notice(platAlarmCheckDTO);
alarmRedisDTO.setAlarm(CommonEnum.YES.getValue());
RedisUtil.set(RedisConst.ALARM_DEVICE_FALL_ID, alarmRedisDTO);
RedisUtil.set(RedisConst.ALARM_DEVICE_FALL_ID+ deviceId, alarmRedisDTO);
} else {
if(StringUtils.equals(alarmRedisDTO.getAlarm(),CommonEnum.YES.getValue())) {
alarmRedisDTO.setAlarm(CommonEnum.NO.getValue());
RedisUtil.set(RedisConst.ALARM_DEVICE_FALL_ID, alarmRedisDTO);
RedisUtil.set(RedisConst.ALARM_DEVICE_FALL_ID+ deviceId, alarmRedisDTO);
}
}
}
......
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