package com.sunxung.factoring.service.ledger;

import com.baomidou.mybatisplus.extension.service.IService;
import com.sunxung.factoring.entity.ledger.LedgerFundGoodsAssign;

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

/**
 * @author liutao
 * @date 2021.11.11
 */
public interface LedgerFundGoodsAssignService extends IService<LedgerFundGoodsAssign> {

    /**
     * 根据basicId获取货物分配列表
     *
     * @param basicId
     * @return
     */
    List<LedgerFundGoodsAssign> findByBasicId(Long basicId);

    /**
     * 计算可分配金额
     *
     * @param sopAccountsReceivableId
     * @param billingFactoringBusinessLoanRecordId
     * @return
     */
    BigDecimal calculateAssignAmount(Long sopAccountsReceivableId, Long billingFactoringBusinessLoanRecordId);

    /**
     * 根据结算单号计算可分配金额
     *
     * @param settlementNumber
     * @return
     */
    BigDecimal calculateAssignAmount(String settlementNumber);
}
