package com.fjhx.purchase.service.pay;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.purchase.entity.pay.dto.PayDetailDto;
import com.fjhx.purchase.entity.pay.dto.PayDetailSelectDto;
import com.fjhx.purchase.entity.pay.po.PayDetail;
import com.fjhx.purchase.entity.pay.vo.PayDetailVo;
import com.ruoyi.common.core.service.BaseService;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;


/**
 * <p>
 * 采购付款明细 服务类
 * </p>
 *
 * @author 
 * @since 2023-04-13
 */
public interface PayDetailService extends BaseService<PayDetail> {

    /**
     * 发票明细分页
     */
    Page<PayDetailVo> getPage(PayDetailSelectDto dto);

    /**
     * 发票明细明细
     */
    PayDetailVo detail(Long id);

    /**
     * 发票明细新增
     */
    void add(PayDetailDto payDetailDto);

    /**
     * 发票明细编辑
     */
    void edit(PayDetailDto payDetailDto);

    /**
     * 发票明细删除
     */
    void delete(Long id);

    /**
     * 根据采购单ids查询已付款金额
     *
     * @param purchaseIds
     * @return
     */
    List<PayDetailVo> getSumMoneyByPurchaseIds(List<Long> purchaseIds);

    Map<Long, BigDecimal> getPayMoneyCountByPurchaseId(List<Long> purchaseIdList);

    BigDecimal getSumMoney(List<Long> purchaseIds);
}
