package com.dev.swms.server.service.picking;

import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import com.dev.swms.server.model.shipping.BOLDetail;
import com.dev.swms.server.model.shipping.MasterBOL;
import com.dev.energy.server.service.BaseManager;

@SuppressWarnings("unchecked")
public interface MasterBolManager extends BaseManager {
	
	/**自动生成装车单*/
	@Transactional
	void autoMasterBOL();
	/**
	 * BOL整单签收
	 * @param masterBolId
	 */
	@Transactional
	void bolSign(BOLDetail detail);
	/**
	 * BOL部分签收
	 * @param masterBolId
	 */
	@Transactional
	void bolSignByBOLDetail(BOLDetail detail);
	
	MasterBOL getMasterBolByCode(String code);
	
	/**
	 * 保存masterBOL
	 * @param masterBOL要保存的MASTERbol
	 */
	@Transactional
	void storeMasterBOL(MasterBOL masterBOL);
	
	@Transactional
	void addMasterBOLDetails(Long masterBOLId, List<Long> BOLIds);
	
	@Transactional
	void deleteMasterBOLDetails(Long masterBOLId, List<Long> BOLIds);
	
	@Transactional
	void delete(List<Long> masterBOLIds);
	
	@Transactional
	void bolShip(List<Long> BOLIds,Long workerId);
	
	@Transactional
	void bolDelete(List<Long> BOLIds);
	
	@Transactional
	void multiShipConfirm(List<Long> ids);
	
	@Transactional
	void input(Long masterBOLId,String vehicle,Date inputDate,Long workerId);
	
	@Transactional
	void output(Long masterBOLId,Date inputDate,Long workerId);
	
	/**
	 * @Description：装车单发车运抵
	 * @author  dev
	 * @Date：2009-2-12
	 * @param id
	 * @param details
	 */
	@Transactional
	void arrivedMasterBOLDetails(Long id,List<Long> ids);
	
	@Transactional
	String showBOLFee(Map params)throws IOException;
	
	//添加出库单
	@Transactional
	void saveMasterBOLDetails(Long masterBOLId, List<Long> ids);
	
	//移除
	void removeMasterBOLDetails(Long masterBOLId, List<Long> ids);
	
	//发运确认
	void shipConfirm(Long masterBOLId, Long workerId);
	
    void refreshMasterBOL(Long id);
}