修复国标级联时添加目录不同平台无法使用同一个目录的问题

This commit is contained in:
648540858
2023-07-19 15:33:21 +08:00
parent 19533c8f4d
commit 9cd63f0105
10 changed files with 33 additions and 47 deletions

View File

@@ -114,7 +114,7 @@ public class GbStreamServiceImpl implements IGbStreamService {
deviceChannel.setRegisterWay(1);
PlatformCatalog catalog = catalogMapper.select(catalogId);
PlatformCatalog catalog = catalogMapper.selectByPlatFormAndCatalogId(platform.getServerGBId(), catalogId);
if (catalog != null) {
deviceChannel.setCivilCode(catalog.getCivilCode());
deviceChannel.setParentId(catalog.getParentId());
@@ -216,7 +216,7 @@ public class GbStreamServiceImpl implements IGbStreamService {
deviceChannel.setStatus(status != null && status);
deviceChannel.setRegisterWay(1);
PlatformCatalog catalog = catalogMapper.select(catalogId);
PlatformCatalog catalog = catalogMapper.selectByPlatFormAndCatalogId(platform.getServerGBId(), catalogId);
if (catalog != null) {
deviceChannel.setCivilCode(catalog.getCivilCode());
deviceChannel.setParentId(catalog.getParentId());

View File

@@ -125,7 +125,7 @@ public class PlatformChannelServiceImpl implements IPlatformChannelService {
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);
PlatformCatalog catalog = catalogManager.selectByPlatFormAndCatalogId(platform.getServerGBId(),catalogId);
if (catalog == null || !catalogId.equals(platform.getDeviceGBId())) {
logger.warn("未查询到目录{}的信息", catalogId);
return null;