From 4a00bcea9866c9dca04e0667b141cede88941529 Mon Sep 17 00:00:00 2001 From: xiaoQQya Date: Sat, 30 Dec 2023 14:15:58 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E4=BF=AE=E5=A4=8D=E8=A1=8C=E6=94=BF?= =?UTF-8?q?=E5=8C=BA=E5=88=92=E5=88=86=E7=BB=84=E3=80=81=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E5=88=86=E7=BB=84=E3=80=81=E8=99=9A=E6=8B=9F=E7=9B=AE=E5=BD=95?= =?UTF-8?q?=E4=B8=8B=E9=80=9A=E9=81=93=E4=B8=BA=E7=A9=BA=E6=97=B6=E8=A2=AB?= =?UTF-8?q?=E8=AF=AF=E8=AE=A4=E4=B8=BA=E8=AE=BE=E5=A4=87=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java index 14640d806..d93f79f2b 100644 --- a/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java +++ b/src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java @@ -222,7 +222,6 @@ public class XmlUtil { deviceChannel.setName(channelId); } if(channelId.length() <= 8) { - deviceChannel.setHasAudio(false); CivilCodePo parentCode = civilCodeFileConf.getParentCode(channelId); if (parentCode != null) { deviceChannel.setParentId(parentCode.getCode()); @@ -230,6 +229,8 @@ public class XmlUtil { }else { logger.warn("[xml解析] 无法确定行政区划{}的上级行政区划", channelId); } + deviceChannel.setParental(1); + deviceChannel.setHasAudio(false); deviceChannel.setStatus(true); return deviceChannel; }else { @@ -289,6 +290,7 @@ public class XmlUtil { if (!ObjectUtils.isEmpty(address)) { deviceChannel.setAddress(address); } + deviceChannel.setParental(1); deviceChannel.setStatus(true); if (!ObjectUtils.isEmpty(registerWay)) { try { @@ -304,6 +306,7 @@ public class XmlUtil { case 215: // 业务分组 deviceChannel.setStatus(true); + deviceChannel.setParental(1); if (!ObjectUtils.isEmpty(parentID)) { if (!parentID.trim().equalsIgnoreCase(device.getDeviceId())) { deviceChannel.setParentId(parentID); @@ -318,6 +321,7 @@ public class XmlUtil { case 216: // 虚拟组织 deviceChannel.setStatus(true); + deviceChannel.setParental(1); if (!ObjectUtils.isEmpty(businessGroupID)) { deviceChannel.setBusinessGroupId(businessGroupID); }