From 6e65006354432bdeaa9379f20e916d47ade6bfc3 Mon Sep 17 00:00:00 2001 From: 648540858 <456panlinlin> Date: Mon, 25 Apr 2022 16:55:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AF=B9=E4=BA=8E=E8=99=9A=E6=8B=9F=E7=9B=AE?= =?UTF-8?q?=E5=BD=95=E4=B8=AD=E5=87=BA=E7=8E=B0=E5=A4=9A=E7=BA=A7=E8=99=9A?= =?UTF-8?q?=E6=8B=9F=E7=BB=84=E7=BB=87=E7=9A=84=E6=83=85=E5=86=B5=E8=BF=9B?= =?UTF-8?q?=E8=A1=8C=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/genersoft/iot/vmp/gb28181/utils/XmlUtil.java | 8 ++++++++ 1 file changed, 8 insertions(+) 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 09e7a04f..6b7177eb 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 @@ -211,6 +211,14 @@ public class XmlUtil { deviceChannel.setParental(Integer.parseInt(XmlUtil.getText(itemDevice, "Parental"))); } deviceChannel.setParentId(XmlUtil.getText(itemDevice, "ParentID")); + String parentId = XmlUtil.getText(itemDevice, "ParentID"); + if (parentId.contains("/")) { + String lastParentId = parentId.substring(parentId.lastIndexOf("/")); + deviceChannel.setParentId(lastParentId); + }else { + deviceChannel.setParentId(parentId); + } + if (XmlUtil.getText(itemDevice, "SafetyWay") == null || XmlUtil.getText(itemDevice, "SafetyWay") == "") { deviceChannel.setSafetyWay(0);