package com.jwipc.finance.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.finance.entity.AccountStatement;
import com.jwipc.finance.entity.CostInvoicedReceipt;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jwipc.finance.entity.CostInvoicedReceipt;
import com.jwipc.finance.model.po.CostInvoicedReceiptPO;
import com.jwipc.finance.model.query.InvoicedDetailQuery;

import java.util.List;

/**
 * <p>
 * 对账模块-费用关联发票明细 服务类
 * </p>
 *
 * @author shenyang.ou
 * @since 2025-11-05
 */
public interface ICostInvoicedReceiptService extends IService<CostInvoicedReceipt> {
    /**
     * 根据开票申请单ID获取关联发票数据
     *
     * @param iaId 开票申请单ID
     * @return 关联发票数据
     */
    List<CostInvoicedReceiptPO> getInvoiceReceiptListByIaId(Long iaId);

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

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

    List<CostInvoicedReceiptPO> findPageByQuery(Page<AccountStatement> dbPage, InvoicedDetailQuery query);
}
