package com.jwipc.contract.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
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 org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 对账模块-关联发票明细 Mapper 接口
 * </p>
 *
 * @author shenyang.ou
 * @since 2024-03-05
 */
public interface ContractPaymentInvoicedReceiptMapper extends BaseMapper<ContractPaymentInvoicedReceipt> {

    List<ContractPaymentInvoicedReceiptPO> getInvoiceReceiptListByIaId(@Param("iaId") Long iaId);

    ContractPaymentInvoicedReceipt getExitDataByIaIdAndInvoiceNumber(@Param("iaId") Long iaId, @Param("invoiceNumber") String invoiceNumber);

    List<ContractPaymentInvoicedReceiptPO> findPageByQuery(@Param("query") ContractPaymentInvoicedDetailQuery query);

    List<ContractPaymentInvoicedReceiptPO> findPageByQuery(Page<ContractPaymentApply> dbPage, @Param("query") ContractPaymentInvoicedDetailQuery query);

    ContractPaymentInvoicedReceipt getExitDataByIaIdAndElectronInvoiceNumber(@Param("iaId") Long iaId, @Param("electronInvoiceNumber") String electronInvoiceNumber);
}
