liyong
8 天以前 1ab2b329a40decba8ff7eefbeb158ff259aceb6d
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 cn.iocoder.yudao.module.crm.controller.admin.statistics;
 
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceReqVO;
import cn.iocoder.yudao.module.crm.controller.admin.statistics.vo.performance.CrmStatisticsPerformanceRespVO;
import cn.iocoder.yudao.module.crm.service.statistics.CrmStatisticsPerformanceService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
import jakarta.annotation.Resource;
import jakarta.validation.Valid;
import java.util.List;
 
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
 
 
@Tag(name = "管理后台 - CRM 员工业绩统计")
@RestController
@RequestMapping("/crm/statistics-performance")
@Validated
public class CrmStatisticsPerformanceController {
 
    @Resource
    private CrmStatisticsPerformanceService performanceService;
 
    @GetMapping("/get-contract-count-performance")
    @Operation(summary = "合同数量统计", description = "用于【合同数量分析】页面")
    @PreAuthorize("@ss.hasPermission('crm:statistics-performance:query')")
    public CommonResult<List<CrmStatisticsPerformanceRespVO>> getContractCountPerformance(@Valid CrmStatisticsPerformanceReqVO performanceReqVO) {
        return success(performanceService.getContractCountPerformance(performanceReqVO));
    }
 
    @GetMapping("/get-contract-price-performance")
    @Operation(summary = "合同金额统计")
    @PreAuthorize("@ss.hasPermission('crm:statistics-performance:query')")
    public CommonResult<List<CrmStatisticsPerformanceRespVO>> getContractPriceStaffPerformance(@Valid CrmStatisticsPerformanceReqVO performanceReqVO) {
        return success(performanceService.getContractPricePerformance(performanceReqVO));
    }
 
    @GetMapping("/get-receivable-price-performance")
    @Operation(summary = "回款金额统计")
    @PreAuthorize("@ss.hasPermission('crm:statistics-performance:query')")
    public CommonResult<List<CrmStatisticsPerformanceRespVO>> getReceivablePriceStaffPerformance(@Valid CrmStatisticsPerformanceReqVO performanceReqVO) {
        return success(performanceService.getReceivablePricePerformance(performanceReqVO));
    }
 
}