|
@@ -92,6 +92,21 @@ public class DeptController {
|
|
|
return success(BeanUtils.toBean(list, DeptSimpleRespVO.class));
|
|
|
}
|
|
|
|
|
|
+ @GetMapping("/specifiedSimpleDepts")
|
|
|
+ @Operation(summary = "获取指定部门精简信息列表", description = "只包含被开启的部门,主要用于前端的下拉选项")
|
|
|
+ @PermitAll
|
|
|
+ @Parameter(name = "deptId", description = "部门id", required = true, example = "1024")
|
|
|
+ public CommonResult<List<DeptSimpleRespVO>> specifiedSimpleDepts(@RequestParam("deptId") Long deptId) {
|
|
|
+ DeptListReqVO reqVO = new DeptListReqVO();
|
|
|
+ reqVO.setStatus(CommonStatusEnum.ENABLE.getStatus());
|
|
|
+ reqVO.setDeptId(deptId);
|
|
|
+ List<DeptDO> list = deptService.getChildDeptList(deptId);
|
|
|
+ // 查询 deptId 对应的部门 加入 最终返回的集合
|
|
|
+ DeptDO currentDept = deptService.getDept(deptId);
|
|
|
+ list.add(currentDept);
|
|
|
+ return success(BeanUtils.toBean(list, DeptSimpleRespVO.class));
|
|
|
+ }
|
|
|
+
|
|
|
@GetMapping("/get")
|
|
|
@Operation(summary = "获得部门信息")
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|