package com.fjhx.purchase.mapper.invoice;

import com.fjhx.purchase.entity.invoice.po.InvoiceDetails;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.purchase.entity.invoice.vo.InvoiceDetailsVo;
import com.ruoyi.common.utils.wrapper.IWrapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;


/**
 * <p>
 * 发票明细 Mapper 接口
 * </p>
 *
 * @author 
 * @since 2023-04-12
 */
public interface InvoiceDetailsMapper extends BaseMapper<InvoiceDetails> {

    /**
     * 发票明细分页
     */
    Page<InvoiceDetailsVo> getPage(@Param("page") Page<Object> page, @Param("ew") IWrapper<InvoiceDetails> wrapper);

    /**
     * 根据采购单ids查询总发票金额
     * @param purchaseIds
     * @return
     */
    List<InvoiceDetailsVo> getSumMoneyByPurchaseIds(@Param("purchaseIds") List<Long> purchaseIds);

    /**
     * 根据发票ID查询明细
     * @param invoiceId
     * @return
     */
    List<InvoiceDetailsVo> getDetail(@Param("invoiceId")Long invoiceId);
}
