package com.jwipc.finance.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.finance.entity.AccountStatement;
import com.jwipc.finance.entity.InvoicedReceipt;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jwipc.finance.model.po.InvoicedReceiptPO;
import com.jwipc.finance.model.query.InvoicedDetailQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

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

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

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

    List<InvoicedReceiptPO> findPageByQuery(@Param("query") InvoicedDetailQuery query);

    List<InvoicedReceiptPO> findPageByQuery(Page<AccountStatement> dbPage, @Param("query") InvoicedDetailQuery query);

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