完善目录推送
parent
635458d19a
commit
4dd656b29b
|
@ -450,7 +450,7 @@ public class CommonGBChannel {
|
|||
CommonGBChannel commonGBChannel = new CommonGBChannel();
|
||||
commonGBChannel.setGbDeviceId(region.getDeviceId());
|
||||
commonGBChannel.setGbName(region.getName());
|
||||
return null;
|
||||
return commonGBChannel;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -420,7 +420,7 @@ public interface CommonGBChannelMapper {
|
|||
" coalesce(wpgc.manufacturer, wdc.gb_manufacturer, wdc.manufacturer) as gb_manufacturer,\n" +
|
||||
" coalesce(wpgc.model, wdc.gb_model, wdc.model) as gb_model,\n" +
|
||||
" coalesce(wpgc.owner, wdc.gb_owner, wdc.owner) as gb_owner,\n" +
|
||||
" coalesce(wpgc.civil_code, wdc.gb_civil_code, wdc.civil_code),\n" +
|
||||
" coalesce(wpgc.civil_code, wdc.gb_civil_code, wdc.civil_code) as gb_civil_code,\n" +
|
||||
" coalesce(wpgc.block, wdc.gb_block, wdc.block) as gb_block,\n" +
|
||||
" coalesce(wpgc.address, wdc.gb_address, wdc.address) as gb_address,\n" +
|
||||
" coalesce(wpgc.parental, wdc.gb_parental, wdc.parental) as gb_parental,\n" +
|
||||
|
|
|
@ -179,4 +179,13 @@ public interface GroupMapper {
|
|||
" <foreach collection='regionChannelList' item='item' open='(' separator=',' close=')' > #{item.parentDeviceId}</foreach>" +
|
||||
" </script>")
|
||||
Set<Group> queryParentInChannelList(Set<Group> regionChannelList);
|
||||
|
||||
@Select(" <script>" +
|
||||
" SELECT " +
|
||||
" * " +
|
||||
" from wvp_common_group " +
|
||||
" where device_id in " +
|
||||
" <foreach collection='channelList' item='item' open='(' separator=',' close=')' > #{item.gbBusinessGroupId}</foreach>" +
|
||||
" </script>")
|
||||
Set<Group> queryBusinessGroupInChannelList(List<CommonGBChannel> channelList);
|
||||
}
|
||||
|
|
|
@ -329,6 +329,7 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||
if (!regionChannelList.isEmpty()) {
|
||||
// 获取这些节点的所有父节点, 使用set滤重
|
||||
Set<Region> allRegion = getAllRegion(regionChannelList);
|
||||
allRegion.addAll(regionChannelList);
|
||||
for (Region region : allRegion) {
|
||||
channelList.add(CommonGBChannel.build(region));
|
||||
}
|
||||
|
@ -336,10 +337,17 @@ public class GbChannelServiceImpl implements IGbChannelService {
|
|||
}
|
||||
// 是否包含分组信息
|
||||
if (platform.getCatalogWithGroup()) {
|
||||
// 虚拟组织
|
||||
Set<Group> groupChannelList = groupMapper.queryInChannelList(commonGBChannelList);
|
||||
// 业务分组
|
||||
Set<Group> businessGroupChannelList = groupMapper.queryBusinessGroupInChannelList(commonGBChannelList);
|
||||
if (!groupChannelList.isEmpty()) {
|
||||
// 获取这些节点的所有父节点
|
||||
Set<Group> allGroup = getAllGroup(groupChannelList);
|
||||
allGroup.addAll(groupChannelList);
|
||||
if (!businessGroupChannelList.isEmpty()) {
|
||||
allGroup.addAll(businessGroupChannelList);
|
||||
}
|
||||
for (Group group : allGroup) {
|
||||
channelList.add(CommonGBChannel.build(group));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue