|
|
|
@ -1,5 +1,6 @@
|
|
|
|
|
package com.ibeetl.admin.core.service;
|
|
|
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
|
import cn.hutool.extra.spring.SpringUtil;
|
|
|
|
|
import com.ibeetl.admin.core.dao.*;
|
|
|
|
|
import com.ibeetl.admin.core.entity.*;
|
|
|
|
@ -24,6 +25,7 @@ import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
import java.util.Set;
|
|
|
|
|
import java.util.concurrent.ConcurrentHashMap;
|
|
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
|
import static com.ibeetl.admin.core.util.servlet.ServletUtils.getRequest;
|
|
|
|
|
|
|
|
|
@ -193,7 +195,19 @@ public class CorePlatformService {
|
|
|
|
|
OrgItem root = self.buildOrg();
|
|
|
|
|
return root;
|
|
|
|
|
}
|
|
|
|
|
OrgItem current = getCurrentOrgItem();
|
|
|
|
|
|
|
|
|
|
// 院校管理员只能查看自己组织下的信息
|
|
|
|
|
CoreUser currentUser = getCurrentUser();
|
|
|
|
|
boolean uniAdmin = currentUser.isUniAdmin();
|
|
|
|
|
OrgItem currentOrgItem = getCurrentOrgItem();
|
|
|
|
|
|
|
|
|
|
if (uniAdmin && ObjectUtil.isNotEmpty(currentOrgItem.getChildren())) {
|
|
|
|
|
List<OrgItem> children = currentOrgItem.getChildren();
|
|
|
|
|
|
|
|
|
|
List<OrgItem> collect = children.stream().filter(item -> item.getOrg().getId().equals(currentUser.getOrgId())).collect(Collectors.toList());
|
|
|
|
|
currentOrgItem.setChildren(collect);
|
|
|
|
|
}
|
|
|
|
|
OrgItem current = currentOrgItem;
|
|
|
|
|
OrgItem item= dataAccessFactory.getUserOrgTree(current);
|
|
|
|
|
|
|
|
|
|
return item;
|
|
|
|
|