Commit 3fb668ad authored by rbhogale's avatar rbhogale

Changed by Rohan on 12-06-13 for manual stock allocation suggested chnages


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@31441 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b32ed5ae
......@@ -210,9 +210,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
String deepStoreLoc = "";
String partialResrvLoc = "";
String packInstr ="";
PreparedStatement pstmtStock = null;
//PreparedStatement pstmtStock1 = null;
//Changed by Rohan on 29-12-11 as said by gulzar.end
double balStockQtyTemp = 0.0,sordItemQty=0.0,balStk=0.0; // added by Chandni 01-June-2012
//Changed by sumit sarkar on 22/06/12 start.
String partQtyValue = "", allocFlag = "";
......@@ -1678,6 +1680,21 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//Changed By Pragyan 31/12/12 To get Parcel Pack Flag
String isParcelPickChecked = "N";
String directPickLoc = "";
//Changed by Rohan on 12-06-13 for defining variables.start
String resrvLoc = "";
String casePickLoc = "";
String activePickLoc = "";
String deepStoreLoc = "";
String partialResrvLoc = "";
String replHistStr = "";
String prvReplID = "";
String prvLocCodeTo = "";
int prvReplLineNo = 0;
String prvPickOrd = "";
int prvPickLineNo = 0;
String isRepl = "";
String replQuantity = "";
//Changed by Rohan on 12-06-13 for defining variables.end
HashMap saleOrderWiseMapCopy = null;
HashMap saleOrderWiseMapCpy = null;
boolean isStockToDock = false;
......@@ -2339,8 +2356,107 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
tempMap.put("sord_lineNo", lineNo);
tempMap.put("item_weight", itemWeight);
//Changed by Rohan on 12/06/13 for bug fixing for setting location code.start
/*
locCodeTo = locCodeTo != null && locCodeTo.length() > 0 ?locCodeTo:locCode;
tempMap.put("sugg_loc", locCodeTo);
*/
resrvLoc = discommon.getDisparams("999999","RESERV_LOCATION",conn);
casePickLoc = discommon.getDisparams("999999","CASE_PICK_INVSTAT",conn);
activePickLoc = discommon.getDisparams("999999","ACTIVE_PICK_INVSTAT",conn);
deepStoreLoc = discommon.getDisparams("999999","DEEP_STORE_INVSTAT",conn);
partialResrvLoc = discommon.getDisparams("999999","PRSRV_INVSTAT",conn);
System.out.println("invStat checking"+invSt);
if(((invSt.trim().equalsIgnoreCase(resrvLoc) || invSt.trim().equalsIgnoreCase(deepStoreLoc)) && (qtyAllocate >= packSize)) || invSt.trim().equalsIgnoreCase(partialResrvLoc))
{
System.out.println("Inside For Creating Repelnishment packSizeActive:::::["+packSize+"]lotQtyToBeAllocated["+qtyAllocate+"]");
if(itemInfoMapForRepl.containsKey(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode))
{
isStockToDock = false;
System.out.println("Replenishment str for ["+quantity+"]");
replHistStr = checkForReplenishment(itemCode, siteCode, lotNo, lotSl, locCode, qtyAllocate, 2, conn);
System.out.println("Replenishment str for this ["+replHistStr+"]");
StringTokenizer stReplQtyID = new StringTokenizer(replHistStr, ":");
while(stReplQtyID.hasMoreTokens())
{
isRepl = stReplQtyID.nextToken();
if("Y".equalsIgnoreCase(isRepl))
{
replQuantity = stReplQtyID.nextToken();
}
else if("N".equalsIgnoreCase(isRepl))
{
prvReplID = stReplQtyID.nextToken();
prvLocCodeTo = stReplQtyID.nextToken();
prvReplLineNo = Integer.parseInt(stReplQtyID.nextToken());
prvPickOrd = stReplQtyID.nextToken();
prvPickLineNo = Integer.parseInt(stReplQtyID.nextToken());
}
}
locCodeTo = prvLocCodeTo;
if(locCodeTo == "" && locCodeTo.length() <= 0)
{
System.out.println("Block for replenishment exist location blak ["+locCodeTo+"]");
ArrayList tempItemInfoList = (ArrayList) itemInfoMapForRepl.get(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode);
Iterator itemIterator= tempItemInfoList.iterator();
while(itemIterator.hasNext())
{
HashMap itemSitemap = (HashMap)itemIterator.next();
if(itemSitemap.containsKey("SUGG_LOC_TO"))
{
locCodeTo= (String)itemSitemap.get("SUGG_LOC_TO");
System.out.println("Suggested Location code For current wave ["+locCodeTo+"]");
}
}
}
System.out.println("Location Code To Found as Replenishment Exist ["+locCodeTo+"]");
}
else
{
System.out.println("prevsLocCode ["+prevsLocCode+"]");
System.out.println("Location Code To Found To Create Replenishment Before ["+locCodeTo+"]");
if(!isStockToDock)
{
ArrayList locCodeToList = getAvilableCasePickLocationList("C", conn, locType,locZonePref,locCode,itemCode,siteCode,lotNo,lotSl);
int suggestLocLen = locCodeToList.size();
if( suggestLocLen > 0)
{
int prvLocIndex = locCodeToList.indexOf(prevsLocCode);
if( prvLocIndex != -1 && (prvLocIndex + 1) < suggestLocLen)
{
locCodeTo = (String)locCodeToList.get((prvLocIndex + 1));
System.out.println("Inside prevsLocCode1 ["+locCodeTo+"]");
}
else
{
locCodeTo = (String)locCodeToList.get(0);
System.out.println("Inside prevsLocCode2 ["+locCodeTo+"]");
}
}
prevsLocCode = locCodeTo;
}
System.out.println("Location Code To Found To Create Replenishment After ["+locCodeTo+"]");
}
}
locCodeTo = locCodeTo != null && locCodeTo.length() > 0 ?locCodeTo:locCd;
System.out.println("Finally Loc Code["+locCode+"]Loc Code To["+locCodeTo+"]");
tempMap.put("sugg_loc", locCodeTo);
//Changed by Rohan on 12/06/13 for bug fixing for setting location code.end
//Changed By Pragyan 12/03/13 To add hazardous
tempMap.put("hazard", hazardous);
tempList.add(tempMap);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment