package com.jwipc.finance.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
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 java.util.List;

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

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

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

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