bugfix: 修复行政区划分组、业务分组、虚拟目录下通道为空时被误认为设备的问题
parent
b0de0be3ea
commit
4a00bcea98
|
@ -222,7 +222,6 @@ public class XmlUtil {
|
|||
deviceChannel.setName(channelId);
|
||||
}
|
||||
if(channelId.length() <= 8) {
|
||||
deviceChannel.setHasAudio(false);
|
||||
CivilCodePo parentCode = civilCodeFileConf.getParentCode(channelId);
|
||||
if (parentCode != null) {
|
||||
deviceChannel.setParentId(parentCode.getCode());
|
||||
|
@ -230,6 +229,8 @@ public class XmlUtil {
|
|||
}else {
|
||||
logger.warn("[xml解析] 无法确定行政区划{}的上级行政区划", channelId);
|
||||
}
|
||||
deviceChannel.setParental(1);
|
||||
deviceChannel.setHasAudio(false);
|
||||
deviceChannel.setStatus(true);
|
||||
return deviceChannel;
|
||||
}else {
|
||||
|
@ -289,6 +290,7 @@ public class XmlUtil {
|
|||
if (!ObjectUtils.isEmpty(address)) {
|
||||
deviceChannel.setAddress(address);
|
||||
}
|
||||
deviceChannel.setParental(1);
|
||||
deviceChannel.setStatus(true);
|
||||
if (!ObjectUtils.isEmpty(registerWay)) {
|
||||
try {
|
||||
|
@ -304,6 +306,7 @@ public class XmlUtil {
|
|||
case 215:
|
||||
// 业务分组
|
||||
deviceChannel.setStatus(true);
|
||||
deviceChannel.setParental(1);
|
||||
if (!ObjectUtils.isEmpty(parentID)) {
|
||||
if (!parentID.trim().equalsIgnoreCase(device.getDeviceId())) {
|
||||
deviceChannel.setParentId(parentID);
|
||||
|
@ -318,6 +321,7 @@ public class XmlUtil {
|
|||
case 216:
|
||||
// 虚拟组织
|
||||
deviceChannel.setStatus(true);
|
||||
deviceChannel.setParental(1);
|
||||
if (!ObjectUtils.isEmpty(businessGroupID)) {
|
||||
deviceChannel.setBusinessGroupId(businessGroupID);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue