多级虚拟组织处理修复

pull/451/head
648540858 2022-04-25 17:13:22 +08:00
parent a012007f36
commit 0b6b72ae44
1 changed files with 1 additions and 1 deletions

View File

@ -212,7 +212,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 != null && parentId.contains("/")) {
String lastParentId = parentId.substring(parentId.lastIndexOf("/") + 1); String lastParentId = parentId.substring(parentId.lastIndexOf("/") + 1);
deviceChannel.setParentId(lastParentId); deviceChannel.setParentId(lastParentId);
}else { }else {