feature:开票组织树重复项bug修复

release
gaorl 2 years ago
parent be2bcd3dbb
commit 1e13e02c47
  1. 8
      order-management-base-service/src/main/java/com/dxhy/order/baseservice/module/groupmanagement/service/impl/GroupManagementServiceImpl.java

@ -211,9 +211,11 @@ public class GroupManagementServiceImpl implements GroupManagementService {
*/ */
public List<GroupTreeVO> buildGroupTree(List<TaxPlayerCodeDept> taxplayercodeDeptList) { public List<GroupTreeVO> buildGroupTree(List<TaxPlayerCodeDept> taxplayercodeDeptList) {
//查找出level最小的节点 //查找出level最小的节点
// TaxPlayerCodeDept taxPlayerCodeDeptMinLevel = taxplayercodeDeptList.stream().min(Comparator.comparing(TaxPlayerCodeDept::getLevel)).get(); //TaxPlayerCodeDept taxPlayerCodeDeptMinLevel = taxplayercodeDeptList.stream().min(Comparator.comparing(TaxPlayerCodeDept::getLevel)).get();
// String parentId = StringUtils.isBlank(taxPlayerCodeDeptMinLevel.getParentId()) ? "0" : taxPlayerCodeDeptMinLevel.getParentId(); //String parentId = StringUtils.isBlank(taxPlayerCodeDeptMinLevel.getParentId()) ? "0" : taxPlayerCodeDeptMinLevel.getParentId();
List<String> parentIdList = taxplayercodeDeptList.stream().map(DeptEntity::getParentId).collect(Collectors.toList()); List<String> parentIdList = taxplayercodeDeptList.stream().map(DeptEntity::getParentId).distinct().collect(Collectors.toList());
List<String> collect = taxplayercodeDeptList.stream().map(DeptEntity::getDeptId).distinct().collect(Collectors.toList());
parentIdList = parentIdList.stream().filter(t->!collect.contains(t)).collect(Collectors.toList());
List<TreeNode<String>> nodeList = CollUtil.newArrayList(); List<TreeNode<String>> nodeList = CollUtil.newArrayList();
taxplayercodeDeptList.forEach(taxPlayerCodeDept -> { taxplayercodeDeptList.forEach(taxPlayerCodeDept -> {
TreeNode<String> treeNode; TreeNode<String> treeNode;

Loading…
Cancel
Save