| | |
| | | package com.yuanchu.mom.controller; |
| | | |
| | | import com.yuanchu.mom.annotation.ValueClassify; |
| | | import com.yuanchu.mom.pojo.Department; |
| | | import com.yuanchu.mom.pojo.DepartmentLims; |
| | | import com.yuanchu.mom.service.DepartmentLimsService; |
| | | import com.yuanchu.mom.service.DepartmentService; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.stereotype.Controller; |
| | | |
| | | /** |
| | | * <p> |
| | | * 部门明细 前端控制器 |
| | | * 组织架构明细 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author 江苏鵷雏网络科技有限公司 |
| | |
| | | @RequestMapping("/department") |
| | | public class DepartmentController { |
| | | |
| | | DepartmentService departmentService; |
| | | private DepartmentService departmentService; |
| | | |
| | | @ApiOperation(value = "添加部门") |
| | | private DepartmentLimsService departmentLimsService; |
| | | |
| | | @ValueClassify("用户管理") |
| | | @ApiOperation(value = "添加组织架构") |
| | | @PostMapping("/addDepartment") |
| | | public Result addDepartment(@RequestBody Department department){ |
| | | public Result addDepartment(@RequestBody Department department) { |
| | | return Result.success(departmentService.addDepartment(department)); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取部门树") |
| | | @ApiOperation(value = "获取组织架构树") |
| | | @GetMapping("/selectDepartment") |
| | | public Result selectDepartment(){ |
| | | @ValueClassify("用户管理") |
| | | public Result selectDepartment() { |
| | | return Result.success(departmentService.selectDepartment()); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除部门") |
| | | @ValueClassify("用户管理") |
| | | @ApiOperation(value = "删除组织架构") |
| | | @PostMapping("/delDepartment") |
| | | public Result delDepartment(Integer id){ |
| | | public Result delDepartment(Integer id) { |
| | | return Result.success(departmentService.delDepartment(id)); |
| | | } |
| | | |
| | | @ValueClassify("人员明细") |
| | | @ApiOperation(value = "获取组织架构树") |
| | | @GetMapping("/selectDepartmentLim") |
| | | public Result selectDepartmentLim() { |
| | | return Result.success(departmentLimsService.selectDepartment()); |
| | | } |
| | | |
| | | @ValueClassify("人员明细") |
| | | @ApiOperation(value = "添加组织架构") |
| | | @PostMapping("/addDepartmentLims") |
| | | public Result addDepartmentLims(@RequestBody DepartmentLims department) { |
| | | return Result.success(departmentLimsService.addDepartment(department)); |
| | | } |
| | | |
| | | |
| | | @ValueClassify("人员明细") |
| | | @ApiOperation(value = "删除组织架构") |
| | | @PostMapping("/delDepartmentLims") |
| | | public Result delDepartmentLims(Integer id) { |
| | | return Result.success(departmentLimsService.delDepartment(id)); |
| | | } |
| | | } |