Forráskód Böngészése

Merge remote-tracking branch 'origin/20210716' into 20210716

lin 3 éve
szülő
commit
3ff13a968a

+ 5 - 4
user_center/src/main/java/com/zcxk/service/impl/OrgServiceImpl.java

@@ -235,14 +235,15 @@ public class OrgServiceImpl implements OrgService {
 
         List<OrgTree> trees=new ArrayList<>();
         if("company".equals(org.getOrgType())){
-
-            if(currentUser.getDepartmentId()==null&&currentUser.getPermissonType()==2){
+            trees=orgMapper.selectTrees(org);
+            trees=getOrgTreeByOrg(trees,currentUser.getCompanyId(),orgIds);
+           /* if(currentUser.getDepartmentId()==null&&currentUser.getPermissonType()==2){
                 trees=orgMapper.selectTrees(org);
                 trees=getOrgTreeByOrg(trees,currentUser.getCompanyId(),orgIds);
             }else{
                 org.setId(currentUser.getCompanyId());
                 trees=orgMapper.selectTrees(org);
-            }
+            }*/
         }else{
             if(currentUser.getDepartmentId()!=null&&currentUser.getPermissonType()==4){
                 org.setOrgType("department");
@@ -271,7 +272,7 @@ public class OrgServiceImpl implements OrgService {
 
         }
 
-        trees=getOrgTree(trees,id,1,orgIds);
+        trees = getOrgTree(trees,id,1,orgIds);
         fatherOrgTree.setOrgs(trees);
         List<OrgTree> result=new ArrayList<>();
         result.add(fatherOrgTree);