From ab795dcf9b4783682fbb85c37d5c20b2b9006a86 Mon Sep 17 00:00:00 2001 From: heheng <475597332@qq.com> Date: 星期三, 09 七月 2025 09:49:33 +0800 Subject: [PATCH] 优化改造sql --- multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysDeptController.java | 34 +++++++++++++++++++++++++++++++++- 1 files changed, 33 insertions(+), 1 deletions(-) diff --git a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysDeptController.java b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysDeptController.java index 646990a..45f5d0c 100644 --- a/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysDeptController.java +++ b/multi-admin/src/main/java/com/gkhy/exam/admin/controller/system/SysDeptController.java @@ -4,8 +4,10 @@ import cn.hutool.core.util.ObjectUtil; import com.gkhy.exam.common.api.CommonResult; import com.gkhy.exam.common.constant.UserConstant; +import com.gkhy.exam.common.domain.TreeSelect; import com.gkhy.exam.common.domain.entity.SysDept; import com.gkhy.exam.system.domain.SysFunctionalDistribution; +import com.gkhy.exam.system.domain.req.SysDeptPageReq; import com.gkhy.exam.system.domain.vo.DeptVo; import com.gkhy.exam.system.domain.vo.FunctionalDistributionVo; import com.gkhy.exam.system.domain.vo.SysDeptResponsibilityReqVo; @@ -51,6 +53,36 @@ { List<DeptVo> depts = deptService.selectDeptList(dept); return CommonResult.success(depts); + } + + @GetMapping("/getOutDeptList") + @ApiOperation(value = "获取部门列表简化版本") + public CommonResult getOutDeptList(SysDept dept) + { + List<SysDept> outDeptList = deptService.getOutDeptList(dept); + return CommonResult.success(outDeptList); + } + + + @GetMapping("/pageList") + @ApiImplicitParams({ + @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"), + @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"), + }) + @ApiOperation(value = "获取部门列表分页") + public CommonResult pageList(SysDeptPageReq dept) + { + return CommonResult.success(deptService.selectDeptPageList(dept)); + } + + + + @GetMapping("/treeList") + @ApiOperation(value = "获取部门列表树状") + public CommonResult treeList(SysDept dept) + { + List<SysDept> treeSelects = deptService.selectDeptTreeList(dept); + return CommonResult.success(treeSelects); } @@ -127,7 +159,7 @@ @ApiImplicitParams({ @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "Long", required = true, value = "公司id"), }) - public CommonResult initFunctionalDistribution(@RequestParam Long companyId) { + public CommonResult initFunctionalDistribution(@RequestParam("companyId") Long companyId) { return CommonResult.success(deptService.initFunctionalDistribution(companyId)); } -- Gitblit v1.9.2