|
|
|
|
@ -1,18 +1,5 @@
|
|
|
|
|
package com.ruoyi.web.controller.system;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.DeleteMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PutMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
import com.ruoyi.common.annotation.Log;
|
|
|
|
|
import com.ruoyi.common.constant.UserConstants;
|
|
|
|
|
import com.ruoyi.common.core.controller.BaseController;
|
|
|
|
|
@ -21,6 +8,13 @@ import com.ruoyi.common.core.domain.entity.SysDept;
|
|
|
|
|
import com.ruoyi.common.enums.BusinessType;
|
|
|
|
|
import com.ruoyi.common.utils.StringUtils;
|
|
|
|
|
import com.ruoyi.system.service.ISysDeptService;
|
|
|
|
|
import org.apache.commons.lang3.ArrayUtils;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
|
import org.springframework.security.access.prepost.PreAuthorize;
|
|
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 部门信息
|
|
|
|
|
@ -129,4 +123,14 @@ public class SysDeptController extends BaseController
|
|
|
|
|
deptService.checkDeptDataScope(deptId);
|
|
|
|
|
return toAjax(deptService.deleteDeptById(deptId));
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 根据部门id查询父级部门id及名称
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/getParentByDeptId")
|
|
|
|
|
public AjaxResult getDeptByDeptId(SysDept dept)
|
|
|
|
|
{
|
|
|
|
|
SysDept sysDept = deptService.selectDeptById(dept.getDeptId());
|
|
|
|
|
SysDept parentDept= deptService.selectDeptById(sysDept.getParentId());
|
|
|
|
|
return success(parentDept);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|