修复级联的国标通道无经纬度问题
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
package com.genersoft.iot.vmp.gb28181.bean;
|
||||
|
||||
public class DeviceChannelInPlatform extends DeviceChannel{
|
||||
|
||||
private String platFormId;
|
||||
private String catalogId;
|
||||
|
||||
public String getPlatFormId() {
|
||||
return platFormId;
|
||||
}
|
||||
|
||||
public void setPlatFormId(String platFormId) {
|
||||
this.platFormId = platFormId;
|
||||
}
|
||||
|
||||
public String getCatalogId() {
|
||||
return catalogId;
|
||||
}
|
||||
|
||||
public void setCatalogId(String catalogId) {
|
||||
this.catalogId = catalogId;
|
||||
}
|
||||
}
|
||||
@@ -64,10 +64,10 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple
|
||||
Element snElement = rootElement.element("SN");
|
||||
String sn = snElement.getText();
|
||||
// 准备回复通道信息
|
||||
List<ChannelReduce> channelReduces = storager.queryChannelListInParentPlatform(parentPlatform.getServerGBId());
|
||||
List<DeviceChannelInPlatform> deviceChannels = storager.queryChannelListInParentPlatform(parentPlatform.getServerGBId());
|
||||
// 查询关联的直播通道
|
||||
List<GbStream> gbStreams = storager.queryGbStreamListInPlatform(parentPlatform.getServerGBId());
|
||||
int size = channelReduces.size() + gbStreams.size();
|
||||
int size = deviceChannels.size() + gbStreams.size();
|
||||
// 回复目录信息
|
||||
List<PlatformCatalog> catalogs = storager.queryCatalogInPlatform(parentPlatform.getServerGBId());
|
||||
if (catalogs.size() > 0) {
|
||||
@@ -96,14 +96,14 @@ public class CatalogNotifyMessageHandler extends SIPRequestProcessorParent imple
|
||||
}
|
||||
}
|
||||
// 回复级联的通道
|
||||
if (channelReduces.size() > 0) {
|
||||
for (ChannelReduce channelReduce : channelReduces) {
|
||||
if (channelReduce.getCatalogId().equals(parentPlatform.getServerGBId())) {
|
||||
channelReduce.setCatalogId(parentPlatform.getDeviceGBId());
|
||||
if (deviceChannels.size() > 0) {
|
||||
for (DeviceChannelInPlatform channel : deviceChannels) {
|
||||
if (channel.getCatalogId().equals(parentPlatform.getServerGBId())) {
|
||||
channel.setCatalogId(parentPlatform.getDeviceGBId());
|
||||
}
|
||||
DeviceChannel deviceChannel = storager.queryChannel(channelReduce.getDeviceId(), channelReduce.getChannelId());
|
||||
DeviceChannel deviceChannel = storager.queryChannel(channel.getDeviceId(), channel.getChannelId());
|
||||
deviceChannel.setParental(0);
|
||||
deviceChannel.setParentId(channelReduce.getCatalogId());
|
||||
deviceChannel.setParentId(channel.getCatalogId());
|
||||
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0, 6));
|
||||
cmderFroPlatform.catalogQuery(deviceChannel, parentPlatform, sn, fromHeader.getTag(), size);
|
||||
// 防止发送过快
|
||||
|
||||
@@ -67,12 +67,12 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
|
||||
Element snElement = rootElement.element("SN");
|
||||
String sn = snElement.getText();
|
||||
// 准备回复通道信息
|
||||
List<ChannelReduce> channelReduces = storager.queryChannelListInParentPlatform(parentPlatform.getServerGBId());
|
||||
List<DeviceChannelInPlatform> deviceChannelInPlatforms = storager.queryChannelListInParentPlatform(parentPlatform.getServerGBId());
|
||||
// 查询关联的直播通道
|
||||
List<GbStream> gbStreams = storager.queryGbStreamListInPlatform(parentPlatform.getServerGBId());
|
||||
// 回复目录信息
|
||||
List<PlatformCatalog> catalogs = storager.queryCatalogInPlatform(parentPlatform.getServerGBId());
|
||||
int size = catalogs.size() + channelReduces.size() + gbStreams.size();
|
||||
int size = catalogs.size() + deviceChannelInPlatforms.size() + gbStreams.size();
|
||||
if (catalogs.size() > 0) {
|
||||
for (PlatformCatalog catalog : catalogs) {
|
||||
if (catalog.getParentId().equals(parentPlatform.getServerGBId())) {
|
||||
@@ -99,14 +99,14 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem
|
||||
}
|
||||
}
|
||||
// 回复级联的通道
|
||||
if (channelReduces.size() > 0) {
|
||||
for (ChannelReduce channelReduce : channelReduces) {
|
||||
if (channelReduce.getCatalogId().equals(parentPlatform.getServerGBId())) {
|
||||
channelReduce.setCatalogId(parentPlatform.getDeviceGBId());
|
||||
if (deviceChannelInPlatforms.size() > 0) {
|
||||
for (DeviceChannelInPlatform channel : deviceChannelInPlatforms) {
|
||||
if (channel.getCatalogId().equals(parentPlatform.getServerGBId())) {
|
||||
channel.setCatalogId(parentPlatform.getDeviceGBId());
|
||||
}
|
||||
DeviceChannel deviceChannel = storager.queryChannel(channelReduce.getDeviceId(), channelReduce.getChannelId());
|
||||
DeviceChannel deviceChannel = storager.queryChannel(channel.getDeviceId(), channel.getChannelId());
|
||||
deviceChannel.setParental(0);
|
||||
deviceChannel.setParentId(channelReduce.getCatalogId());
|
||||
deviceChannel.setParentId(channel.getCatalogId());
|
||||
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0, 6));
|
||||
cmderFroPlatform.catalogQuery(deviceChannel, parentPlatform, sn, fromHeader.getTag(), size);
|
||||
// 防止发送过快
|
||||
|
||||
Reference in New Issue
Block a user