package com.fjhx.sale.mapper.contract;

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

import java.util.List;


/**
 * <p>
 * 合同发票明细 Mapper 接口
 * </p>
 *
 * @author
 * @since 2023-09-08
 */
public interface ContractInvoiceDetailsMapper extends BaseMapper<ContractInvoiceDetails> {

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

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

    /**
     * 根据合同ids查询总发票金额
     *
     * @param contractIds
     * @return
     */
    List<ContractInvoiceDetailsVo> getSumMoneyByContractIds(@Param("contractIds") List<Long> contractIds);

}
