| | |
| | | package com.dg.core.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.annotation.CurrentUser; |
| | | import com.dg.core.db.gen.entity.ClassifyAdministration; |
| | | import com.dg.core.db.gen.entity.OrganizationChartEntity; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IOrganizationChartService; |
| | |
| | | public ResultData deleteConfigById(@RequestParam(value = "Id",required = false) String Id) |
| | | { |
| | | Assert.notNull(Id, "Id 不能为空"); |
| | | OrganizationChartEntity entity=iOrganizationChartService.selectConfigById(Id); |
| | | if(!StringUtils.isEmpty(entity.getParentId())) |
| | | { |
| | | return ResultData.error("该机构下存在其他部门!请先删除子部门"); |
| | | } |
| | | return toAjax(iOrganizationChartService.deleteConfigById(Id)); |
| | | } |
| | | |
| | |
| | | * @param departmentId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "根据id查取消组织机构",response = OrganizationChartEntity.class) |
| | | @ApiOperation(value = "通过父级id查询对应机构下的全部部门",response = OrganizationChartEntity.class) |
| | | @GetMapping("/getdepartment") |
| | | public TableDataInfo getIds(@RequestParam(value = "department",required = false) String departmentId) |
| | | { |
| | |
| | | return getDataTable(ids); |
| | | } |
| | | |
| | | |
| | | //递归取id |
| | | private List<OrganizationChartEntity> disposestreetId(List<OrganizationChartEntity> lists) |
| | | { |
| | |
| | | } |
| | | return ids; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |