package com.sunxung.factoring.mapper.invoicemanage;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunxung.factoring.entity.invoicemanage.InvoiceGoodsInfo;
import com.sunxung.factoring.entity.invoicemanage.vo.SaleInvoiceGoodsAssignVo;
import com.sunxung.factoring.entity.invoicemanage.vo.SaleInvoiceGoodsSearch;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author : liutao
 * @Date: 2022-3-22
 */
@Mapper
public interface InvoiceGoodsInfoMapper extends BaseMapper<InvoiceGoodsInfo> {

    /**
     * 获取业务下所有开过销售发票（审核通过）且未分配完的货物列表
     *
     * @param search
     * @return
     */
    List<SaleInvoiceGoodsAssignVo> findAllUnAssignedGoods(SaleInvoiceGoodsSearch search);

    /**
     * 根据发票主表id获取货物列表
     * @param invoiceBasicInfoId
     * @return
     */
    List<InvoiceGoodsInfo> findListGoods(Long invoiceBasicInfoId);
}
