648540858
2023-08-16 985082d33930868c3cc1723f28fd9aaae9013a8f
src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java
old mode 100644 new mode 100755
@@ -125,8 +125,16 @@
    private List<DeviceChannel> getDeviceChannelListByChannelReduceList(List<ChannelReduce> channelReduces, String catalogId, ParentPlatform platform) {
        List<DeviceChannel> deviceChannelList = new ArrayList<>();
        if (channelReduces.size() > 0){
            PlatformCatalog catalog = catalogManager.select(catalogId);
            if (catalog == null || !catalogId.equals(platform.getDeviceGBId())) {
            PlatformCatalog catalog = catalogManager.selectByPlatFormAndCatalogId(platform.getServerGBId(),catalogId);
            if (catalog == null && catalogId.equals(platform.getDeviceGBId())) {
                for (ChannelReduce channelReduce : channelReduces) {
                    DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(channelReduce.getDeviceId(), channelReduce.getChannelId());
                    deviceChannel.setParental(0);
                    deviceChannel.setCivilCode(platform.getServerGBDomain());
                    deviceChannelList.add(deviceChannel);
                }
                return deviceChannelList;
            } else if (catalog == null || !catalogId.equals(platform.getDeviceGBId())) {
                logger.warn("未查询到目录{}的信息", catalogId);
                return null;
            }