|
@ -67,12 +67,12 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem |
|
|
Element snElement = rootElement.element("SN"); |
|
|
Element snElement = rootElement.element("SN"); |
|
|
String sn = snElement.getText(); |
|
|
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<GbStream> gbStreams = storager.queryGbStreamListInPlatform(parentPlatform.getServerGBId()); |
|
|
// 回复目录信息
|
|
|
// 回复目录信息
|
|
|
List<PlatformCatalog> catalogs = storager.queryCatalogInPlatform(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) { |
|
|
if (catalogs.size() > 0) { |
|
|
for (PlatformCatalog catalog : catalogs) { |
|
|
for (PlatformCatalog catalog : catalogs) { |
|
|
if (catalog.getParentId().equals(parentPlatform.getServerGBId())) { |
|
|
if (catalog.getParentId().equals(parentPlatform.getServerGBId())) { |
|
@ -99,14 +99,14 @@ public class CatalogQueryMessageHandler extends SIPRequestProcessorParent implem |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
// 回复级联的通道
|
|
|
// 回复级联的通道
|
|
|
if (channelReduces.size() > 0) { |
|
|
if (deviceChannelInPlatforms.size() > 0) { |
|
|
for (ChannelReduce channelReduce : channelReduces) { |
|
|
for (DeviceChannelInPlatform channel : deviceChannelInPlatforms) { |
|
|
if (channelReduce.getCatalogId().equals(parentPlatform.getServerGBId())) { |
|
|
if (channel.getCatalogId().equals(parentPlatform.getServerGBId())) { |
|
|
channelReduce.setCatalogId(parentPlatform.getDeviceGBId()); |
|
|
channel.setCatalogId(parentPlatform.getDeviceGBId()); |
|
|
} |
|
|
} |
|
|
DeviceChannel deviceChannel = storager.queryChannel(channelReduce.getDeviceId(), channelReduce.getChannelId()); |
|
|
DeviceChannel deviceChannel = storager.queryChannel(channel.getDeviceId(), channel.getChannelId()); |
|
|
deviceChannel.setParental(0); |
|
|
deviceChannel.setParental(0); |
|
|
deviceChannel.setParentId(channelReduce.getCatalogId()); |
|
|
deviceChannel.setParentId(channel.getCatalogId()); |
|
|
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0, 6)); |
|
|
deviceChannel.setCivilCode(parentPlatform.getDeviceGBId().substring(0, 6)); |
|
|
cmderFroPlatform.catalogQuery(deviceChannel, parentPlatform, sn, fromHeader.getTag(), size); |
|
|
cmderFroPlatform.catalogQuery(deviceChannel, parentPlatform, sn, fromHeader.getTag(), size); |
|
|
// 防止发送过快
|
|
|
// 防止发送过快
|
|
|