package com.uas.platform.b2b.erp.service;

import com.uas.platform.b2b.erp.model.ProdInOutRefreshPrice;
import com.uas.platform.b2b.erp.model.PurchaseProdInOut;
import com.uas.platform.b2b.model.*;

import java.util.List;

public interface PurchaseProdInOutService {

	/**
	 * 将ERP系统的采购验收单，转为平台的客户采购验收单
	 * 
	 * @param prodInOuts
	 * @return
	 */
	List<PurchaseAcceptItem> convertProdInOuts(List<PurchaseProdInOut> prodInOuts) throws Exception;
	
	/**
	 * 将ERP中已反过账的采购验收单，转为反过账的客户采购验收单
	 * @param prodInOuts
	 * @return
	 */
	List<PurchaseAccept> convertNonPostingProdInOuts(List<PurchaseProdInOut> prodInOuts);
	
	/**
	 * 将ERP系统的采购验退单，转为平台的客户采购验退单
	 * 
	 * @param prodInOuts
	 * @return
	 */
	List<PurchaseReturnItem> convertReturns(List<PurchaseProdInOut> prodInOuts) throws Exception;

	/**
	 * 将ERP中已反过账的采购验收单，转为反过账的客户采购验退单
	 * @param prodInOuts
	 * @return
	 */
	List<PurchaseReturn> convertNonPostingReturns(List<PurchaseProdInOut> prodInOuts);
	
	/**
	 * 将ERP系统的不良品入库单，转为平台的客户不良品入库单
	 * 
	 * @param prodInOuts
	 * @return
	 */
	List<PurchaseBadInItem> convertBadIns(List<PurchaseProdInOut> prodInOuts);

	/**
	 * 将ERP中已反过账的采购验收单，转为反过账的客户不良品入库单
	 * @param prodInOuts
	 * @return
	 */
	List<PurchaseBadIn> convertNonPostingBadIns(List<PurchaseProdInOut> prodInOuts);
	
	/**
	 * 将ERP系统的不良品出库单，转为平台的客户不良品出库单
	 * 
	 * @param prodInOuts
	 * @return
	 */
	List<PurchaseBadOutItem> convertBadOuts(List<PurchaseProdInOut> prodInOuts);

	/**
	 * 将ERP中已反过账的采购验收单，转为反过账的客户不良品出库单
	 * @param prodInOuts
	 * @return
	 */
	List<PurchaseBadOut> convertNonPostingBadOuts(List<PurchaseProdInOut> prodInOuts);

	/**
	 * 批量更新采购验收单信息
	 * 
	 * @param prodInOuts
	 * @return
	 */
	List<PurchaseAcceptItem> convertPirceForProdIn(List<ProdInOutRefreshPrice> prodInOuts);

	/**
	 * 获取采购验收单对应的B2Bid
	 *
	 * @param prodInOuts ERP采购验收单
	 * @return
	 */
    List<PurchaseProdInOut> getAcceptB2bId(List<PurchaseProdInOut> prodInOuts);

    /**
     * 获取采购验退单对应的B2Bid
     *
     * @param prodInOuts ERP采购验退单
     * @return
     */
    List<PurchaseProdInOut> getReturnB2bId(List<PurchaseProdInOut> prodInOuts);

    /**
     * 获取不良品入库单对应的B2Bid
     *
     * @param prodInOuts erp不良品入库单
     * @return
     */
    List<PurchaseProdInOut> getProdBadInB2bId(List<PurchaseProdInOut> prodInOuts);

    /**
     * 获取不良品出库单对应的B2Bid
     *
     * @param prodInOuts erp不良品出库单
     * @return
     */
    List<PurchaseProdInOut> getProdBadOutB2bId(List<PurchaseProdInOut> prodInOuts);
}
