Commit 25d08b5a by 汪志阳

fix:预警日志打印

parent e84a3bf6
package com.makeit.service.platform.alarm.alarmStrategy; package com.makeit.service.platform.alarm.alarmStrategy;
import cn.hutool.core.convert.Convert; import cn.hutool.core.convert.Convert;
import cn.hutool.json.JSONUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.makeit.dto.platform.alarm.PlatAlarmCheckDTO; import com.makeit.dto.platform.alarm.PlatAlarmCheckDTO;
import com.makeit.dto.platform.alarm.PlatAlarmConfigBehaviorDTOVO; import com.makeit.dto.platform.alarm.PlatAlarmConfigBehaviorDTOVO;
...@@ -61,6 +62,7 @@ public class FallAlarm implements IAlarm { ...@@ -61,6 +62,7 @@ public class FallAlarm implements IAlarm {
*/ */
@Override @Override
public void checkConfig(PlatAlarmCheckDTO platAlarmCheckDTO) { public void checkConfig(PlatAlarmCheckDTO platAlarmCheckDTO) {
log.info("跌倒预警config开始");
JSONObject properties = platAlarmCheckDTO.getProperties(); JSONObject properties = platAlarmCheckDTO.getProperties();
PlatDevice platDevice = platAlarmCheckDTO.getPlatDevice(); PlatDevice platDevice = platAlarmCheckDTO.getPlatDevice();
String deviceId = platDevice.getId(); String deviceId = platDevice.getId();
...@@ -68,7 +70,7 @@ public class FallAlarm implements IAlarm { ...@@ -68,7 +70,7 @@ public class FallAlarm implements IAlarm {
properties = new JSONObject(); properties = new JSONObject();
} }
String personState = Convert.toStr(properties.get("personState")); String personState = Convert.toStr(properties.get("personState"));
log.info("跌倒预警personState:{}", personState);
//记录停留时长 //记录停留时长
recordDuration(platAlarmCheckDTO); recordDuration(platAlarmCheckDTO);
...@@ -182,8 +184,10 @@ public class FallAlarm implements IAlarm { ...@@ -182,8 +184,10 @@ public class FallAlarm implements IAlarm {
@Override @Override
public void notice(PlatAlarmCheckDTO platAlarmCheckDTO) { public void notice(PlatAlarmCheckDTO platAlarmCheckDTO) {
PlatDevice platDevice = platAlarmCheckDTO.getPlatDevice(); PlatDevice platDevice = platAlarmCheckDTO.getPlatDevice();
log.info("跌倒预警参数platAlarmCheckDTO:{}", platAlarmCheckDTO);
platAlarmRecordService.getElderListByDeviceId(platAlarmCheckDTO); platAlarmRecordService.getElderListByDeviceId(platAlarmCheckDTO);
List<PlatElder> platElderList = platAlarmCheckDTO.getPlatElderList(); List<PlatElder> platElderList = platAlarmCheckDTO.getPlatElderList();
log.info("跌倒预警长者:{}", JSONUtil.toJsonStr(platElderList));
PlatAlarmConfig config = platAlarmCheckDTO.getPlatAlarmConfig(); PlatAlarmConfig config = platAlarmCheckDTO.getPlatAlarmConfig();
if (CommonEnum.NO.getValue().equals(config.getStatus())) { if (CommonEnum.NO.getValue().equals(config.getStatus())) {
log.error("告警配置为禁用,告警配置id:" + config.getId()); log.error("告警配置为禁用,告警配置id:" + config.getId());
......
...@@ -107,7 +107,7 @@ public class HeartAlarm implements IAlarm { ...@@ -107,7 +107,7 @@ public class HeartAlarm implements IAlarm {
RedisUtil.delete(RedisConst.ALARM_DEVICE_HR_ID + deviceId); RedisUtil.delete(RedisConst.ALARM_DEVICE_HR_ID + deviceId);
return; return;
} }
log.info("hr:{},end:{},start:{},mes:{}", hr, end, start, messageType);
if ((hr > end || hr < start) && StringUtils.equalsAnyIgnoreCase(messageType, "REPORT_PROPERTY")) { if ((hr > end || hr < start) && StringUtils.equalsAnyIgnoreCase(messageType, "REPORT_PROPERTY")) {
if(alarmRedisDTO==null){ if(alarmRedisDTO==null){
alarmRedisDTO = new AlarmRedisDTO(); alarmRedisDTO = new 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