From 5d3f307b44aa8df32c9d893764fb8525d51eda5c Mon Sep 17 00:00:00 2001 From: 648540858 <648540858@qq.com> Date: 星期三, 01 十一月 2023 14:07:32 +0800 Subject: [PATCH] 将录像存储路径迁移至wvp中配置,assist以有在需要视频合成的时候才会用 --- src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java | 25 ++++++++++++++----------- 1 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java old mode 100644 new mode 100755 index 58f6c94..9f2b5e0 --- a/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java +++ b/src/main/java/com/genersoft/iot/vmp/service/impl/PlatformChannelServiceImpl.java @@ -125,23 +125,26 @@ 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; } for (ChannelReduce channelReduce : channelReduces) { DeviceChannel deviceChannel = deviceChannelMapper.queryChannel(channelReduce.getDeviceId(), channelReduce.getChannelId()); deviceChannel.setParental(0); + deviceChannel.setCivilCode(catalog.getCivilCode()); + deviceChannel.setParentId(catalog.getParentId()); + deviceChannel.setBusinessGroupId(catalog.getBusinessGroupId()); deviceChannelList.add(deviceChannel); - if (platform.getTreeType().equals(TreeType.CIVIL_CODE)){ - deviceChannel.setCivilCode(catalogId); - }else if (platform.getTreeType().equals(TreeType.BUSINESS_GROUP)){ - deviceChannel.setParentId(catalogId); - if (catalog != null) { - deviceChannel.setBusinessGroupId(catalog.getBusinessGroupId()); - } - } } } return deviceChannelList; @@ -159,7 +162,7 @@ return 0; } if (ObjectUtils.isEmpty(catalogId)) { - catalogId = platform.getDeviceGBId(); + catalogId = null; } if ((result = platformChannelMapper.delChannelForGBByCatalogId(platformId, catalogId)) > 0) { -- Gitblit v1.8.0