From f5d07c4c14a6555c0f1c80f5f47881a431570622 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期六, 15 四月 2023 09:16:21 +0800
Subject: [PATCH] Update --bug---.md
---
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java | 29 +++++++++++++++++------------
1 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
index 990da3a..4260641 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestProcessor.java
@@ -96,6 +96,7 @@
logger.error("鏈鐞嗙殑寮傚父 ", e);
}
boolean runed = !taskQueue.isEmpty();
+ logger.info("[notify] 寰呭鐞嗘秷鎭暟閲忥細 {}", taskQueue.size());
taskQueue.offer(new HandlerCatchData(evt, null, null));
if (!runed) {
taskExecutor.execute(()-> {
@@ -148,26 +149,30 @@
MobilePosition mobilePosition = new MobilePosition();
mobilePosition.setCreateTime(DateUtil.getNow());
+
Element deviceIdElement = rootElement.element("DeviceID");
String channelId = deviceIdElement.getTextTrim().toString();
Device device = redisCatchStorage.getDevice(deviceId);
if (device == null) {
- // 鏍规嵁閫氶亾id鏌ヨ璁惧Id
- List<Device> deviceList = deviceChannelService.getDeviceByChannelId(channelId);
- if (deviceList.size() > 0) {
- device = deviceList.get(0);
- }else {
- logger.warn("[mobilePosition绉诲姩浣嶇疆Notify] 鏈壘鍒伴�氶亾{}鎵�灞炵殑璁惧", channelId);
- return;
+ device = redisCatchStorage.getDevice(channelId);
+ if (device == null) {
+ // 鏍规嵁閫氶亾id鏌ヨ璁惧Id
+ List<Device> deviceList = deviceChannelService.getDeviceByChannelId(channelId);
+ if (deviceList.size() > 0) {
+ device = deviceList.get(0);
+ }
}
}
- if (device != null) {
- if (!ObjectUtils.isEmpty(device.getName())) {
- mobilePosition.setDeviceName(device.getName());
- }
+ if (device == null) {
+ logger.warn("[mobilePosition绉诲姩浣嶇疆Notify] 鏈壘鍒伴�氶亾{}鎵�灞炵殑璁惧", channelId);
+ return;
}
- mobilePosition.setDeviceId(XmlUtil.getText(rootElement, "DeviceID"));
+ if (!ObjectUtils.isEmpty(device.getName())) {
+ mobilePosition.setDeviceName(device.getName());
+ }
+
+ mobilePosition.setDeviceId(device.getDeviceId());
mobilePosition.setChannelId(channelId);
String time = XmlUtil.getText(rootElement, "Time");
mobilePosition.setTime(time);
--
Gitblit v1.8.0