package com.jwipc.finance.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.finance.entity.CompanyInvoicedApplyPostResult;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jwipc.finance.entity.InvoicedApplyPostResult;
import com.jwipc.finance.model.dto.BudgetReportDTO;
import com.jwipc.finance.model.query.BudgetReportQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 对账模块-公司间销售开票申请过账结果表 Mapper 接口
 * </p>
 *
 * @author shenyang.ou
 * @since 2025-11-18
 */
public interface CompanyInvoicedApplyPostResultMapper extends BaseMapper<CompanyInvoicedApplyPostResult> {
    /**
     * 获取最新的过账结果记录
     *
     * @param iaId 开票申请ID
     * @return 结果
     */
    CompanyInvoicedApplyPostResult findLastPostResult(@Param("iaId") Long iaId);

    List<BudgetReportDTO> findPageByQuery(@Param("query") BudgetReportQuery query);
    List<BudgetReportDTO> findPageByQuery(Page<BudgetReportDTO> dbPage, @Param("query") BudgetReportQuery query);
}
