List<BiUser> userList = thirdPartyApiServiceFactory.getInstance(systemId).getAllUser(systemId, getTenantParam());
List<BiDepartment> departList = thirdPartyApiServiceFactory.getInstance(systemId).getAllDepart(systemId, getTenantParam());
DepartTree departTree = createDepartTree(departList);
List<JSONObject> userJsonList = new ArrayList<>();
List<JSONObject> departJsonList = new ArrayList<>();
Long departId = null;
if(departId == null){
for(DepartNode node:departTree.getRoot().getChildren()){
departJsonList.add(createDepartJson(node.getDepartment()));
}
for(BiUser user:userList){
userJsonList.add(createUserJson(user));
}
}else if(departTree.getDepartNodeMap().containsKey(departId)) {
for(DepartNode node:departTree.getDepartNodeMap().get(departId).getChildren()){
生成部门树
最新推荐文章于 2024-05-06 13:50:12 发布