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); }