对于虚拟目录中出现多级虚拟组织的情况进行处理
This commit is contained in:
parent
bec3091767
commit
6e65006354
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user