package com.zcloud.safetyDutyList.web.tasklist;

import com.alibaba.cola.dto.MultiResponse;
import com.alibaba.cola.dto.PageResponse;
import com.zcloud.safetyDutyList.api.tasklist.TaskListServiceI;
import com.zcloud.safetyDutyList.dto.clientobject.tasklist.*;
import com.zcloud.safetyDutyList.dto.tasklist.*;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

@Api(tags = "统计分析")
@RequestMapping("/${application.gateway}/statistics")
@RestController
@AllArgsConstructor
public class StatisticsController {
    private final TaskListServiceI taskListService;

//    @ApiOperation("获取统计信息")
//    @PostMapping("/list")
//    public MultiResponse<TaskListStatisticsCO> statistics(@RequestBody TaskListStatisticsQry qry) {
//        return taskListService.statistics(qry);
//    }

    @ApiOperation("获取企业统计（股份端）")
    @PostMapping("/corpStatistics")
    public PageResponse<CorpStatisticsCO> corpStatistics(@RequestBody CorpStatisticsQry qry) {
        return taskListService.corpStatistics(qry);
    }

    @ApiOperation("获取企业评价列表")
    @PostMapping("/evaluationList")
    public PageResponse<EvaluationListCO> evaluationList(@RequestBody EvaluationListQry qry) {
        return taskListService.evaluationList(qry);
    }

    @ApiOperation("获取企业任务下发统计数")
    @PostMapping("/issueStatistics")
    public PageResponse<IssueStatisticsCO> issueStatistics(@RequestBody IssueStatisticsQry qry) {
        return taskListService.issueStatistics(qry);
    }
}
