package com.ruoyi.ibs.list.controller;

import com.github.pagehelper.Page;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataPageInfo;
import com.ruoyi.ibs.list.domain.DwBGridCmpmCorpcustClaimDetailRpt;
import com.ruoyi.ibs.list.domain.DwBGridCmpmCorpcustClaimResultRpt;
import com.ruoyi.ibs.list.service.DwBGridCmpmCorpcustClaimRptService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@Api(tags = "海宁报表接口")
@RestController
@RequestMapping("/report")
public class DwBGridCmpmCorpcustClaimRptController extends BaseController {

    @Resource
    private DwBGridCmpmCorpcustClaimRptService dwBGridCmpmCorpcustClaimRptService;

    @GetMapping("/result/list")
    @Log(title = "查询海宁支行人员对公客户认领业绩统计报表")
    @ApiOperation("查询海宁支行人员对公客户认领业绩统计报表")
    public TableDataPageInfo<DwBGridCmpmCorpcustClaimResultRpt> resultList() {
        Page<Object> page = startPage();
        List<DwBGridCmpmCorpcustClaimResultRpt> list = dwBGridCmpmCorpcustClaimRptService.getResultList();
        return getDataTable(list, page);
    }

    @GetMapping("/detail/list")
    @Log(title = "查询海宁对公客户认领业绩明细报表")
    @ApiOperation("海宁对公客户认领业绩明细报表")
    public TableDataPageInfo<DwBGridCmpmCorpcustClaimDetailRpt> detailList() {
        Page<Object> page = startPage();
        List<DwBGridCmpmCorpcustClaimDetailRpt> list = dwBGridCmpmCorpcustClaimRptService.getDetailList();
        return getDataTable(list, page);
    }

}
