package com.cf.imes.module.system.service.funds.invoice;

import com.cf.imes.framework.common.pojo.PageResult;
import com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceAmountAndAvailablePageReqVO;
import com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceAmountRespVO;
import com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceAvailablePageRespVO;
import com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceConfirmReqVO;
import com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceDetailsPageReqVO;
import com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceDetailsRespVO;
import com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceRecordsReqVO;
import com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceRecordsRespVO;
import com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceTitleInfo;
import com.cf.imes.module.system.controller.admin.funds.invoice.vo.InvoiceTitleSaveReqVO;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;

/**
 * @author 发票管理接口
 */
public interface InvoiceService {

    /**
     * 获取组织抬头信息
     *
     */
    InvoiceTitleInfo getInvoiceTitle();

    /**
     * 新增/修改抬头信息
     *
     * @param reqVO
     */
    void insetInvoiceTitle(InvoiceTitleSaveReqVO reqVO);

    /**
     * 查询组织开票金额
     *
     * @return
     */
    InvoiceAmountRespVO getInvoiceAmount();

    /**
     * 查询管理端开票金额
     *
     * @return
     */
    InvoiceAmountRespVO getManageInvoiceAmount();


    /**
     * 查询组织可开票购买记录
     *
     * @param invoiceAmountAndAvailablePageReqVO
     * @return
     */
    PageResult<InvoiceAvailablePageRespVO> getAvailablePage(InvoiceAmountAndAvailablePageReqVO invoiceAmountAndAvailablePageReqVO);

    /**
     * 组织申请发票
     *
     * @param reqVO
     */
    void applyInvoice(InvoiceRecordsReqVO reqVO);

    /**
     * 查询组织开票记录
     *
     * @param pageReqVO
     * @return
     */
    PageResult<InvoiceRecordsRespVO> getInvoiceRecords(InvoiceDetailsPageReqVO pageReqVO);

    /**
     * 获取开票记录明细
     *
     * @param recordId
     * @return
     */
    InvoiceDetailsRespVO getInvoiceRecordDetail(Long recordId);

    /**
     * 确认发票
     *
     * @param reqVO
     */
    void confirmInvoice(InvoiceConfirmReqVO reqVO, MultipartFile file) throws IOException;
}
