Commit e61f637a authored by ppatro's avatar ppatro

Wavegeneration sorting of Locations


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92710 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4c840480
......@@ -1679,6 +1679,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
replOrdRSVCpy = "";
//Changed by Rohan on 13-09-12 to generate only one Repalnishmement Header.end
//Changed By Pragyan To store previous location code as blank.
prevsLocCode = "";
try
{
//Changed sumit on 25/08/12
......@@ -2479,6 +2482,16 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
String status =null;
//Changed By Pragyan
String invStat = "";
//Changed By Pragyan 18/02/13 to check previous replenishment Location.start
String replHistStr = "";
String prvReplID = "";
String prvLocCodeTo = "";
int prvReplLineNo = 0;
String prvPickOrd = "";
int prvPickLineNo = 0;
String isRepl = "";
String replQuantity = "";
//Changed By Pragyan 18/02/13 to check previous replenishment Location.end
//Changed by sankara on 03-08-2012 for adding Loctype
String locType = "";
String locTypeParent = "";
......@@ -2915,6 +2928,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
Map tempMapReplenishment =new HashMap();
String lastReplenishmentID="",locCodeTo="";
int lineNoRepl=0;
replHistStr = "";prvReplID = "";prvLocCodeTo = "";prvPickOrd = "";isRepl = "";replQuantity = "";
prvReplLineNo = 0;prvPickLineNo = 0;
invStat = invStat != null?invStat.trim():"";
//Changed by Rohna on 14-02-13 to add stock qtantity in map in case of partial reserv location
......@@ -2927,14 +2942,79 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
if(itemInfoMapForRepl.containsKey(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode))
{
isStockToDock = false;
ArrayList tempListTestForRepl = (ArrayList)itemInfoMapForRepl.get(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode);
locCodeTo = (String)((HashMap)tempListTestForRepl.get(0)).get("REPL_LOC_TO");
//Changed By Pragyan 18/02/13 to check previous replenishment Location for sorting before the wave.start
/*ArrayList tempListTestForRepl = (ArrayList)itemInfoMapForRepl.get(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode);
locCodeTo = (String)((HashMap)tempListTestForRepl.get(0)).get("REPL_LOC_TO");*/
System.out.println("Replenishment str for ["+quantity+"]");
replHistStr = checkForReplenishment(itemCode, siteCode, lotNo, lotSl, locCode, lotQtyToBeAllocated, 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;
//Changed By Pragyan 18/02/13 to check previous replenishment Location for sorting before the wave.end
//Changed By Pragyan 19/02/13 change of logic for replenishments to get suggested location from current wave.start
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+"]");
}
}
}
//Changed By Pragyan 19/02/13 change of logic for replenishments to get suggested location from current wave.end
System.out.println("Location Code To Found as Replenishment Exist ["+locCodeTo+"]");
}
else
{
tempListForRepl = new ArrayList();
qtyActual=0.0;
qtyActual=0.0;
//Changed By Pragyan 19/02/13 change of logic for replenishments.start
System.out.println("prevsLocCode ["+prevsLocCode+"]");
System.out.println("Location Code To Found To Create Replenishment Before ["+locCodeTo+"]");
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+"]");
}
}
//Changed By Pragyan 19/02/13 change of logic for replenishments.end
if(lotQtyToBeAllocated < packSizeActive)
{
......@@ -2948,7 +3028,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
tempMapReplenishment.put("QTY_ACTUAL", qtyActual);
tempMapReplenishment.put("LAST_REPL_ID", lastReplenishmentID);
tempMapReplenishment.put("REPL_LINE_NO", lineNoRepl);
tempMapReplenishment.put("REPL_LOC_TO",locCodeTo);
//Changed By Pragyan 19/02/13 change of logic for replenishments location code set as it is.start
//tempMapReplenishment.put("REPL_LOC_TO",locCodeTo);
tempMapReplenishment.put("REPL_LOC_TO","");
tempMapReplenishment.put("SUGG_LOC_TO",locCodeTo);
//Change by Rohan on 26/08/12 to remove flag
//tempMapReplenishment.put("IS_REPLAINSH","Y");
//Changed by rohan to add stock quantity in list
......@@ -2957,7 +3040,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
itemInfoMapForRepl.put(itemCode+":"+siteCode+":"+lotNo+":"+lotSl+":"+locCode, tempListForRepl);
System.out.println("itemInfoMapForReplPPPPPPPPPPPPPPPPPPP"+itemInfoMapForRepl.toString());
System.out.println("prevsLocCode ["+prevsLocCode+"]");
/*System.out.println("prevsLocCode ["+prevsLocCode+"]");
System.out.println("Location Code To Found To Create Replenishment Before ["+locCodeTo+"]");
ArrayList locCodeToList = getAvilableCasePickLocationList("C", conn, locType,locZonePref,locCode,itemCode,siteCode,lotNo,lotSl);
......@@ -2975,7 +3058,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
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+"]");
......
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