| | |
| | | */ |
| | | @ApiOperation("删除机构") |
| | | @DeleteMapping("/delete") |
| | | @Authorization |
| | | // @Authorization |
| | | public ResultData deleteConfigById(@RequestParam(value = "Id",required = false) String Id) |
| | | { |
| | | Assert.notNull(Id, "Id 不能为空"); |
| | | OrganizationChartEntity entity=iOrganizationChartService.selectConfigById(Id); |
| | | List<OrganizationChartEntity> list=iOrganizationChartService.selectParentList(Id,""); |
| | | |
| | | List<OrganizationChartEntity> list=iOrganizationChartService.selectConfigList(entity.getId()+"",""); |
| | | |
| | | if(list.size()>0) |
| | | if(list!=null && list.size()>0) |
| | | { |
| | | return ResultData.error("该机构下存在其他部门!请先删除子部门"); |
| | | } |
| | |
| | | public TableDataInfo getOrganizations(@RequestParam(value = "department",required = false) String departmentId) |
| | | { |
| | | List<OrganizationChartEntity> ids=new ArrayList<>(); |
| | | List<OrganizationChartEntity> lists = iOrganizationChartService.selectConfigList(departmentId,""); |
| | | List<OrganizationChartEntity> lists = iOrganizationChartService.selectParentList(departmentId,""); |
| | | if(lists.size()<1) |
| | | { |
| | | lists.add(iOrganizationChartService.selectConfigById(departmentId)); |