package com.sunxung.factoring.mapper.settlement;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunxung.factoring.entity.settlement.SettlementGoodsInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author liutao
 * @date 2021.09.22
 */
@Mapper
public interface SettlementGoodsInfoMapper extends BaseMapper<SettlementGoodsInfo> {
    /**
     * 确定供应商和业务  查找已结算的货物
     * @param businessNumber
     * @param supplierId
     * @return
     */
    List<SettlementGoodsInfo> settlementGoods(@Param("businessNumber") String businessNumber, @Param("supplierId") Long supplierId);

    /**
     * 获取该供应商下已经结算的货物
     * @param businessNumber
     * @param supplierId
     * @return
     */
    List<SettlementGoodsInfo> getSettledGoods(@Param("businessNumber") String businessNumber, @Param("supplierId")Long supplierId);

    /**
     * 根据验收单id 获取结算单货物
     * @param acceptanceBasicId
     * @return
     */
    List<SettlementGoodsInfo> listByAcceptanceId(Long acceptanceBasicId);
}
