heheng
2024-11-26 c9d2e60f7d1a5cfe9e5b2da93af4d9edeecf5577
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
package com.gkhy.web.controller.bussiness;
 
import com.gkhy.common.core.controller.BaseController;
import com.gkhy.common.core.domain.AjaxResult;
import com.gkhy.common.core.page.TableDataInfo;
import com.gkhy.system.domain.Evaluation;
import com.gkhy.system.service.IEvaluationService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
/**
 * 考评管理Controller
 *
 * @author expert
 * @date 2024-11-13
 */
@RestController
@Api(tags = "考评管理-考评管理前端控制器")
@RequestMapping("/system/evaluation")
public class EvaluationController extends BaseController {
    @Autowired
    private IEvaluationService evaluationService;
 
    /**
     * 查询考评管理列表
     */
    //@PreAuthorize("@ss.hasPermi('system:evaluation:list')")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10,最大50")
    })
    @ApiOperation(value = "考评管理列表")
    @GetMapping("/list")
    public TableDataInfo list(Evaluation evaluation) {
        startPage();
        List<Evaluation> list = evaluationService.selectEvaluationList(evaluation);
        return getDataTable(list);
    }
 
 
    /**
     * 新增考评管理
     */
    // @PreAuthorize("@ss.hasPermi('system:evaluation:add')")
    @PostMapping("/add")
    @ApiOperation(value = "新增考评管理")
    public AjaxResult add(@Validated @RequestBody Evaluation evaluation) {
        return toAjax(evaluationService.insertEvaluation(evaluation));
    }
 
    /**
     * 修改考评管理
     */
    //@PreAuthorize("@ss.hasPermi('system:evaluation:edit')")
    @PutMapping("/edit")
    @ApiOperation(value = "修改考评管理")
    public AjaxResult edit(@Validated @RequestBody Evaluation evaluation) {
        return toAjax(evaluationService.updateEvaluation(evaluation));
    }
 
    /**
     * 删除考评管理
     */
    //@PreAuthorize("@ss.hasPermi('system:evaluation:remove')")
    @DeleteMapping("/{ids}")
    @ApiOperation(value = "删除考评管理")
    public AjaxResult remove(@PathVariable Long[] ids) {
        return toAjax(evaluationService.deleteEvaluationByIds(ids));
    }
}