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

import java.util.List;
import java.util.Map;

import org.springframework.transaction.annotation.Transactional;

import com.dev.swms.server.model.inventory.ProcessDoc;
import com.dev.swms.server.model.inventory.ProcessDocDetail;
import com.dev.energy.server.service.BaseManager;

@Transactional(readOnly = true)
public interface ProcessDocManager  extends BaseManager {

	@Transactional
	public void addProcessDocDetail(Long processDocId,ProcessDocDetail detail);
	
	@Transactional
	public void saveProcessDoc(ProcessDoc processDoc);
	
	@Transactional
	public void delProcessDocDetail(Long processDocId,List<Long> ids);
	
	@Transactional
	public void cancelProcessDoc(List<Long> ids);
	
	@Transactional
	public void activeProcessDoc(List<Long> ids);
	
	@Transactional
	public void inActiveProcessDoc(List<Long> ids);
	
	@Transactional
	public void delProcessDoc(List<Long> ids);
	
	@Transactional
	public void process(Long processDocId,Map details);
	
	@Transactional
	public void close(List<Long> ids);
	
	/**
	 * 分配
	 * @param ids
	 */
	@Transactional
	void allocate(List<Long> ids);
	
	/**
	 * 取消分配
	 * @param ids
	 */
	@Transactional
	void unallocate(List<Long> ids);
	
	/**
	 * 加工单整单拣货确认
	 * @param processDocId
	 * @param workerId
	 */
	@Transactional
	void pickConfirmForPickAll(Long processDocId,Long workerId);
	
	/**
	 * 加工单单一明细拣货确认
	 * @param taskId
	 * @param srcLocId
	 * @param lp
	 * @param lot
	 * @param packageUnitId
	 * @param pickedQuantity
	 * @param workerId
	 */
	@Transactional
	void pickConfirm(Long taskId, Long srcLocId, String lp, String lot, Long packageUnitId,
			double pickedQuantity, Long workerId );
}
