648540858
2024-06-17 1909c7f71fc1b0e290678a3efe95b62d0b9df75e
src/main/java/com/genersoft/iot/vmp/gb28181/event/EventPublisher.java
@@ -1,15 +1,13 @@
package com.genersoft.iot.vmp.gb28181.event;
import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
import com.genersoft.iot.vmp.gb28181.bean.GbStream;
import com.genersoft.iot.vmp.gb28181.bean.RecordInfo;
import com.genersoft.iot.vmp.gb28181.bean.*;
import com.genersoft.iot.vmp.gb28181.event.alarm.AlarmEvent;
import com.genersoft.iot.vmp.gb28181.event.device.RequestTimeoutEvent;
import com.genersoft.iot.vmp.gb28181.event.record.RecordEndEvent;
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
import com.genersoft.iot.vmp.media.event.MediaServerOfflineEvent;
import com.genersoft.iot.vmp.media.event.MediaServerOnlineEvent;
import com.genersoft.iot.vmp.gb28181.event.subscribe.mobilePosition.MobilePositionEvent;
import com.genersoft.iot.vmp.media.event.mediaServer.MediaServerOfflineEvent;
import com.genersoft.iot.vmp.media.event.mediaServer.MediaServerOnlineEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;
@@ -81,7 +79,7 @@
         // 数据去重
         Set<String> gbIdSet = new HashSet<>();
         for (DeviceChannel deviceChannel : deviceChannels) {
            if (!gbIdSet.contains(deviceChannel.getChannelId())) {
            if (deviceChannel != null && deviceChannel.getChannelId() != null && !gbIdSet.contains(deviceChannel.getChannelId())) {
               gbIdSet.add(deviceChannel.getChannelId());
               channels.add(deviceChannel);
            }
@@ -96,6 +94,13 @@
   }
   public void mobilePositionEventPublish(MobilePosition mobilePosition) {
      MobilePositionEvent event = new MobilePositionEvent(this);
      event.setMobilePosition(mobilePosition);
      applicationEventPublisher.publishEvent(event);
   }
   public void catalogEventPublishForStream(String platformId, List<GbStream> gbStreams, String type) {
      CatalogEvent outEvent = new CatalogEvent(this);
      outEvent.setGbStreams(gbStreams);