提交 67edd30c 作者: 925993793@qq.com

【fix】专题绑定标签bug修改

上级 5b84ca14
...@@ -624,9 +624,9 @@ public class InformationServiceImpl implements InformationService { ...@@ -624,9 +624,9 @@ public class InformationServiceImpl implements InformationService {
} }
List<Label> labels = info.getLabels(); List<Label> labels = info.getLabels();
if (CollectionUtils.isNotEmpty(labels)) { if (CollectionUtils.isNotEmpty(labels)) {
List<String> dictIds = new ArrayList<>(); List<String> dictCodes = new ArrayList<>();
boundList.forEach(node -> dictIds.add(node.getId())); boundList.forEach(node -> dictCodes.add(node.getCode()));
List<Label> collect = labels.stream().filter(label -> dictIds.contains(label.getLabelMark())).collect(Collectors.toList()); List<Label> collect = labels.stream().filter(label -> dictCodes.contains(label.getLabelMark())).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(collect)) { if (CollectionUtils.isNotEmpty(collect)) {
List<String> dictItemIds = new ArrayList<>(); List<String> dictItemIds = new ArrayList<>();
dictItemList.forEach(sysDictItem -> dictItemIds.add(sysDictItem.getId())); dictItemList.forEach(sysDictItem -> dictItemIds.add(sysDictItem.getId()));
...@@ -636,7 +636,7 @@ public class InformationServiceImpl implements InformationService { ...@@ -636,7 +636,7 @@ public class InformationServiceImpl implements InformationService {
} }
} }
} }
List<Label> otherCollect = labels.stream().filter(label -> !dictIds.contains(label.getLabelMark())).collect(Collectors.toList()); List<Label> otherCollect = labels.stream().filter(label -> !dictCodes.contains(label.getLabelMark())).collect(Collectors.toList());
newLabels.addAll(otherCollect); newLabels.addAll(otherCollect);
} }
List<Label> finalList = newLabels.stream().collect(Collectors.collectingAndThen(Collectors.toMap(Label::getRelationId, p -> p, (p1, p2) -> p1), map -> new ArrayList<>(map.values()))); List<Label> finalList = newLabels.stream().collect(Collectors.collectingAndThen(Collectors.toMap(Label::getRelationId, p -> p, (p1, p2) -> p1), map -> new ArrayList<>(map.values())));
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论