Browse Source

DeBugDeBugDeBug

buzhanyi 2 years ago
parent
commit
c800b93b37

+ 1 - 11
purchase-admin/src/main/java/com/ozs/web/controller/system/SysDeptController.java

@@ -50,21 +50,11 @@ public class SysDeptController extends BaseController {
         return success(depts);
     }
 
-    /**
-     * 获取部门列表(包含自己的祖级)
-     */
-    @GetMapping("/listAndF")
-    @ApiOperation("获取部门列表")
-    public AjaxResult listAndF(SysDept dept) {
-        List<SysDept> depts = deptService.selectDeptListAndF(dept);
-        return success(depts);
-    }
-
     /**
      * 获取部门列表(包含自己上一级)
      */
     @GetMapping("/listAndUp")
-    @ApiOperation("获取部门列表")
+    @ApiOperation("获取部门列表(包含自己上一级)")
     public AjaxResult listAndUp(SysDept dept) {
         List<SysDept> depts = deptService.selectDeptListAndUp(dept);
         return success(depts);

+ 9 - 0
purchase-admin/src/main/java/com/ozs/web/controller/system/SysUserController.java

@@ -374,4 +374,13 @@ public class SysUserController extends BaseController {
     public AjaxResult deptTree(SysDept dept) {
         return success(deptService.selectDeptTreeList(dept));
     }
+
+    /**
+     * 获取部门列表(包含自己的祖级)
+     */
+    @GetMapping("/deptTreeF")
+    @ApiOperation("获取部门树列表")
+    public AjaxResult deptTreeF(SysDept dept) {
+        return success(deptService.selectDeptTreeListF(dept));
+    }
 }

+ 9 - 0
purchase-system/src/main/java/com/ozs/system/service/ISysDeptService.java

@@ -46,6 +46,15 @@ public interface ISysDeptService {
      */
     public List<TreeSelect> selectDeptTreeList(SysDept dept);
 
+    /**
+     * 查询部门树结构信息
+     * 获取部门列表(包含自己的祖级)
+     *
+     * @param dept 部门信息
+     * @return 部门树信息集合
+     */
+    public List<TreeSelect> selectDeptTreeListF(SysDept dept);
+
     /**
      * 构建前端所需要树结构
      *

+ 12 - 0
purchase-system/src/main/java/com/ozs/system/service/impl/SysDeptServiceImpl.java

@@ -154,6 +154,18 @@ public class SysDeptServiceImpl implements ISysDeptService {
         return buildDeptTreeSelect(depts);
     }
 
+    /**
+     * 查询部门树结构信息
+     *
+     * @param dept 部门信息
+     * @return 部门树信息集合
+     */
+    @Override
+    public List<TreeSelect> selectDeptTreeListF(SysDept dept) {
+        List<SysDept> depts = SpringUtils.getAopProxy(this).selectDeptListAndF(dept);
+        return buildDeptTreeSelect(depts);
+    }
+
     /**
      * 构建前端所需要树结构
      *