From a0537d74df5b9c8ee65dba7c4e5bc6da7fc3d031 Mon Sep 17 00:00:00 2001 From: mk1990 <37614016+mk1990@users.noreply.github.com> Date: 星期四, 28 四月 2022 16:32:09 +0800 Subject: [PATCH] Merge branch '648540858:wvp-28181-2.0' into wvp-28181-2.0 --- src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/CatalogNotifyMessageHandler.java | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/CatalogNotifyMessageHandler.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/CatalogNotifyMessageHandler.java index d17920d..d714ee4 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/CatalogNotifyMessageHandler.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/message/notify/cmd/CatalogNotifyMessageHandler.java @@ -79,6 +79,11 @@ deviceChannel.setParental(1); deviceChannel.setParentId(catalog.getParentId()); deviceChannel.setRegisterWay(1); + if (catalog.getParentId() != null && catalog.getParentId().length() <= 10) { + deviceChannel.setCivilCode(catalog.getParentId()); + }else { + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); + } deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); deviceChannel.setModel("live"); deviceChannel.setOwner("wvp-pro"); @@ -95,7 +100,12 @@ DeviceChannel deviceChannel = storage.queryChannel(channel.getDeviceId(), channel.getChannelId()); deviceChannel.setParental(0); deviceChannel.setParentId(channel.getCatalogId()); - deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0, 6)); + if (channel.getCatalogId() != null && channel.getCatalogId().length() <= 10) { + channel.setCivilCode(channel.getCatalogId()); + }else { + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); + } + allChannels.add(deviceChannel); } } @@ -116,7 +126,11 @@ deviceChannel.setStatus(1); deviceChannel.setParentId(gbStream.getCatalogId()); deviceChannel.setRegisterWay(1); - deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); + if (gbStream.getCatalogId() != null && gbStream.getCatalogId().length() <= 10) { + deviceChannel.setCivilCode(gbStream.getCatalogId()); + }else { + deviceChannel.setCivilCode(parentPlatform.getAdministrativeDivision()); + } deviceChannel.setModel("live"); deviceChannel.setOwner("wvp-pro"); deviceChannel.setParental(0); -- Gitblit v1.8.0