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 6b7177eb..3da72178 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 @@ -213,7 +213,7 @@ public class XmlUtil { deviceChannel.setParentId(XmlUtil.getText(itemDevice, "ParentID")); String parentId = XmlUtil.getText(itemDevice, "ParentID"); if (parentId.contains("/")) { - String lastParentId = parentId.substring(parentId.lastIndexOf("/")); + String lastParentId = parentId.substring(parentId.lastIndexOf("/") + 1); deviceChannel.setParentId(lastParentId); }else { deviceChannel.setParentId(parentId);