package com.uas.platform.b2b.service;

import java.util.List;

import org.springframework.data.domain.Page;

import com.uas.platform.b2b.model.PurchaseMRB;
import com.uas.platform.b2b.model.SearchFilter;
import com.uas.platform.core.model.PageInfo;

public interface PurchaseMRBService {

	/**
	 * 批量保存、修改客户MRB单
	 * 
	 * @param changeItems
	 * @return
	 */
	public void save(List<PurchaseMRB> purchaseMRBs);

	/**
	 * 获取需要上传（到卖方）的未上传MRB单
	 * 
	 * @return
	 */
	public List<PurchaseMRB> findNotUpload();

	/**
	 * 上传好需要上传的客户MRB单后修改单据的上传状态
	 * 
	 * @param idArray
	 */
	public void onUploadSuccess(String[] idArray);

	/**
	 * 分页查找客户MRB，包括明细
	 * 
	 * @param pageInfo
	 * @param keyword
	 *            查找关键词
	 * @return
	 */
	public Page<PurchaseMRB> findAllByPageInfo(PageInfo pageInfo, String keyword, SearchFilter filter);

	/**
	 * 用不良品入库单ID查找客户不良品入库单
	 * 
	 * @param id
	 * @return
	 */
	public PurchaseMRB findById(Long id);
	
}
