package com.tofly.xrtygis.custom.controller.gs;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tofly.common.core.entity.ResultRespone;
import com.tofly.xrtygis.custom.entity.gs.NoteSearch;
import com.tofly.xrtygis.custom.entity.gs.StatisEntity;
import com.tofly.xrtygis.service.GdreturnService;
import com.tofly.xrtygis.service.PfrecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author FlashWJL
 * @date 2021/7/2 15:39
 */
@RestController
@AllArgsConstructor
@RequestMapping("/gsStatis")
@Api(tags = "热线--供水热线统计接口")
public class GsStatisticsController {

    private final PfrecordService pfrecordService;
    private final GdreturnService gdreturnService;

    @ApiOperation(value = "工单回访统计列表")
    @GetMapping("/gdReturn")
    public ResultRespone getGdReturn(Page page , StatisEntity entity) {
        return ResultRespone.success(gdreturnService.getGdReturn(page , entity));
    }

    @ApiOperation(value = "工单质检统计列表")
    @GetMapping("/gdQuality")
    public ResultRespone getGdQuality(Page page , StatisEntity entity) {
        return ResultRespone.success(pfrecordService.getGdQuality(page , entity));
    }

    @ApiOperation(value = "录音质检统计列表")
    @GetMapping("/LyQuality")
    public ResultRespone getLyQuality(Page page , StatisEntity entity) {
        return ResultRespone.success(pfrecordService.getLyQuality(page , entity));
    }



    @ApiOperation(value = "工单回访统计")
    @GetMapping("/returnStatis")
    public ResultRespone getReturnStatis() {
        return ResultRespone.success(gdreturnService.getReturnStatis());
    }

    @ApiOperation(value = "工单质检统计")
    @GetMapping("/qualityStatis")
    public ResultRespone getQualityStatis() {
        return ResultRespone.success(pfrecordService.getQualityStatis());
    }

    @ApiOperation(value = "录音质检统计")
    @GetMapping("/recordStatis")
    public ResultRespone getRecordStatis() {
        return ResultRespone.success(pfrecordService.getRecordStatis());
    }

}
