优化对Parental字段的判断
This commit is contained in:
parent
dcaa8e3713
commit
b8e63574a5
@ -219,7 +219,8 @@ public class XmlUtil {
|
|||||||
deviceChannel.setParental(0);
|
deviceChannel.setParental(0);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
deviceChannel.setParental(Integer.parseInt(XmlUtil.getText(itemDevice, "Parental")));
|
// 由于海康会错误的发送65535作为这里的取值,所以这里除非是0否则认为是1
|
||||||
|
deviceChannel.setParental(Integer.parseInt(XmlUtil.getText(itemDevice, "Parental")) == 1?1:0);
|
||||||
}
|
}
|
||||||
deviceChannel.setParentId(XmlUtil.getText(itemDevice, "ParentID"));
|
deviceChannel.setParentId(XmlUtil.getText(itemDevice, "ParentID"));
|
||||||
String parentId = XmlUtil.getText(itemDevice, "ParentID");
|
String parentId = XmlUtil.getText(itemDevice, "ParentID");
|
||||||
|
Loading…
Reference in New Issue
Block a user