package com.sunxung.factoring.mapper.invoicemanage;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.sunxung.factoring.entity.invoicemanage.InvoiceBasicInfo;
import com.sunxung.factoring.entity.invoicemanage.InvoiceGoodsInfo;
import com.sunxung.factoring.entity.invoicemanage.vo.SearchGoodsVo;
import com.sunxung.factoring.entity.invoicemanage.vo.SearchOpenQuantityVo;
import com.sunxung.factoring.entity.project.vo.BusinessProcessingTaskVo;
import com.sunxung.factoring.entity.project.vo.SearchBusinessProcessingTask;
import com.sunxung.factoring.entity.settlement.SettlementBasicInfo;
import com.sunxung.factoring.entity.settlement.SettlementGoodsInfo;
import org.apache.ibatis.annotations.Mapper;

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

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

    /**
     * 获取销售发票列表页信息
     *
     * @param id
     * @return
     */
    InvoiceBasicInfo getListInfo(Long id);

    /**
     * 查询我已处理列表页
     *
     * @param search
     * @return
     */
    List<BusinessProcessingTaskVo> findMyCompletedList(SearchBusinessProcessingTask search);

    /**
     * 查询全部列表页
     *
     * @param search
     * @return
     */
    List<BusinessProcessingTaskVo> findAllList(SearchBusinessProcessingTask search);

    /**
     * 获取贴现费用的货物信息
     *
     * @param businessNumber
     * @return
     */
    List<SettlementGoodsInfo> saleSelectGoodsOfDiscount(String businessNumber);

    /**
     * 获取某一货物的已开票数量
     *
     * @param searchOpenQuantityVo
     * @return
     */
    BigDecimal saleCalc(SearchOpenQuantityVo searchOpenQuantityVo);

    /**
     * 获取货款的结算单信息
     *
     * @param searchGoodsVo
     * @return
     */
    List<SettlementBasicInfo> saleSelectSettlementOfPayment(SearchGoodsVo searchGoodsVo);

    /**
     * 获取货款的结算单货物信息
     *
     * @param businessNumber
     * @return
     */
    List<InvoiceGoodsInfo> saleSelectSettlementOfPaymentGoods(String businessNumber);

}
