package com.cim.idm.mwmsextend.storagespec.service;

import java.util.HashMap;
import java.util.Map;

import com.cim.idm.wmsextend.generic.GenericServiceProxy;
import com.cim.idm.wmspackage.storage.management.info.CreateSpecInfo;

public class StorageSpecServiceUtil {
	
	public CreateSpecInfo makeLocationData(String siteName, String a,String b,String k,
			 String f, String s, String y, String x, String z , String storageOperationType,String capacity, String resourceState){
		
		CreateSpecInfo locationData = new CreateSpecInfo();
	
		locationData.setSiteName(siteName);	
		locationData.setStorageUseType(GenericServiceProxy.getConstantMap().StorageUseType_Storage);
		locationData.setF(f);
		locationData.setS(s);
		locationData.setY(y);
		locationData.setX(x);		
		locationData.setZ(z);
		locationData.setStorageOperationType(storageOperationType);
		locationData.setCapacity(Long.parseLong(capacity));
		locationData.setResourceState(resourceState);
		if(siteName.equals("B11")){
			locationData.setStorageName(a+"-"+b+"-"+locationData.getF()+"-"+locationData.getS()+"-"+locationData.getY()
					+"-"+locationData.getX()+"-"+locationData.getZ());
		}else{
			locationData.setStorageName(a+"-"+b+"-"+locationData.getF()+"-"+locationData.getS()+"-"+locationData.getY()
					+"-"+locationData.getX()+"-"+locationData.getZ()+"-"+k);
		}
		
		
		Map<String, Object> bindMap = new HashMap<String, Object>();
		bindMap.put("b", "");
		locationData.setUserColumns(bindMap);
		
		return locationData;
	}

}
