zss
2024-08-23 8a9505bd7845d50e83fae7adf4846931979c1419
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
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());
    }
 
    @ValueAuth
    @ApiOperation(value = "获取用户管理组织架构枚举")
    @GetMapping("/selectDepartmentLimsEnum")
    public Result selectDepartmentLimsEnum() {
        return Result.success(departmentLimsService.selectDepartmentLimsEnum());
    }
}