Browse Source

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

lin 3 years ago
parent
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<>();
         List<OrgTree> trees=new ArrayList<>();
         if("company".equals(org.getOrgType())){
         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=orgMapper.selectTrees(org);
                 trees=getOrgTreeByOrg(trees,currentUser.getCompanyId(),orgIds);
                 trees=getOrgTreeByOrg(trees,currentUser.getCompanyId(),orgIds);
             }else{
             }else{
                 org.setId(currentUser.getCompanyId());
                 org.setId(currentUser.getCompanyId());
                 trees=orgMapper.selectTrees(org);
                 trees=orgMapper.selectTrees(org);
-            }
+            }*/
         }else{
         }else{
             if(currentUser.getDepartmentId()!=null&&currentUser.getPermissonType()==4){
             if(currentUser.getDepartmentId()!=null&&currentUser.getPermissonType()==4){
                 org.setOrgType("department");
                 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);
         fatherOrgTree.setOrgs(trees);
         List<OrgTree> result=new ArrayList<>();
         List<OrgTree> result=new ArrayList<>();
         result.add(fatherOrgTree);
         result.add(fatherOrgTree);