优化国标级联注册机制
This commit is contained in:
parent
16256537fb
commit
3e45526474
@ -339,7 +339,7 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform {
|
|||||||
}else {
|
}else {
|
||||||
catalogXml.append("<PTZType></PTZType>\r\n");
|
catalogXml.append("<PTZType></PTZType>\r\n");
|
||||||
}
|
}
|
||||||
catalogXml.append("<Status>" + (channel.getStatus() == 1?"ON":"OFF") + "</Status>\r\n");
|
catalogXml.append("<Status>" + (channel.isStatus() ?"ON":"OFF") + "</Status>\r\n");
|
||||||
|
|
||||||
catalogXml.append("<Longitude>" +
|
catalogXml.append("<Longitude>" +
|
||||||
(channel.getLongitudeWgs84() != 0? channel.getLongitudeWgs84():channel.getLongitude())
|
(channel.getLongitudeWgs84() != 0? channel.getLongitudeWgs84():channel.getLongitude())
|
||||||
|
@ -225,7 +225,7 @@ public class XmlUtil {
|
|||||||
}else {
|
}else {
|
||||||
logger.warn("[xml解析] 无法确定行政区划{}的上级行政区划", channelId);
|
logger.warn("[xml解析] 无法确定行政区划{}的上级行政区划", channelId);
|
||||||
}
|
}
|
||||||
deviceChannel.setStatus(1);
|
deviceChannel.setStatus(true);
|
||||||
return deviceChannel;
|
return deviceChannel;
|
||||||
}else {
|
}else {
|
||||||
if(channelId.length() != 20) {
|
if(channelId.length() != 20) {
|
||||||
@ -284,7 +284,7 @@ public class XmlUtil {
|
|||||||
if (!ObjectUtils.isEmpty(address)) {
|
if (!ObjectUtils.isEmpty(address)) {
|
||||||
deviceChannel.setAddress(address);
|
deviceChannel.setAddress(address);
|
||||||
}
|
}
|
||||||
deviceChannel.setStatus(1);
|
deviceChannel.setStatus(true);
|
||||||
if (!ObjectUtils.isEmpty(registerWay)) {
|
if (!ObjectUtils.isEmpty(registerWay)) {
|
||||||
try {
|
try {
|
||||||
deviceChannel.setRegisterWay(Integer.parseInt(registerWay));
|
deviceChannel.setRegisterWay(Integer.parseInt(registerWay));
|
||||||
@ -298,7 +298,7 @@ public class XmlUtil {
|
|||||||
return deviceChannel;
|
return deviceChannel;
|
||||||
case 215:
|
case 215:
|
||||||
// 业务分组
|
// 业务分组
|
||||||
deviceChannel.setStatus(1);
|
deviceChannel.setStatus(true);
|
||||||
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);
|
||||||
@ -312,7 +312,7 @@ public class XmlUtil {
|
|||||||
break;
|
break;
|
||||||
case 216:
|
case 216:
|
||||||
// 虚拟组织
|
// 虚拟组织
|
||||||
deviceChannel.setStatus(1);
|
deviceChannel.setStatus(true);
|
||||||
if (!ObjectUtils.isEmpty(businessGroupID)) {
|
if (!ObjectUtils.isEmpty(businessGroupID)) {
|
||||||
deviceChannel.setBusinessGroupId(businessGroupID);
|
deviceChannel.setBusinessGroupId(businessGroupID);
|
||||||
}
|
}
|
||||||
@ -476,13 +476,13 @@ public class XmlUtil {
|
|||||||
if (status != null) {
|
if (status != null) {
|
||||||
// ONLINE OFFLINE HIKVISION DS-7716N-E4 NVR的兼容性处理
|
// ONLINE OFFLINE HIKVISION DS-7716N-E4 NVR的兼容性处理
|
||||||
if (status.equals("ON") || status.equals("On") || status.equals("ONLINE") || status.equals("OK")) {
|
if (status.equals("ON") || status.equals("On") || status.equals("ONLINE") || status.equals("OK")) {
|
||||||
deviceChannel.setStatus(1);
|
deviceChannel.setStatus(true);
|
||||||
}
|
}
|
||||||
if (status.equals("OFF") || status.equals("Off") || status.equals("OFFLINE")) {
|
if (status.equals("OFF") || status.equals("Off") || status.equals("OFFLINE")) {
|
||||||
deviceChannel.setStatus(0);
|
deviceChannel.setStatus(false);
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
deviceChannel.setStatus(1);
|
deviceChannel.setStatus(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 经度
|
// 经度
|
||||||
|
@ -140,11 +140,11 @@ public class VideoManagerStorageImpl implements IVideoManagerStorage {
|
|||||||
if (allChannelMap.containsKey(deviceChannel.getChannelId())) {
|
if (allChannelMap.containsKey(deviceChannel.getChannelId())) {
|
||||||
deviceChannel.setStreamId(allChannelMap.get(deviceChannel.getChannelId()).getStreamId());
|
deviceChannel.setStreamId(allChannelMap.get(deviceChannel.getChannelId()).getStreamId());
|
||||||
deviceChannel.setHasAudio(allChannelMap.get(deviceChannel.getChannelId()).isHasAudio());
|
deviceChannel.setHasAudio(allChannelMap.get(deviceChannel.getChannelId()).isHasAudio());
|
||||||
if (allChannelMap.get(deviceChannel.getChannelId()).getStatus() !=deviceChannel.getStatus()){
|
if (allChannelMap.get(deviceChannel.getChannelId()).isStatus() !=deviceChannel.isStatus()){
|
||||||
List<String> strings = platformChannelMapper.queryParentPlatformByChannelId(deviceChannel.getChannelId());
|
List<String> strings = platformChannelMapper.queryParentPlatformByChannelId(deviceChannel.getChannelId());
|
||||||
if (!CollectionUtils.isEmpty(strings)){
|
if (!CollectionUtils.isEmpty(strings)){
|
||||||
strings.forEach(platformId->{
|
strings.forEach(platformId->{
|
||||||
eventPublisher.catalogEventPublish(platformId, deviceChannel, deviceChannel.getStatus()==1?CatalogEvent.ON:CatalogEvent.OFF);
|
eventPublisher.catalogEventPublish(platformId, deviceChannel, deviceChannel.isStatus()?CatalogEvent.ON:CatalogEvent.OFF);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user