多级虚拟组织处理修复

This commit is contained in:
648540858 2022-04-25 17:12:29 +08:00
parent 6e65006354
commit de58ebeec3

View File

@ -213,7 +213,7 @@ public class XmlUtil {
deviceChannel.setParentId(XmlUtil.getText(itemDevice, "ParentID")); deviceChannel.setParentId(XmlUtil.getText(itemDevice, "ParentID"));
String parentId = XmlUtil.getText(itemDevice, "ParentID"); String parentId = XmlUtil.getText(itemDevice, "ParentID");
if (parentId.contains("/")) { if (parentId.contains("/")) {
String lastParentId = parentId.substring(parentId.lastIndexOf("/")); String lastParentId = parentId.substring(parentId.lastIndexOf("/") + 1);
deviceChannel.setParentId(lastParentId); deviceChannel.setParentId(lastParentId);
}else { }else {
deviceChannel.setParentId(parentId); deviceChannel.setParentId(parentId);