|
|
@ -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; |
|
|
|