From 394c40d8bb29b8e40fc7978ea638f1592b03d617 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期四, 08 九月 2022 16:42:46 +0800
Subject: [PATCH] 修复目录订阅的状态异常
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/AlarmNotifyMessageHandler.java | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/AlarmNotifyMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/AlarmNotifyMessageHandler.java
index 2a653eb..98fd7a7 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/AlarmNotifyMessageHandler.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/AlarmNotifyMessageHandler.java
@@ -22,6 +22,7 @@
import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
+import org.springframework.util.ObjectUtils;
import org.springframework.util.StringUtils;
import javax.sip.InvalidArgumentException;
@@ -114,7 +115,7 @@
deviceAlarm.setLatitude(0.00);
}
- if (!StringUtils.isEmpty(deviceAlarm.getAlarmMethod())) {
+ if (!ObjectUtils.isEmpty(deviceAlarm.getAlarmMethod())) {
if ( deviceAlarm.getAlarmMethod().contains(DeviceAlarmMethod.GPS.getVal() + "")) {
MobilePosition mobilePosition = new MobilePosition();
mobilePosition.setCreateTime(DateUtil.getNow());
@@ -157,13 +158,13 @@
redisCatchStorage.sendMobilePositionMsg(jsonObject);
}
}
- if (!StringUtils.isEmpty(deviceAlarm.getDeviceId())) {
+ if (!ObjectUtils.isEmpty(deviceAlarm.getDeviceId())) {
if (deviceAlarm.getAlarmMethod().contains(DeviceAlarmMethod.Video.getVal() + "")) {
deviceAlarm.setAlarmType(getText(rootElement.element("Info"), "AlarmType"));
}
}
- if (channelId.equals(sipConfig.getId())) {
+ if ("7".equals(deviceAlarm.getAlarmMethod()) ) {
// 鍙戦�佺粰骞冲彴鐨勬姤璀︿俊鎭�� 鍙戦�乺edis閫氱煡
AlarmChannelMessage alarmChannelMessage = new AlarmChannelMessage();
alarmChannelMessage.setAlarmSn(Integer.parseInt(deviceAlarm.getAlarmMethod()));
@@ -231,7 +232,7 @@
deviceAlarm.setLatitude(0.00);
}
- if (!StringUtils.isEmpty(deviceAlarm.getAlarmMethod())) {
+ if (!ObjectUtils.isEmpty(deviceAlarm.getAlarmMethod())) {
if (deviceAlarm.getAlarmMethod().contains(DeviceAlarmMethod.Video.getVal() + "")) {
deviceAlarm.setAlarmType(getText(rootElement.element("Info"), "AlarmType"));
--
Gitblit v1.8.0