| | |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.errand.object.dto.sys.FinanceStatisticsDTO; |
| | | import com.ruoyi.errand.object.vo.sys.FinanceStatisticsVO; |
| | | import com.ruoyi.system.object.dto.AddDeptDTO; |
| | | import com.ruoyi.system.object.vo.SysDeptPageVO; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | } |
| | | |
| | | @PreAuthorize("@ss.hasPermi('system:user:list')") |
| | | @ApiOperation(value = "用户管理-部门选择框", tags = "系统后台-权限管理") |
| | | @ApiOperation(value = "账号管理-部门选择框", tags = "系统后台-权限管理") |
| | | @GetMapping("/list") |
| | | public AjaxResult list() { |
| | | List<SysDeptPageVO> list = deptService.getDeptList(); |
| | |
| | | @PreAuthorize("@ss.hasPermi('system:dept:list')") |
| | | @Log(title = "部门管理", businessType = BusinessType.INSERT) |
| | | @ApiOperation(value = "部门管理-新增部门", tags = "系统后台-权限管理") |
| | | @GetMapping("/add") |
| | | public AjaxResult add(@RequestParam("name")String name) { |
| | | deptService.add(name); |
| | | @PostMapping("/add") |
| | | public AjaxResult add(@RequestBody AddDeptDTO dto) { |
| | | deptService.add(dto.getName()); |
| | | return success(); |
| | | } |
| | | |
| | | /** |
| | | * 部门详情 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dept:list')") |
| | | @ApiOperation(value = "部门管理-查看部门(回显)", tags = "系统后台-权限管理") |
| | | @GetMapping("/{deptId}") |
| | | public AjaxResult detail(@PathVariable("deptId") Long deptId) { |
| | | SysDept sysDept = deptService.selectDeptById(deptId); |
| | | return success(sysDept); |
| | | } |
| | | /** |
| | | * 修改部门 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('system:dept:list')") |
| | | @Log(title = "部门管理", businessType = BusinessType.UPDATE) |
| | | @ApiOperation(value = "部门管理-新增部门", tags = "系统后台-权限管理") |
| | | @ApiOperation(value = "部门管理-修改部门", tags = "系统后台-权限管理") |
| | | @PutMapping("/edit") |
| | | public AjaxResult edit(@RequestParam("id")Long id, |
| | | @RequestParam("name")String name) { |