package com.tofly.feesapi.sfgl.controller;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.tofly.feesapi.common.core.ResultRespone;
import com.tofly.feesapi.common.core.dto.PageDto;
import com.tofly.feesapi.common.core.vo.PageResult;
import com.tofly.feesapi.sfgl.entity.dto.*;
import com.tofly.feesapi.sfgl.entity.vo.*;
import com.tofly.feesapi.sfgl.service.YySspjxxReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

@RestController
@RequestMapping("/yysspjxxReport")
@Api(tags = "收费报表")
public class YySspjxxReportController {

    @Autowired
    private YySspjxxReportService yySspjxxReportService;

    @ApiOperationSupport(order = 1)
    @ApiOperation(value = "收费日结报表")
    @GetMapping("/reportDay")
    public ResultRespone<List<YySspjxxReport>> getYySspjxxReport(HttpServletResponse response, YySspjxxReportFilter filter) {
       return ResultRespone.success(yySspjxxReportService.getYySspjxxReport(response,filter));
    }

    @ApiOperationSupport(order = 2)
    @ApiOperation(value = "收费明细账单", tags = {"收费明细账单"})
    @GetMapping("/reportMx")
    public ResultRespone<PageResult<YySspjxxMxReport>> getYySspjxxMxReport(HttpServletResponse response, PageDto pageDto, YySspjxxMxFilter filter) {
        return ResultRespone.success(yySspjxxReportService.getYySspjxxMxReport(response,pageDto,filter));
    }

    @ApiOperationSupport(order = 3)
    @ApiOperation(value = "收费流水明细", tags = {"收费流水明细"})
    @GetMapping("/reportLsMx")
    public ResultRespone<PageResult<YySspjxxLsMxReport>> getYySspjxxLsMxReport(HttpServletResponse response, PageDto pageDto, YySspjxxMxFilter filter) {
        return ResultRespone.success(yySspjxxReportService.getYySspjxxLsMxReport(response,pageDto,filter));
    }
}
