|  |  |  | 
|---|
|  |  |  | import org.springframework.util.ObjectUtils; | 
|---|
|  |  |  | import org.springframework.util.StringUtils; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import javax.sip.InvalidArgumentException; | 
|---|
|  |  |  | import javax.sip.SipException; | 
|---|
|  |  |  | import java.text.ParseException; | 
|---|
|  |  |  | import java.util.*; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (deviceChannelList.size() > 0) { | 
|---|
|  |  |  | logger.info("[Catalog事件: {}]平台:{},影响通道{}个", event.getType(), event.getPlatformId(), deviceChannelList.size()); | 
|---|
|  |  |  | sipCommanderFroPlatform.sendNotifyForCatalogOther(event.getType(), parentPlatform, deviceChannelList, subscribe, null); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | sipCommanderFroPlatform.sendNotifyForCatalogOther(event.getType(), parentPlatform, deviceChannelList, subscribe, null); | 
|---|
|  |  |  | } catch (InvalidArgumentException | ParseException | NoSuchFieldException | SipException | | 
|---|
|  |  |  | IllegalAccessException e) { | 
|---|
|  |  |  | logger.error("[命令发送失败] 国标级联 Catalog通知: {}", e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else if (parentPlatformMap.keySet().size() > 0) { | 
|---|
|  |  |  | for (String gbId : parentPlatformMap.keySet()) { | 
|---|
|  |  |  | 
|---|
|  |  |  | DeviceChannel deviceChannel = new DeviceChannel(); | 
|---|
|  |  |  | deviceChannel.setChannelId(gbId); | 
|---|
|  |  |  | deviceChannelList.add(deviceChannel); | 
|---|
|  |  |  | sipCommanderFroPlatform.sendNotifyForCatalogOther(event.getType(), platform, deviceChannelList, subscribeInfo, null); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | sipCommanderFroPlatform.sendNotifyForCatalogOther(event.getType(), platform, deviceChannelList, subscribeInfo, null); | 
|---|
|  |  |  | } catch (InvalidArgumentException | ParseException | NoSuchFieldException | SipException | | 
|---|
|  |  |  | IllegalAccessException e) { | 
|---|
|  |  |  | logger.error("[命令发送失败] 国标级联 Catalog通知: {}", e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  | } | 
|---|
|  |  |  | if (deviceChannelList.size() > 0) { | 
|---|
|  |  |  | logger.info("[Catalog事件: {}]平台:{},影响通道{}个", event.getType(), event.getPlatformId(), deviceChannelList.size()); | 
|---|
|  |  |  | sipCommanderFroPlatform.sendNotifyForCatalogAddOrUpdate(event.getType(), parentPlatform, deviceChannelList, subscribe, null); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | sipCommanderFroPlatform.sendNotifyForCatalogAddOrUpdate(event.getType(), parentPlatform, deviceChannelList, subscribe, null); | 
|---|
|  |  |  | } catch (InvalidArgumentException | ParseException | NoSuchFieldException | SipException | | 
|---|
|  |  |  | IllegalAccessException e) { | 
|---|
|  |  |  | logger.error("[命令发送失败] 国标级联 Catalog通知: {}", e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | }else if (parentPlatformMap.keySet().size() > 0) { | 
|---|
|  |  |  | for (String gbId : parentPlatformMap.keySet()) { | 
|---|
|  |  |  | 
|---|
|  |  |  | DeviceChannel deviceChannelByStream = gbStreamService.getDeviceChannelListByStreamWithStatus(gbStream, gbStream.getCatalogId(), platform); | 
|---|
|  |  |  | deviceChannelList.add(deviceChannelByStream); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | sipCommanderFroPlatform.sendNotifyForCatalogAddOrUpdate(event.getType(), platform, deviceChannelList, subscribeInfo, null); | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | sipCommanderFroPlatform.sendNotifyForCatalogAddOrUpdate(event.getType(), platform, deviceChannelList, subscribeInfo, null); | 
|---|
|  |  |  | } catch (InvalidArgumentException | ParseException | NoSuchFieldException | | 
|---|
|  |  |  | SipException | IllegalAccessException e) { | 
|---|
|  |  |  | logger.error("[命令发送失败] 国标级联 Catalog通知: {}", e.getMessage()); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|