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