Parcourir la source

兼容设备通道信息中自己为自己父节点的情况

648540858 il y a 3 ans
Parent
commit
6dbc7a68bd

+ 3 - 0
src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java

@@ -298,6 +298,9 @@ public class XmlUtil {
             }else {
             }else {
                 deviceChannel.setParentId(parentId);
                 deviceChannel.setParentId(parentId);
             }
             }
+            if (deviceChannel.getParentId().equals(deviceChannel.getChannelId())) {
+                deviceChannel.setParentId(null);
+            }
         }
         }
         deviceChannel.setBusinessGroupId(businessGroupID);
         deviceChannel.setBusinessGroupId(businessGroupID);
         if (channelType.equals(ChannelType.BusinessGroup) || channelType.equals(ChannelType.VirtualOrganization)) {
         if (channelType.equals(ChannelType.BusinessGroup) || channelType.equals(ChannelType.VirtualOrganization)) {