| | |
| | | @Authorization |
| | | public TableDataInfo selectJurisdiction(@CurrentUser SysUser sysUser) |
| | | { |
| | | List<String> ids=PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | List<OrganizationChartEntity> organizations=iOrganizationChartService.selectConfigList("","",ids); |
| | | |
| | | return getDataTable(organizations); |
| | | return getDataTable(iOrganizationChartService.selectConfigList(sysUser.getDepartmentId(),"",null)); |
| | | } |
| | | |
| | | /** |
| | |
| | | public TableDataInfo getOrganizations(@RequestParam(value = "department",required = false) String departmentId) |
| | | { |
| | | List<OrganizationChartEntity> ids=new ArrayList<>(); |
| | | List<OrganizationChartEntity> lists = iOrganizationChartService.selectParentList(departmentId,""); |
| | | List<OrganizationChartEntity> lists=null; |
| | | if(StringUtils.isEmpty(departmentId)) |
| | | { |
| | | lists= iOrganizationChartService.selectParentList(null,"1"); |
| | | |
| | | } |
| | | else |
| | | { |
| | | lists= iOrganizationChartService.selectParentList(departmentId,null); |
| | | } |
| | | |
| | | if(lists.size()<1) |
| | | { |
| | | lists.add(iOrganizationChartService.selectConfigById(departmentId)); |
| | |
| | | { |
| | | return null; |
| | | } |
| | | ids.add(iOrganizationChartService.selectConfigById(departmentId)); |
| | | |
| | | if(!StringUtils.isEmpty(departmentId)) |
| | | { |
| | | ids.add(iOrganizationChartService.selectConfigById(departmentId)); |
| | | } |
| | | |
| | | return getDataTable(ids); |
| | | } |
| | | |