package com.dev.swms.server.action;

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

import com.dev.swms.server.service.shipping.PickTicketManager;
import com.dev.swms.server.service.shipping.WaveDocManager;
import com.dev.energy.client.ui.page.IPage;
import com.dev.energy.server.action.AbstractAction;

/**
 * @author  dev
 */
public class PickingAllocateAction extends AbstractAction{
	protected final PickTicketManager pickTicketManager;
	protected final WaveDocManager waveDocManager; 
	
	public PickingAllocateAction(PickTicketManager pickTicketManager,WaveDocManager waveDocManager){
		this.pickTicketManager = pickTicketManager;
		this.waveDocManager = waveDocManager;

	}
/*	
	public void allocateWithStrategy(Map clientParams){
		Long pickTicketId = (Long) clientParams.get("pickTicket.id");
		List pickTicketDetailIds = (List) clientParams.get("parentIds");
		if(logger.isDebugEnabled()) {
			logger.debug("pickticket " + pickTicketId + " will Allocate its details with paramters[" + clientParams +"]");
		}
		pickTicketManager.autoAllocate(pickTicketId, pickTicketDetailIds);
	}

	public void manualAllocate(Map clientParams){
		Long pickTicketDetailId = (Long) clientParams.get("pickTicketDetail.id");
		pickTicketManager.manualAllocate(pickTicketDetailId,(Map) clientParams.get(IPage.TABLE_INPUT_VALUES));
	}
	
	public void cancelManualAllocate(Map clientParams){
		Long pickTicketId = (Long) clientParams.get("pickTicket.id");
		pickTicketManager.unallocate(pickTicketId,(Map) clientParams.get(IPage.TABLE_INPUT_VALUES));
	}
*/	
/*	public void allocateWithStrategyWaveDoc(Map clientParams){
		Long waveDocId = (Long) clientParams.get("pickTicket.id");
		List waveDocDetailIds = (List) clientParams.get("parentIds");
		if(logger.isDebugEnabled()) {
			logger.debug("waveDoc " + waveDocId + " will Allocate its details with paramters[" + clientParams +"]");
		}
		waveDocManager.autoAllocate(waveDocId, waveDocDetailIds);
	}

	public void manualAllocateWaveDoc(Map clientParams){
		Long waveDocDetailId = (Long) clientParams.get("pickTicketDetail.id");
		waveDocManager.manualAllocate(waveDocDetailId,(Map) clientParams.get(IPage.TABLE_INPUT_VALUES));
	}
	
	public void cancelManualAllocateWaveDoc(Map clientParams){
		Long waveDocId = (Long) clientParams.get("waveDoc.id");
		waveDocManager.unallocate(waveDocId,(Map) clientParams.get(IPage.TABLE_INPUT_VALUES));
	}
*/	
}
