Commit fb8d8ce3 by 李小龙

fix:空指针

parent d4c2dc6e
...@@ -106,10 +106,11 @@ public class FallAlarm implements IAlarm { ...@@ -106,10 +106,11 @@ public class FallAlarm implements IAlarm {
String ruleConfigStr = config.getRuleConfig(); String ruleConfigStr = config.getRuleConfig();
JSONObject properties = platAlarmCheckDTO.getProperties(); JSONObject properties = platAlarmCheckDTO.getProperties();
String messageType = platAlarmCheckDTO.getMessageType(); String messageType = platAlarmCheckDTO.getMessageType();
String deviceId = platDevice.getId(); String deviceId = platDevice.getId();
if(properties == null ){
properties = new JSONObject();
}
String personState = Convert.toStr(properties.get("personState"));
String person = Convert.toStr(properties.get("person")); String person = Convert.toStr(properties.get("person"));
PlatAlarmConfigBehaviorDTOVO ruleConfig = JsonUtil.toObj(ruleConfigStr, PlatAlarmConfigBehaviorDTOVO.class); PlatAlarmConfigBehaviorDTOVO ruleConfig = JsonUtil.toObj(ruleConfigStr, PlatAlarmConfigBehaviorDTOVO.class);
Integer duration = ruleConfig.getAverageDuration();//分钟 Integer duration = ruleConfig.getAverageDuration();//分钟
......
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