feat: 组织机构按名称检索

This commit is contained in:
fit2cloud-chenyw
2021-03-12 11:31:55 +08:00
parent a708919f70
commit 311cc48341
2 changed files with 51 additions and 9 deletions

View File

@@ -162,7 +162,7 @@ public class DeptService {
* @return
*/
private List<Long> upTree(List<SimpleTreeNode> allNodes, List<SimpleTreeNode> targetNodes){
final Map<Long, SimpleTreeNode> map = targetNodes.stream().collect(Collectors.toMap(SimpleTreeNode::getId, node -> node));
final Map<Long, SimpleTreeNode> map = allNodes.stream().collect(Collectors.toMap(SimpleTreeNode::getId, node -> node));
List<Long> results = targetNodes.parallelStream().flatMap(targetNode -> {
//向上逐级找爹
List<Long> ids = new ArrayList<>();