Commit 8fdd10d1c2723ead1d2c3b232f64f292ba3ce1cc
1 parent
d48f89ee
修复在国标级联选择通道时,如果添加通道到跟平台根目录(即平台本身),无法触发目录变更事件问题.详见 https://github.com/648540858/w…
…vp-GB28181-pro/issues/958
Showing
1 changed file
with
9 additions
and
1 deletions
src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java
| ... | ... | @@ -126,7 +126,15 @@ public class PlatformChannelServiceImpl implements IPlatformChannelService { |
| 126 | 126 | List<DeviceChannel> deviceChannelList = new ArrayList<>(); |
| 127 | 127 | if (channelReduces.size() > 0){ |
| 128 | 128 | PlatformCatalog catalog = catalogManager.selectByPlatFormAndCatalogId(platform.getServerGBId(),catalogId); |
| 129 | - if (catalog == null || !catalogId.equals(platform.getDeviceGBId())) { | |
| 129 | + if (catalog == null && catalogId.equals(platform.getDeviceGBId())) { | |
| 130 | + for (ChannelReduce channelReduce : channelReduces) { | |
| 131 | + DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(channelReduce.getDeviceId(), channelReduce.getChannelId()); | |
| 132 | + deviceChannel.setParental(0); | |
| 133 | + deviceChannel.setCivilCode(platform.getServerGBDomain()); | |
| 134 | + deviceChannelList.add(deviceChannel); | |
| 135 | + } | |
| 136 | + return deviceChannelList; | |
| 137 | + } else if (catalog == null || !catalogId.equals(platform.getDeviceGBId())) { | |
| 130 | 138 | logger.warn("未查询到目录{}的信息", catalogId); |
| 131 | 139 | return null; |
| 132 | 140 | } | ... | ... |