package com.jwipc.finance.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.finance.entity.AccountStatement;
import com.jwipc.finance.entity.CompanyInvoicedReceipt;
import com.jwipc.finance.model.po.CompanyInvoicedReceiptPO;
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 CompanyInvoicedReceiptMapper extends BaseMapper<CompanyInvoicedReceipt> {
    List<CompanyInvoicedReceiptPO> getInvoiceReceiptListByIaId(@Param("iaId") Long iaId);

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

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

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

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