hexiao 2 年之前
父節點
當前提交
963a2c4501
共有 1 個文件被更改,包括 12 次插入4 次删除
  1. 12 4
      purchase-admin/src/main/java/com/ozs/web/controller/system/SysDeptController.java

+ 12 - 4
purchase-admin/src/main/java/com/ozs/web/controller/system/SysDeptController.java

@@ -44,8 +44,17 @@ public class SysDeptController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:dept:list')")
     @GetMapping("/list")
     @ApiOperation("获取部门列表")
-    public AjaxResult list(SysDept dept)
-    {
+    public AjaxResult list(SysDept dept) {
+        List<SysDept> depts = deptService.selectDeptList(dept);
+        return success(depts);
+    }
+
+    /**
+     * 获取部门列表
+     */
+    @GetMapping("/listByUser")
+    @ApiOperation("获取部门列表")
+    public AjaxResult listByUser() {
         List<SysDept> depts = deptService.selectDeptList(dept);
         return success(depts);
     }
@@ -56,8 +65,7 @@ public class SysDeptController extends BaseController
     @PreAuthorize("@ss.hasPermi('system:dept:list')")
     @GetMapping("/list/exclude/{deptId}")
     @ApiOperation("查询部门列表(排除节点)")
-    public AjaxResult excludeChild(@PathVariable(value = "deptId", required = false) Long deptId)
-    {
+    public AjaxResult excludeChild(@PathVariable(value = "deptId" , required = false) Long deptId) {
         List<SysDept> depts = deptService.selectDeptList(new SysDept());
         depts.removeIf(d -> d.getDeptId().intValue() == deptId || ArrayUtils.contains(StringUtils.split(d.getAncestors(), ","), deptId + ""));
         return success(depts);