| | |
| | | import com.java110.intf.user.IUserV1InnerServiceSMO; |
| | | import com.java110.utils.exception.CmdException; |
| | | import com.java110.utils.util.Assert; |
| | | import com.java110.utils.util.ListUtil; |
| | | import com.java110.utils.util.StringUtil; |
| | | import com.java110.vo.ResultVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | basePrivilegeDto.setResource("/viewAllOrganization"); |
| | | basePrivilegeDto.setUserId(reqJson.getString("userId")); |
| | | List<Map> privileges = menuInnerServiceSMOImpl.checkUserHasResource(basePrivilegeDto); |
| | | if (privileges.size() == 0) { |
| | | if (ListUtil.isNull(privileges)) { |
| | | //查询员工所属二级组织架构 |
| | | OrgStaffRelDto orgStaffRelDto = new OrgStaffRelDto(); |
| | | orgStaffRelDto.setStaffId(reqJson.getString("userId")); |
| | | List<OrgStaffRelDto> orgStaffRelDtos = iOrgStaffRelInnerServiceSMO.queryOrgInfoByStaffIdsNew(orgStaffRelDto); |
| | | if (orgStaffRelDtos.size() > 0) { |
| | | if (ListUtil.isNotNull(orgStaffRelDtos)) { |
| | | List<String> haveOrgList = new ArrayList<String>(); |
| | | for (OrgStaffRelDto orgStaffRelDto1 : orgStaffRelDtos) { |
| | | OrgDto orgDto1 = new OrgDto(); |
| | |
| | | } |
| | | } |
| | | |
| | | if (childs.size() < 1) { |
| | | if (ListUtil.isNull(childs)) { |
| | | return; |
| | | } |
| | | |
| | |
| | | |
| | | for (OrgDto orgDto : orgDtoList) { |
| | | haveOrgList.add(orgDto.getOrgId()); |
| | | if (!"1".equals(orgDto.getOrgLevel())) { |
| | | if ("2".equals(orgDto.getOrgLevel())) { |
| | | if (OrgDto.ORG_LEVEL_STORE.equals(orgDto.getOrgLevel())) { |
| | | continue; |
| | | } |
| | | if (OrgDto.ORG_LEVEL_COMPANY.equals(orgDto.getOrgLevel())) { |
| | | //上级别 |
| | | OrgDto orgDto1 = new OrgDto(); |
| | | orgDto1.setOrgId(orgDto.getParentOrgId()); |
| | |
| | | findCompany(haveOrgList, orgDtoList1); |
| | | |
| | | //下一个级别 |
| | | if (!"2".equals(orgDto.getOrgLevel())) { |
| | | if (!OrgDto.ORG_LEVEL_COMPANY.equals(orgDto.getOrgLevel())) { |
| | | OrgDto orgDto3 = new OrgDto(); |
| | | orgDto3.setParentOrgId(orgDto.getOrgId()); |
| | | List<OrgDto> orgDtoList2 = orgV1InnerServiceSMOImpl.queryOrgs(orgDto3); |
| | |
| | | haveOrgList.add(orgDto4.getOrgId()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |