package com.jwipc.contract.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jwipc.contract.entity.ContractPaymentApply;
import com.jwipc.contract.entity.ContractPaymentInvoicedReceipt;
import com.jwipc.contract.model.po.ContractPaymentInvoicedReceiptPO;
import com.jwipc.contract.model.query.ContractPaymentInvoicedDetailQuery;

import java.util.List;

/**
 * <p>
 * 对账模块-关联发票明细 服务类
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-03-05
 */
public interface IContractPaymentInvoicedReceiptService extends IService<ContractPaymentInvoicedReceipt> {

    /**
     * 根据开票申请单ID获取关联发票数据
     *
     * @param iaId 开票申请单ID
     * @return 关联发票数据
     */
    List<ContractPaymentInvoicedReceiptPO> getInvoiceReceiptListByIaId(Long iaId);

    /**
     * 根据开票申请id和发票号码判断系统中是否已经存在
     * @param iaId 开票申请id
     * @param invoiceNumber 发票号码
     * @return 结果
     */
    ContractPaymentInvoicedReceipt getExitDataByIaIdAndInvoiceNumber(Long iaId, String invoiceNumber);

    /**
     * 根据开票申请id和数电发票号码判断系统中是否已经存在
     * @param iaId 开票申请id
     * @param electronInvoiceNumber 数电发票号码
     * @return 结果
     */
    ContractPaymentInvoicedReceipt getExitDataByIaIdAndElectronInvoiceNumber(Long iaId, String electronInvoiceNumber);

    List<ContractPaymentInvoicedReceiptPO> findPageByQuery(Page<ContractPaymentApply> dbPage, ContractPaymentInvoicedDetailQuery query);
}
