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

import java.util.List;

import com.uas.platform.b2b.erp.model.*;
import com.uas.platform.b2b.model.PrintLog;
import com.uas.platform.b2b.model.PurcOrderInfoItem;
import com.uas.platform.b2b.model.PurchaseOrderItem;
import com.uas.platform.b2b.model.PurchaseOrderReply;

public interface PurchaseService {

	/**
	 * 将ERP系统的采购订单，转为平台的订单
	 * 
	 * @param purchases
	 * @return
	 */
	List<PurcOrderInfoItem> convertPurchase(List<Purchase> purchases);

	/**
	 * 将平台的订单回复，转为ERP的回复
	 * 
	 * @param replies
	 * @return
	 */
	List<PurchaseReply> convertPurchaseOrderReply(List<PurchaseOrderReply> replies);

	/**
	 * 将买家在ERP的主动回复，转为平台的回复记录
	 * 
	 * @param replies
	 * @return
	 */
	List<PurchaseOrderReply> convertPurchaseReply(List<PurchaseReply> replies);

	/**
	 * 将买家在ERP的结案、反结案采购单，转为平台的结案、反结案客户采购单
	 * 
	 * @param ends
	 * @return
	 */
	List<PurchaseOrderItem> convertPurchaseEnd(List<PurchaseDetailEnd> ends);

	/**
	 *  b2b的打印日志转换为erp的日志记录
	 *
	 * @param printNotUploadReply
	 * @return
	 */
	List<MessageLog> convertMessageLog(List<PrintLog> printNotUploadReply);

	/**
	 * 通过上传id查询平台采购单对应的id
     *
	 * @param purchaseList purchase数组
	 * @return
	 */
    List<Purchase> getB2bId(List<Purchase> purchaseList);

    /**
	 * 更新采购单价格
	 *
	 * @param detailPriceList 出入库单据
     * @param type 类型
     * @author hejq
     * @date 2018-06-28 15:37
	 */
    void refreshPrice(List<OrderDetailPrice> detailPriceList, String type);
}
