diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/MobilePosition.java b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/MobilePosition.java
index 52b9d798f..39804a092 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/bean/MobilePosition.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/bean/MobilePosition.java
@@ -20,6 +20,11 @@ public class MobilePosition {
*/
private Integer channelId;
+ /**
+ * 通道国标编号
+ */
+ private String channelDeviceId;
+
/**
* 设备名称
*/
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java
index e6d39a0b9..b561d8d02 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/dao/DeviceChannelMapper.java
@@ -371,8 +371,6 @@ public interface DeviceChannelMapper {
" SET update_time=#{item.updateTime}" +
", longitude=#{item.longitude}" +
", latitude=#{item.latitude}" +
- ", gb_longitude=#{item.gbLongitude}" +
- ", gb_latitude=#{item.gbLatitude}" +
", gps_time=#{item.gpsTime}" +
"WHERE id=#{item.id}" +
"WHERE data_type = #{item.dataType} and data_device_id=#{item.dataDeviceId} AND device_id=#{item.deviceId}" +
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java
index 826b8e9d7..73e316dc5 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/DeviceChannelServiceImpl.java
@@ -361,6 +361,7 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
for (DeviceChannel channel : deviceChannels) {
// 向关联了该通道并且开启移动位置订阅的上级平台发送移动位置订阅消息
mobilePosition.setChannelId(channel.getId());
+ mobilePosition.setChannelDeviceId(channel.getDeviceId());
try {
eventPublisher.mobilePositionEventPublish(mobilePosition);
}catch (Exception e) {
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/GbChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/GbChannelServiceImpl.java
index 1d8dd7a08..6811f416c 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/GbChannelServiceImpl.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/service/impl/GbChannelServiceImpl.java
@@ -180,6 +180,7 @@ public class GbChannelServiceImpl implements IGbChannelService {
MobilePosition mobilePosition = new MobilePosition();
mobilePosition.setDeviceId(newChannel.getGbDeviceId());
mobilePosition.setChannelId(newChannel.getGbId());
+ mobilePosition.setChannelDeviceId(newChannel.getGbDeviceId());
mobilePosition.setDeviceName(newChannel.getGbName());
mobilePosition.setCreateTime(DateUtil.getNow());
mobilePosition.setTime(DateUtil.getNow());
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java
index c44fcd7e7..5bcf20625 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/NotifyRequestForMobilePositionProcessor.java
@@ -106,6 +106,7 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor
deviceChannel = deviceChannelService.getOne(device.getDeviceId(), channelId);
if (deviceChannel != null) {
mobilePosition.setChannelId(deviceChannel.getId());
+ mobilePosition.setChannelDeviceId(deviceChannel.getDeviceId());
}else {
log.error("[notify-移动位置] 未找到通道 {}/{}", device.getDeviceId(), channelId);
break readDocument;
@@ -165,7 +166,7 @@ public class NotifyRequestForMobilePositionProcessor extends SIPRequestProcessor
try {
eventPublisher.mobilePositionEventPublish(mobilePosition);
}catch (Exception e) {
- log.error("[向上级转发移动位置失败] ", e);
+ log.error("[MobilePositionEvent] 发送失败: ", e);
}
} catch (DocumentException e) {
log.error("[收到移动位置订阅通知] 文档解析异常: \r\n{}", evt.getRequest(), e);
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 b7ed168bf..15184e2f9 100755
--- 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
@@ -154,6 +154,7 @@ public class NotifyRequestProcessor extends SIPRequestProcessorParent implements
}else {
MobilePosition mobilePosition = new MobilePosition();
mobilePosition.setChannelId(deviceChannel.getId());
+ mobilePosition.setChannelDeviceId(deviceChannel.getDeviceId());
mobilePosition.setCreateTime(DateUtil.getNow());
mobilePosition.setDeviceId(deviceAlarm.getDeviceId());
mobilePosition.setTime(deviceAlarm.getAlarmTime());
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 999a5e944..5cb5ac9fa 100755
--- 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
@@ -153,6 +153,7 @@ public class AlarmNotifyMessageHandler extends SIPRequestProcessorParent impleme
mobilePosition.setCreateTime(DateUtil.getNow());
mobilePosition.setDeviceId(deviceAlarm.getDeviceId());
mobilePosition.setChannelId(deviceChannel.getId());
+ mobilePosition.setChannelDeviceId(deviceChannel.getDeviceId());
mobilePosition.setTime(deviceAlarm.getAlarmTime());
mobilePosition.setLongitude(deviceAlarm.getLongitude());
mobilePosition.setLatitude(deviceAlarm.getLatitude());
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/MobilePositionNotifyMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/MobilePositionNotifyMessageHandler.java
index b25eef3d3..ec65dc8d4 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/MobilePositionNotifyMessageHandler.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/MobilePositionNotifyMessageHandler.java
@@ -90,6 +90,7 @@ public class MobilePositionNotifyMessageHandler extends SIPRequestProcessorParen
mobilePosition.setDeviceId(sipMsgInfo.getDevice().getDeviceId());
mobilePosition.setChannelId(deviceChannel.getId());
+ mobilePosition.setChannelDeviceId(deviceChannel.getDeviceId());
String time = getText(rootElementAfterCharset, "Time");
if (ObjectUtils.isEmpty(time)){
mobilePosition.setTime(DateUtil.getNow());
diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/MobilePositionResponseMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/MobilePositionResponseMessageHandler.java
index 15461ec25..cc72c0295 100755
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/MobilePositionResponseMessageHandler.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/response/cmd/MobilePositionResponseMessageHandler.java
@@ -81,6 +81,7 @@ public class MobilePositionResponseMessageHandler extends SIPRequestProcessorPar
}
mobilePosition.setDeviceId(device.getDeviceId());
mobilePosition.setChannelId(deviceChannel.getId());
+ mobilePosition.setChannelDeviceId(deviceChannel.getDeviceId());
//兼容ISO 8601格式时间
String time = getText(rootElement, "Time");
if (ObjectUtils.isEmpty(time)){
diff --git a/src/main/java/com/genersoft/iot/vmp/web/custom/service/CameraChannelService.java b/src/main/java/com/genersoft/iot/vmp/web/custom/service/CameraChannelService.java
index 43cab863d..a9eb82e79 100644
--- a/src/main/java/com/genersoft/iot/vmp/web/custom/service/CameraChannelService.java
+++ b/src/main/java/com/genersoft/iot/vmp/web/custom/service/CameraChannelService.java
@@ -237,13 +237,13 @@ public class CameraChannelService implements CommandLineRunner {
CameraChannel cameraChannel = channelMapper.queryCameraChannelById(channelId);
// 非移动设备类型 不发送
- if (cameraChannel == null || cameraChannel.getGbPtzType() != 99) {
+ if (cameraChannel == null || cameraChannel.getGbPtzType() == null || cameraChannel.getGbPtzType() != 99) {
return;
}
// 发送redis消息
JSONObject jsonObject = new JSONObject();
jsonObject.put("time", mobilePosition.getTime());
- jsonObject.put("deviceId", mobilePosition.getDeviceId());
+ jsonObject.put("deviceId", mobilePosition.getChannelDeviceId());
jsonObject.put("longitude", mobilePosition.getLongitude());
jsonObject.put("latitude", mobilePosition.getLatitude());
jsonObject.put("altitude", mobilePosition.getAltitude());
@@ -251,7 +251,7 @@ public class CameraChannelService implements CommandLineRunner {
jsonObject.put("speed", mobilePosition.getSpeed());
jsonObject.put("topGroupGAlias", cameraChannel.getTopGroupGAlias());
jsonObject.put("groupAlias", cameraChannel.getGroupAlias());
- log.debug("[redis发送通知] 发送 移动设备位置信息移动位置 {}: {}", REDIS_GPS_MESSAGE, jsonObject.toString());
+ log.info("[redis发送通知] 发送 移动设备位置信息移动位置 {}: {}", REDIS_GPS_MESSAGE, jsonObject.toString());
redisTemplate.convertAndSend(REDIS_GPS_MESSAGE, jsonObject);
}