package com.yuanchu.mom.controller;
|
|
import com.yuanchu.mom.annotation.ValueAuth;
|
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.*;
|
|
/**
|
* <p>
|
* 组织架构明细 前端控制器
|
* </p>
|
*
|
* @author 江苏鵷雏网络科技有限公司
|
* @since 2024-04-15 04:01:48
|
*/
|
@Api(tags = "人员明细")
|
@AllArgsConstructor
|
@RestController
|
@RequestMapping("/department")
|
public class DepartmentController {
|
|
private DepartmentService departmentService;
|
|
private DepartmentLimsService departmentLimsService;
|
|
@ValueClassify("用户管理")
|
@ApiOperation(value = "添加组织架构")
|
@PostMapping("/addDepartment")
|
public Result addDepartment(@RequestBody Department department) {
|
return Result.success(departmentService.addDepartment(department));
|
}
|
@ApiOperation(value = "获取组织架构树")
|
@GetMapping("/selectDepartment")
|
@ValueClassify("用户管理")
|
public Result selectDepartment() {
|
return Result.success(departmentService.selectDepartment());
|
}
|
@ValueClassify("用户管理")
|
@ApiOperation(value = "删除组织架构")
|
@PostMapping("/delDepartment")
|
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));
|
}
|
|
@ValueAuth
|
@ApiOperation(value = "获取组织架构枚举")
|
@GetMapping("/selectDepartmentEnum")
|
public Result selectDepartmentEnum() {
|
return Result.success(departmentService.selectDepartmentEnum());
|
}
|
}
|