package com.jwipc.finance.mapper;

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

import java.util.List;

/**
 * <p>
 * 对账模块-费用关联发票明细 Mapper 接口
 * </p>
 *
 * @author shenyang.ou
 * @since 2025-11-05
 */
public interface CostInvoicedReceiptMapper extends BaseMapper<CostInvoicedReceipt> {
    List<CostInvoicedReceiptPO> getInvoiceReceiptListByIaId(@Param("iaId") Long iaId);

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

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

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

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