From fc90cd7951600ce5173f71c3e28d78e69b4db4ae Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期一, 19 十二月 2022 14:20:22 +0800 Subject: [PATCH] 优化tcp主动方式的语音对讲 --- src/main/java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) 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 1198c26..35d563d 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 @@ -1,7 +1,7 @@ package com.genersoft.iot.vmp.gb28181.utils; -import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; +import com.alibaba.fastjson2.JSONArray; +import com.alibaba.fastjson2.JSONObject; import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel; import com.genersoft.iot.vmp.gb28181.bean.TreeType; @@ -298,6 +298,10 @@ }else { deviceChannel.setParentId(parentId); } + // 鍏煎璁惧閫氶亾淇℃伅涓嚜宸变负鑷繁鐖惰妭鐐圭殑鎯呭喌 + if (deviceChannel.getParentId().equals(deviceChannel.getChannelId())) { + deviceChannel.setParentId(null); + } } deviceChannel.setBusinessGroupId(businessGroupID); if (channelType.equals(ChannelType.BusinessGroup) || channelType.equals(ChannelType.VirtualOrganization)) { -- Gitblit v1.8.0