|
@@ -70,9 +70,11 @@ public class FireStrategy implements MqttStrategy {
|
|
tbAlarm.setDeviceName(fireAlarmVO.getDeviceName());
|
|
tbAlarm.setDeviceName(fireAlarmVO.getDeviceName());
|
|
tbAlarm.setAlarmTime(new Date());
|
|
tbAlarm.setAlarmTime(new Date());
|
|
if ("ALARM".equals(fireAlarmVO.getType())){
|
|
if ("ALARM".equals(fireAlarmVO.getType())){
|
|
- List<FireAlarmProperty> dp = fireAlarmVO.getAlarams().get(0).getDp();
|
|
|
|
- if (CollectionUtils.isNotEmpty(dp)){
|
|
|
|
- BeanMapperUtils.copy(dp.get(0),tbAlarm);
|
|
|
|
|
|
+ if (CollectionUtils.isNotEmpty(fireAlarmVO.getAlarams())){
|
|
|
|
+ List<FireAlarmProperty> dp = fireAlarmVO.getAlarams().get(0).getDp();
|
|
|
|
+ if (CollectionUtils.isNotEmpty(dp)){
|
|
|
|
+ BeanMapperUtils.copy(dp.get(0),tbAlarm);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}else {
|
|
}else {
|
|
tbAlarm.setAlarmContent(JsonUtils.toJson(fireAlarmVO));
|
|
tbAlarm.setAlarmContent(JsonUtils.toJson(fireAlarmVO));
|