device event修改

This commit is contained in:
huguanghan 2024-11-21 18:10:32 +08:00
parent 229db3d28a
commit 1fb6a4c5bf

View File

@ -366,7 +366,8 @@ public class NodeMessageServiceImpl extends TextWebSocketHandler implements Node
deviceEventInfo.setEventLevel(0); deviceEventInfo.setEventLevel(0);
} else { } else {
deviceEventInfo.setEventText(fieldName + " 动作"); deviceEventInfo.setEventText(fieldName + " 动作");
deviceEventInfo.setEventLevel(dataService.eventLevelMap.get(model).get(fieldName)); Integer level = dataService.eventLevelMap.get(model).get(fieldName);
deviceEventInfo.setEventLevel( level == null ? 0 : level);
} }
} else { } else {
deviceEventInfo.setEventText(fieldName + eventType + ",属性值为:" + item.getAttrValue() + ",越限值为:" + item.getLimitValue()); deviceEventInfo.setEventText(fieldName + eventType + ",属性值为:" + item.getAttrValue() + ",越限值为:" + item.getLimitValue());