| | |
| | | import com.genersoft.iot.vmp.storager.dao.ParentPlatformMapper; |
| | | import com.genersoft.iot.vmp.storager.dao.PlatformCatalogMapper; |
| | | import com.genersoft.iot.vmp.storager.dao.PlatformChannelMapper; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.PlatformController; |
| | | import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce; |
| | | import com.sun.org.apache.xml.internal.resolver.CatalogManager; |
| | | import javafx.application.Platform; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | result = platformChannelMapper.addChannels(platformId, channelReducesToAdd); |
| | | // TODO 后续给平台增加控制开关以控制是否响应目录订阅 |
| | | List<DeviceChannel> deviceChannelList = getDeviceChannelListByChannelReduceList(channelReducesToAdd, catalogId, platform); |
| | | eventPublisher.catalogEventPublish(platformId, deviceChannelList, CatalogEvent.ADD); |
| | | if (deviceChannelList != null) { |
| | | eventPublisher.catalogEventPublish(platformId, deviceChannelList, CatalogEvent.ADD); |
| | | } |
| | | } |
| | | |
| | | return result; |
| | |
| | | List<DeviceChannel> deviceChannelList = new ArrayList<>(); |
| | | if (channelReduces.size() > 0){ |
| | | PlatformCatalog catalog = catalogManager.select(catalogId); |
| | | if (catalog == null && !catalogId.equals(platform.getServerGBId())) { |
| | | if (catalog == null && !catalogId.equals(platform.getDeviceGBId())) { |
| | | logger.warn("未查询到目录{}的信息", catalogId); |
| | | return null; |
| | | } |