whyclxw
2024-04-22 ec33a306d97e52eb725b47f48d337ce357a8ef6a
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
package com.whyc.controller;
 
import com.whyc.dto.Response;
import com.whyc.service.KPIService;
import com.whyc.util.ActionUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
 
/**
 * 绩效考核
 */
@RequestMapping("kpi")
@RestController
@Api(tags = "项目绩效考核")
public class KPIController {
 
    @Autowired
    private KPIService service;
 
    @GetMapping("annualDetail")
    @ApiOperation("年度工作考核明细")
    public Response getAnnualDetail(@RequestParam(required = false) Integer limitN) {
        int userId = ActionUtil.getUser().getUId().intValue();
        return service.getAnnualDetail(limitN, userId);
    }
 
    @GetMapping("annualStatisticByGroupName")
    @ApiOperation("年度统计-班组")
    public Response getAnnualStatisticByGroupName(@RequestParam(required = false) Integer limitN) {
        int userId = ActionUtil.getUser().getUId().intValue();
        return service.getAnnualStatisticByGroupName(limitN, userId);
    }
 
    @GetMapping("annualStatisticByGroupNameAndUser")
    @ApiOperation("年度统计-班组和用户")
    public Response getAnnualStatisticByGroupNameAndUser() {
        int userId = ActionUtil.getUser().getUId().intValue();
        return service.getAnnualStatisticByGroupNameAndUser(userId);
    }
 
}