zss
2024-06-21 3547641f25634eec4b6dcf379080e92ed5025ee1
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
package com.yuanchu.mom.controller;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuanchu.mom.annotation.ValueClassify;
import com.yuanchu.mom.pojo.AuxiliaryWorkingHours;
import com.yuanchu.mom.pojo.Evaluate;
import com.yuanchu.mom.service.EvaluateService;
import com.yuanchu.mom.utils.JackSonUtil;
import com.yuanchu.mom.vo.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;
 
/**
 * <p>
 * 人员考评 前端控制器
 * </p>
 *
 * @author 江苏鵷雏网络科技有限公司
 * @since 2024-06-17 01:32:45
 */
@Api(tags = "绩效管理-人员考评")
@RestController
@RequestMapping("/evaluate")
public class EvaluateController {
 
 
    @Resource
    private EvaluateService evaluateService;
 
    @ValueClassify("人员考评")
    @ApiOperation(value = "查询考评")
    @PostMapping("/page")
    public Result page(@RequestBody Map<String, Object> data) throws Exception {
        Page page = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("page")), Page.class);
        Evaluate entity = JackSonUtil.unmarshal(JackSonUtil.marshal(data.get("entity")), Evaluate.class);
        return Result.success(evaluateService.getPage(page, entity));
    }
 
    @ValueClassify("人员考评")
    @ApiOperation(value = "导出考评")
    @PostMapping("/exportEvaluate")
    public void exportEvaluate(@RequestParam("month") String month, @RequestParam("name") String name, @RequestParam("departLims") String departLims, HttpServletResponse response) throws IOException {
        evaluateService.export(month, name, departLims, response);
    }
 
}