Commit 26892327 authored by rbhogale's avatar rbhogale

Changed by Rohan on 10-07-13 for spilt active repl on basis of disparam configuration


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93334 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 44dc2597
...@@ -185,6 +185,13 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -185,6 +185,13 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
String replOrdRSVCpy = ""; String replOrdRSVCpy = "";
//Changed by Rohan on 13-09-12 to generate only one Repalnishmement Header.end //Changed by Rohan on 13-09-12 to generate only one Repalnishmement Header.end
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.start
Set<String> dsoLocationset = null;
Set<String> pndLocationset = null;
Set<String> caspkLocationset = null;
Set<String> psoLocationset = null;
Set<String> prsvLocationset = null;
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.start
public String process() throws RemoteException,ITMException public String process() throws RemoteException,ITMException
{ {
...@@ -1799,6 +1806,14 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -1799,6 +1806,14 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
replOrdRSVCpy = ""; replOrdRSVCpy = "";
//Changed by Rohan on 13-09-12 to generate only one Repalnishmement Header.end //Changed by Rohan on 13-09-12 to generate only one Repalnishmement Header.end
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.start
dsoLocationset = new HashSet<String>();
pndLocationset = new HashSet<String>();
caspkLocationset = new HashSet<String>();
psoLocationset = new HashSet<String>();
prsvLocationset = new HashSet<String>();
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.end
//Changed By Pragyan To store previous location code as blank. //Changed By Pragyan To store previous location code as blank.
prevsLocCode = ""; prevsLocCode = "";
//Changed By Pragyan 23/02/13 To store ship type . //Changed By Pragyan 23/02/13 To store ship type .
...@@ -6896,6 +6911,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -6896,6 +6911,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
if(activeListItemWizMap.size() > 0) if(activeListItemWizMap.size() > 0)
{ {
double quantityPerPallet =0.0; double quantityPerPallet =0.0;
double quantityPerPalletWeight = 0.0;
double totQtyPerPallet = 0.0; double totQtyPerPallet = 0.0;
double renCtr = 0; double renCtr = 0;
double volumeRmaining = 0.0; double volumeRmaining = 0.0;
...@@ -6920,10 +6936,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -6920,10 +6936,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
for(HashMap actDataMap : tempActList) for(HashMap actDataMap : tempActList)
{ {
//Changed by Rohan on 01-07-13 for consderation of active weight and volume.start
/*
quantity = (Double)actDataMap.get("alloc_qty"); quantity = (Double)actDataMap.get("alloc_qty");
lotNo = (String)actDataMap.get("lot_no"); lotNo = (String)actDataMap.get("lot_no");
quantityPerPallet = Math.floor( (quantity * perItemVolume)/packetMaxVolumeActive); quantityPerPallet = Math.floor( (quantity * perItemVolume)/packetMaxVolumeActive);
totQtyPerPallet = Math.floor(packetMaxVolumeActive/perItemVolume); totQtyPerPallet = Math.floor(packetMaxVolumeActive/perItemVolume);
renCtr = 0; renCtr = 0;
...@@ -7092,18 +7108,377 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -7092,18 +7108,377 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
while(renCtr <= quantityPerPallet); while(renCtr <= quantityPerPallet);
*/
quantity = (Double)actDataMap.get("alloc_qty");
lotNo = (String)actDataMap.get("lot_no");
if(allActivesList.size() > 0)
{
if(quantity > 0)
{
int allActiveListLen = allActivesList.size();
activeTempPickList = (ArrayList)allActivesList.get(allActiveListLen -1);
int activeTempPickListLen = activeTempPickList.size();
Map tempMap = (HashMap)activeTempPickList.get(activeTempPickListLen -1);
if(tempMap.containsKey("LAST_PACK_WEIGHT") && tempMap.containsKey("LAST_PACK_VOLUME"))
{
double lastPackWeight = (Double)tempMap.get("LAST_PACK_WEIGHT");
double lastPackVolume = (Double)tempMap.get("LAST_PACK_VOLUME");
System.out.println("Last Pack Volume#############["+tempMap.get("LAST_PACK_VOLUME")+"]");
System.out.println("Last Pack Weight#############["+tempMap.get("LAST_PACK_WEIGHT")+"]");
double remainingWeight = packetMaxWeightActive - lastPackWeight;
double remainingVolume = packetMaxVolumeActive - lastPackVolume;
System.out.println("remainingWeight"+remainingWeight+"remainingVolume"+remainingVolume);
if(remainingWeight >= itemWeight && remainingVolume >= perItemVolume )//&& lastPackCount < masterPackCount)
{
double requiredQuantityToStoreWeight = Math.round(remainingWeight / itemWeight);
double requiredQuantityToStore = Math.round(remainingVolume / perItemVolume);
System.out.println("requiredQuantityToStoreWeight"+requiredQuantityToStoreWeight+"requiredQuantityToStore"+requiredQuantityToStore);
if(requiredQuantityToStoreWeight > requiredQuantityToStore)
{
requiredQuantityToStoreWeight = requiredQuantityToStore;
}
if(requiredQuantityToStoreWeight > quantity)
{
requiredQuantityToStoreWeight = quantity;
}
HashMap activeTempMap = (HashMap)actDataMap.clone();
activeTempMap.put("no_art", "1");
activeTempMap.put("alloc_qty", requiredQuantityToStoreWeight );
activeTempMap.put("LAST_PACK_WEIGHT",lastPackWeight + Math.round((requiredQuantityToStoreWeight * itemWeight)));
activeTempMap.put("LAST_PACK_VOLUME", Math.round((requiredQuantityToStoreWeight * perItemVolume)) + lastPackVolume);
activeTempPickList.add(activeTempMap);
quantity = quantity - requiredQuantityToStoreWeight;
allActivesList.set(allActiveListLen-1,activeTempPickList);
}
}
}
else
{
break;
}
}//ACTIVEQTYqTY> O
if(quantity <= 0)
{
continue;
}
quantityPerPallet = Math.ceil( (quantity * perItemVolume)/packetMaxVolumeActive);
quantityPerPalletWeight = Math.ceil( (quantity * itemWeight)/packetMaxWeightActive);
double totalQtyOnPallet = 0.0;
double activeCounter = 0.0;
int counter = 0;
if(quantityPerPallet < quantityPerPalletWeight)
{
activeCounter = quantityPerPalletWeight;
totalQtyOnPallet = Math.floor(packetMaxWeightActive/itemWeight);
System.out.println("Total qty per pallet weight wise"+totalQtyOnPallet);
}
else
{
activeCounter = quantityPerPallet;
totalQtyOnPallet = Math.floor(packetMaxVolumeActive/perItemVolume);
System.out.println("Total qty per pallet volume wise"+totalQtyOnPallet);
}
if(totalQtyOnPallet > quantity)
{
totalQtyOnPallet = quantity;
}
double packetMaxWeightActiveCount = Math.round((packetMaxWeightActive/itemWeight));
double packetMaxVolumeActiveCount = Math.floor(packetMaxVolumeActive/perItemVolume);
if(packetMaxWeightActiveCount > packetMaxVolumeActiveCount)
{
packetMaxWeightActiveCount = packetMaxVolumeActiveCount;
}
double remainingWeight = 0.0;
double remainingVolume = 0.0;
do
{
double currentActiveCount = totalQtyOnPallet;
System.out.println("totalQtyOnPallet ["+totalQtyOnPallet+"]");
double ActiveWeightCount = Math.round(currentActiveCount/packetMaxWeightActiveCount);
double ActiveVolumeCount = Math.round(currentActiveCount/packetMaxVolumeActiveCount);
if(ActiveWeightCount > ActiveVolumeCount)
{
ActiveWeightCount = ActiveVolumeCount;
}
System.out.println("ActiveWeightCount["+ActiveWeightCount+"]"+"ActiveVolumeCount"+ActiveVolumeCount);
double wCounter = 0;
if(packetMaxWeightActiveCount > currentActiveCount)
{
packetMaxWeightActiveCount = currentActiveCount;
}
do
{
if(allActivesList.size() > 0)
{
int allListLen = allActivesList.size();
activeTempPickList = (ArrayList)allActivesList.get(allListLen -1);
int innerListLen = activeTempPickList.size();
Map tempMap = (HashMap)activeTempPickList.get(innerListLen -1);
if(tempMap.containsKey("LAST_PACK_WEIGHT") && tempMap.containsKey("LAST_PACK_VOLUME"))// && tempMap.containsKey("LAST_PACK_COUNT"))
{
double lastPackWeight = (Double)tempMap.get("LAST_PACK_WEIGHT");
double lastPackVolume = (Double)tempMap.get("LAST_PACK_VOLUME");
System.out.println("LAST PACK WEIGHT FROM THE MAP["+lastPackWeight+"]");
System.out.println("LAST PACK VOLUME FROM THE MAP>>>>>>>>>>>>["+lastPackVolume+"]");
double currentWeight = packetMaxWeightActiveCount * itemWeight;
double currentCaseVolume = packetMaxWeightActiveCount * perItemVolume;
System.out.println("CURRENT WEIGHT TO STORE["+currentWeight+"]");
System.out.println("CURRENT VOLUME TO STORE["+currentCaseVolume+"]");
if(lastPackWeight < packetMaxWeightActive && lastPackVolume < packetMaxVolumeActive )
{
remainingWeight = packetMaxWeightActive - lastPackWeight;
remainingVolume = packetMaxVolumeActive - lastPackVolume;
System.out.println("REMAINING WEIGHT TO STORE ["+remainingWeight+"]");
System.out.println("REMAINING VOLUME TO STORE ["+remainingVolume+"]");
if(remainingWeight >= itemWeight && remainingVolume >= perItemVolume )
{
if(remainingWeight >= currentWeight && remainingVolume >= currentCaseVolume )//&& (lastPackCount + packetMaxWeightActiveCount) <= masterPackCount)
{
HashMap activeTempMap = (HashMap)actDataMap.clone();
activeTempMap.put("no_art", "1");
activeTempMap.put("alloc_qty", packetMaxWeightActiveCount);
activeTempMap.put("LAST_PACK_WEIGHT", lastPackWeight + Math.round((packetMaxWeightActiveCount * itemWeight)));
activeTempMap.put("LAST_PACK_VOLUME", (currentCaseVolume + lastPackVolume));
activeTempPickList.add(activeTempMap);
int updLen = allActivesList.size()-1;
allActivesList.set(updLen,activeTempPickList);
}
else
{
double requiredQuantityToStoreWeight = Math.round(remainingWeight / itemWeight);
double requiredQuantityToStore = Math.round(remainingVolume / perItemVolume);
if(requiredQuantityToStoreWeight > requiredQuantityToStore)
{
requiredQuantityToStoreWeight = requiredQuantityToStore;
}
HashMap activeTempMap = (HashMap)actDataMap.clone();
activeTempMap.put("no_art", "1");
activeTempMap.put("alloc_qty", requiredQuantityToStoreWeight);
activeTempMap.put("LAST_PACK_WEIGHT",lastPackWeight + Math.round((requiredQuantityToStoreWeight * itemWeight)));
activeTempMap.put("LAST_PACK_VOLUME", Math.round((requiredQuantityToStoreWeight * perItemVolume)) + lastPackVolume);
activeTempPickList.add(activeTempMap);
lastPackWeight = lastPackWeight + Math.round((requiredQuantityToStoreWeight * itemWeight));
lastPackVolume = lastPackVolume + Math.round((requiredQuantityToStoreWeight * perItemVolume));
double requiredVolumeToStore = currentCaseVolume - Math.round((requiredQuantityToStoreWeight * perItemVolume));
double requiredWeightToStore = currentWeight - Math.round((requiredQuantityToStoreWeight * itemWeight));
if(requiredWeightToStore == 0 || requiredVolumeToStore == 0)
{
requiredQuantityToStoreWeight = packetMaxWeightActiveCount - requiredQuantityToStoreWeight;
}
else
{
System.out.println("Quantity requiredVolumeToStore["+requiredVolumeToStore+"]");
System.out.println("Quantity requiredVolumeToStore["+requiredWeightToStore+"]");
requiredQuantityToStore = Math.round((requiredVolumeToStore /perItemVolume));
requiredQuantityToStoreWeight = Math.round((requiredWeightToStore /itemWeight));
activeTempPickList = new ArrayList();
HashMap activeTempMap1 = (HashMap)actDataMap.clone();
if(requiredQuantityToStore > requiredQuantityToStoreWeight)
{
requiredQuantityToStore = requiredQuantityToStoreWeight;
}
}
HashMap activeTempMap1 = (HashMap)actDataMap.clone();
if(requiredQuantityToStore > 0)
{
activeTempMap1.put("no_art","1");
activeTempMap1.put("alloc_qty", requiredQuantityToStore );
}
System.out.println("Required Volume to be stored %%%%%%%%%%%%%%%%%%%%%%["+requiredVolumeToStore+"]");
System.out.println("Required Weight to be stored %%%%%%%%%%%%%%%%%%%%%%["+requiredWeightToStore+"]");
System.out.println("Quantity Stored as %%%%%%%%%%%%%%%%%%%%%%["+requiredQuantityToStore+"]");
if((requiredWeightToStore + lastPackWeight) > packetMaxWeightActive)
{
activeTempMap1.put("LAST_PACK_WEIGHT", requiredWeightToStore);
}
else
{
activeTempMap1.put("LAST_PACK_WEIGHT", (requiredWeightToStore + lastPackWeight));
}
if((requiredVolumeToStore + lastPackVolume) > packetMaxVolumeActive)
{
activeTempMap1.put("LAST_PACK_VOLUME", requiredVolumeToStore);
}
else
{
activeTempMap1.put("LAST_PACK_VOLUME", requiredVolumeToStore + lastPackVolume);
}
activeTempPickList.add(activeTempMap1);
int updLen1 = activeTempPickList.size()-1;
allActivesList.add(activeTempPickList);
} }
} }
else
{
activeTempPickList = new ArrayList();
HashMap activeTempMap = (HashMap)actDataMap.clone();
activeTempMap.put("no_art", "1");
activeTempMap.put("alloc_qty", packetMaxWeightActiveCount );
lastPackWeight = Math.round(packetMaxWeightActiveCount * itemWeight);
lastPackVolume = Math.round(packetMaxWeightActiveCount * perItemVolume);
activeTempMap.put("LAST_PACK_WEIGHT", lastPackWeight);
activeTempMap.put("LAST_PACK_VOLUME", lastPackVolume);
activeTempPickList.add(activeTempMap);
allActivesList.add(activeTempPickList);
}
} }
else
{
activeTempPickList = new ArrayList();
HashMap activeTempMap = (HashMap)actDataMap.clone();
activeTempMap.put("no_art", "1");
activeTempMap.put("alloc_qty", packetMaxWeightActiveCount );
lastPackWeight = Math.round(packetMaxWeightActiveCount * itemWeight);
lastPackVolume = Math.round(packetMaxWeightActiveCount * perItemVolume);
activeTempMap.put("LAST_PACK_VOLUME",lastPackVolume);
activeTempMap.put("LAST_PACK_WEIGHT",lastPackWeight);
activeTempPickList.add(activeTempMap);
allActivesList.add(activeTempPickList);
}
}
}
else
{
System.out.println("### Active PICK MAP Doesn't Exist.......");
activeTempPickList = new ArrayList();
HashMap activeTempMap = (HashMap)actDataMap.clone();
activeTempMap.put("no_art", "1");
activeTempMap.put("alloc_qty", packetMaxWeightActiveCount);
double lastPackWeight = Math.round(packetMaxWeightActiveCount * itemWeight);
double lastPackVolume = Math.round(packetMaxWeightActiveCount * perItemVolume);
activeTempMap.put("LAST_PACK_WEIGHT", lastPackWeight);
activeTempMap.put("LAST_PACK_VOLUME", lastPackVolume);
activeTempPickList.add(activeTempMap);
allActivesList.add(activeTempPickList);
}
currentActiveCount = currentActiveCount - packetMaxWeightActiveCount;
if((currentActiveCount /packetMaxWeightActiveCount) < 1)
{
System.out.println("packetMaxWeightActiveCount**************["+packetMaxWeightActiveCount+"]");
packetMaxWeightActiveCount = currentActiveCount;
}
if(currentActiveCount <= 0)
{
System.out.println("currentActiveCount===============["+currentActiveCount+"]");
break;
}
if(packetMaxWeightActiveCount <= 0)
{
System.out.println("packetMaxWeightActiveCount===============["+packetMaxWeightActiveCount+"]");
break;
}
wCounter++;
}
while(wCounter <= ActiveWeightCount);
packetMaxWeightActiveCount = Math.floor(packetMaxWeightActive/itemWeight);
packetMaxVolumeActiveCount = Math.floor(packetMaxVolumeActive/perItemVolume);
if(packetMaxWeightActiveCount > packetMaxVolumeActiveCount)
{
totalQtyOnPallet = packetMaxVolumeActiveCount;
}
else
{
totalQtyOnPallet = packetMaxWeightActiveCount;
}
quantity = quantity - totalQtyOnPallet;
if(totalQtyOnPallet > quantity )
{
totalQtyOnPallet = quantity;
}
if(totalQtyOnPallet <=0)
{
break;
}
counter++;
System.out.println("REMAINING CASE COUNT["+quantity+"]"+"totalQtyOnPallet"+totalQtyOnPallet);
System.out.println("CURRENT PACKET COUNTER"+activeCounter+"]COUNT["+counter+"]");
}
while(counter < activeCounter);
}
}
}
sqlHdrPick="INSERT INTO PICK_ORD_HDR(PICK_ORDER, ORDER_DATE, SITE_CODE," sqlHdrPick="INSERT INTO PICK_ORD_HDR(PICK_ORDER, ORDER_DATE, SITE_CODE,"
...@@ -8464,7 +8839,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8464,7 +8839,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
String replRefPndId =""; String replRefPndId ="";
//Changed by Rohan on 24-11-12 to get variable from disparam for active pick case count.start //Changed by Rohan on 24-11-12 to get variable from disparam for active pick case count.start
cartonCount = 0; cartonCount = 0;
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.start
String activeReplSplitCnt = discommon.getDisparams("999999","ACTIVE_REPL_SPILT_COUNT",conn);
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.start
pstmtRplHdr.setString(1,replRefDeepId); pstmtRplHdr.setString(1,replRefDeepId);
pstmtRplHdr.setDate(2,orderDate); pstmtRplHdr.setDate(2,orderDate);
pstmtRplHdr.setString(3, siteCode); pstmtRplHdr.setString(3, siteCode);
...@@ -8499,8 +8876,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8499,8 +8876,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
siteCode = (String)tempMap.get("site_code"); siteCode = (String)tempMap.get("site_code");
itemCode = (String)tempMap.get("item_code"); itemCode = (String)tempMap.get("item_code");
replRefDeepId = ""; replRefDeepId = "";
System.out.println("Item CODEEEE====>"+itemCode);
locCode = (String)tempMap.get("loc_code"); locCode = (String)tempMap.get("loc_code");
System.out.println("Item CODEEEE====>"+itemCode+"location code"+locCode);
lotNo = (String)tempMap.get("lot_no"); lotNo = (String)tempMap.get("lot_no");
lotSl = (String)tempMap.get("lot_sl"); lotSl = (String)tempMap.get("lot_sl");
noArt = (String)tempMap.get("no_art"); noArt = (String)tempMap.get("no_art");
...@@ -8526,8 +8903,6 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8526,8 +8903,6 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//double itemWeight= Math.floor((Double)mapItemVolume.get("ITEM_WEIGHT")); //double itemWeight= Math.floor((Double)mapItemVolume.get("ITEM_WEIGHT"));
itemWeight= Math.floor((Double)mapItemVolume.get("ITEM_WEIGHT")); itemWeight= Math.floor((Double)mapItemVolume.get("ITEM_WEIGHT"));
packSizeCase = (Double)mapItemVolume.get("PACK_SIZE"); packSizeCase = (Double)mapItemVolume.get("PACK_SIZE");
/*double itemVolumeTotal = quantity*itemVolume;
double itemWeightTotal = quantity*itemWeight; */
int refCtr = 1; int refCtr = 1;
...@@ -8726,10 +9101,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8726,10 +9101,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtRplDet.setString(1,replRefDeepId); pstmtRplDet.setString(1,replRefDeepId);
pstmtRplDet.setInt(2,replCnt); pstmtRplDet.setInt(2,replCnt);
pstmtRplDet.setString(7,locCodeCase); pstmtRplDet.setString(7,locCodeCase);
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.
caspkLocationset.add(locCodeCase);
//Changed by Rohan on 08-02-13 to insert 1 case into Quantity block //Changed by Rohan on 08-02-13 to insert 1 case into Quantity block
//pstmtRplDet.setDouble(11, pendActQty); //pstmtRplDet.setDouble(11, pendActQty);
pstmtRplDet.setDouble(11, packSizeCase); pstmtRplDet.setDouble(11, packSizeCase);
System.out.println("packSizeCase--->>"+packSizeCase);
pstmtRplDet.setString(12,acPrvReplOrder); pstmtRplDet.setString(12,acPrvReplOrder);
pstmtRplDet.setInt(13,Integer.parseInt(acPrvLineNo)); pstmtRplDet.setInt(13,Integer.parseInt(acPrvLineNo));
pstmtRplDet.setString(15,locCodeCaseAct); pstmtRplDet.setString(15,locCodeCaseAct);
...@@ -8812,6 +9188,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8812,6 +9188,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtRplDet.setInt(2,replCnt); pstmtRplDet.setInt(2,replCnt);
pstmtRplDet.setString(7,locCodeCase); pstmtRplDet.setString(7,locCodeCase);
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
caspkLocationset.add(locCodeCase);
pstmtRplDet.setDouble(11, casePackSize); pstmtRplDet.setDouble(11, casePackSize);
//pstmtRplDet.setString(12,cPReplOrder); //pstmtRplDet.setString(12,cPReplOrder);
pstmtRplDet.setString(12,cReplOrder); pstmtRplDet.setString(12,cReplOrder);
...@@ -8874,7 +9252,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8874,7 +9252,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
else else
{ {
System.out.println("Inside tempReplList.. Block Unknown avilable in suggested case pick Location..."); System.out.println("Inside tempReplList.. Block Unknown avilable in suggested case pick Location...>>>>");
//Changed By Pragyan 07/03/13 to check Direct pick location //Changed By Pragyan 07/03/13 to check Direct pick location
//if(!locInvStat.equalsIgnoreCase(activePickInv)) //if(!locInvStat.equalsIgnoreCase(activePickInv))
if(!locInvStat.equalsIgnoreCase(activePickInv) && !(directPickLoc != null && directPickLoc.length() > 0)) if(!locInvStat.equalsIgnoreCase(activePickInv) && !(directPickLoc != null && directPickLoc.length() > 0))
...@@ -8897,6 +9275,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8897,6 +9275,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
replCnt++; replCnt++;
refCtr = replCnt; refCtr = replCnt;
} }
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
caspkLocationset.add(locCode);
} }
...@@ -8920,6 +9301,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8920,6 +9301,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
refCtr = rplCntDSO; refCtr = rplCntDSO;
System.out.println("Current DSO Line No refCtr ["+refCtr+"]"); System.out.println("Current DSO Line No refCtr ["+refCtr+"]");
} }
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
dsoLocationset.add(locCode);
} }
if(locInvStat.equalsIgnoreCase(invReserve)) if(locInvStat.equalsIgnoreCase(invReserve))
...@@ -8941,6 +9325,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8941,6 +9325,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
rplCntPSO++; rplCntPSO++;
refCtr = rplCntPSO; refCtr = rplCntPSO;
} }
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
psoLocationset.add(locCode);
} }
if(locInvStat.equalsIgnoreCase(partialResrvLoc)) if(locInvStat.equalsIgnoreCase(partialResrvLoc))
...@@ -8961,6 +9348,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8961,6 +9348,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
rplCntRSV++; rplCntRSV++;
refCtr = rplCntRSV; refCtr = rplCntRSV;
} }
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
prsvLocationset.add(locCode);
} }
...@@ -8980,6 +9370,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -8980,6 +9370,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
if(locInvStat.equalsIgnoreCase(invDeepReserve)) if(locInvStat.equalsIgnoreCase(invDeepReserve))
{ {
pndLoc = getAvilablePickLocation("N", conn, itemLocType,locZonePref,locCode,itemCode,siteCode,lotNo,lotSl); pndLoc = getAvilablePickLocation("N", conn, itemLocType,locZonePref,locCode,itemCode,siteCode,lotNo,lotSl);
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.
if(pndLoc != null && pndLoc.length() > 0) if(pndLoc != null && pndLoc.length() > 0)
{ {
pstmtRplDet.setString(15,pndLoc); pstmtRplDet.setString(15,pndLoc);
...@@ -9039,7 +9431,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9039,7 +9431,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtRplDet.setInt(13,rplCntDSO); pstmtRplDet.setInt(13,rplCntDSO);
pstmtRplDet.setString(7,pndLoc); pstmtRplDet.setString(7,pndLoc);
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
pndLocationset.add(pndLoc);
if(actPkDeepLoc != null && actPkDeepLoc.length() > 0) if(actPkDeepLoc != null && actPkDeepLoc.length() > 0)
{ {
pstmtRplDet.setString(15,actPkDeepLoc); pstmtRplDet.setString(15,actPkDeepLoc);
...@@ -9242,6 +9635,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9242,6 +9635,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//Changed by Rohan on 13-09-12 to generate only one Repalnishmement Header //Changed by Rohan on 13-09-12 to generate only one Repalnishmement Header
pstmtRplDet.setInt(2,replCnt); pstmtRplDet.setInt(2,replCnt);
pstmtRplDet.setString(7,locCodeCase); pstmtRplDet.setString(7,locCodeCase);
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
caspkLocationset.add(locCodeCase);
//Changed by Rohan on 12-09-12 to add pick order as reference of depended Replanishment //Changed by Rohan on 12-09-12 to add pick order as reference of depended Replanishment
//pstmtRplDet.setString(12,pickRefId); //pstmtRplDet.setString(12,pickRefId);
/*pstmtRplDet.setString(12,sReplOrder); /*pstmtRplDet.setString(12,sReplOrder);
...@@ -9365,6 +9760,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9365,6 +9760,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtRplDet.setInt(2,replCnt); pstmtRplDet.setInt(2,replCnt);
pstmtRplDet.setString(7,locCodeCase); pstmtRplDet.setString(7,locCodeCase);
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
caspkLocationset.add(locCodeCase);
//Changed by Rohan on 11-09-12 to add pick order reference //Changed by Rohan on 11-09-12 to add pick order reference
//pstmtRplDet.setString(12,pickRefId); //pstmtRplDet.setString(12,pickRefId);
/*if(locInvStat.equalsIgnoreCase(invDeepReserve)) /*if(locInvStat.equalsIgnoreCase(invDeepReserve))
...@@ -9464,6 +9861,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9464,6 +9861,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
replCnt++; replCnt++;
refCtr = replCnt; refCtr = replCnt;
} }
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
caspkLocationset.add(locCode);
} }
...@@ -9487,6 +9887,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9487,6 +9887,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
refCtr = rplCntDSO; refCtr = rplCntDSO;
System.out.println("Current DSO Line No refCtr ["+refCtr+"]"); System.out.println("Current DSO Line No refCtr ["+refCtr+"]");
} }
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
dsoLocationset.add(locCode);
} }
if(locInvStat.equalsIgnoreCase(invReserve)) if(locInvStat.equalsIgnoreCase(invReserve))
...@@ -9508,6 +9911,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9508,6 +9911,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
rplCntPSO++; rplCntPSO++;
refCtr = rplCntPSO; refCtr = rplCntPSO;
} }
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
psoLocationset.add(locCode);
} }
if(locInvStat.equalsIgnoreCase(partialResrvLoc)) if(locInvStat.equalsIgnoreCase(partialResrvLoc))
...@@ -9530,6 +9936,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9530,6 +9936,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
rplCntRSV++; rplCntRSV++;
refCtr = rplCntRSV; refCtr = rplCntRSV;
} }
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
prsvLocationset.add(locCode);
} }
...@@ -9542,7 +9951,6 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9542,7 +9951,6 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
if(locInvStat.equalsIgnoreCase(partialResrvLoc)) if(locInvStat.equalsIgnoreCase(partialResrvLoc))
{ {
packSizeCase = stkQty; packSizeCase = stkQty;
System.out.println("packSizeCase::::::::"+packSizeCase);
pstmtRplDet.setDouble(11, stkQty); pstmtRplDet.setDouble(11, stkQty);
} }
...@@ -9552,6 +9960,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9552,6 +9960,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pndLoc = getAvilablePickLocation("N", conn, itemLocType,locZonePref,locCode,itemCode,siteCode,lotNo,lotSl); pndLoc = getAvilablePickLocation("N", conn, itemLocType,locZonePref,locCode,itemCode,siteCode,lotNo,lotSl);
if(pndLoc != null && pndLoc.length() > 0) if(pndLoc != null && pndLoc.length() > 0)
{ {
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.
pstmtRplDet.setString(15,pndLoc); pstmtRplDet.setString(15,pndLoc);
} }
else else
...@@ -9579,6 +9988,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9579,6 +9988,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
pstmtRplDet.executeUpdate(); pstmtRplDet.executeUpdate();
} }
...@@ -9609,6 +10019,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9609,6 +10019,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtRplDet.setInt(13,rplCntDSO); pstmtRplDet.setInt(13,rplCntDSO);
pstmtRplDet.setString(7,pndLoc); pstmtRplDet.setString(7,pndLoc);
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam
pndLocationset.add(pndLoc);
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.start
pndLocationset.add(pndLoc);
if(actPkDeepLoc != null && actPkDeepLoc.length() > 0) if(actPkDeepLoc != null && actPkDeepLoc.length() > 0)
{ {
...@@ -9682,7 +10096,40 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9682,7 +10096,40 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
itemWeightTotal = itemWeightTotal + quantity*itemWeight; itemWeightTotal = itemWeightTotal + quantity*itemWeight;
//updateCartonMaster(pickRefId, pickCtr,Double.parseDouble(noArt),ptcn,"A-PICK", xtraParams, conn,itemWeightTotal,itemVolumeTotal,pickType); //updateCartonMaster(pickRefId, pickCtr,Double.parseDouble(noArt),ptcn,"A-PICK", xtraParams, conn,itemWeightTotal,itemVolumeTotal,pickType);
} }
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.start
if(dsoLocationset.size() >= Integer.parseInt(activeReplSplitCnt))
{
System.out.println("DSO exceed...");
isReplHdrDSO = false;
dsoLocationset.clear();
}
if(pndLocationset.size() >= Integer.parseInt(activeReplSplitCnt))
{
System.out.println("pnd exceed...");
isReplHdrPND = false;
pndLocationset.clear();
}
if(caspkLocationset.size() >= Integer.parseInt(activeReplSplitCnt))
{
System.out.println("caspk exceed....");
isReplHdr = false;
caspkLocationset.clear();
}
if(psoLocationset.size() >= Integer.parseInt(activeReplSplitCnt))
{
System.out.println("pso exceed...");
isReplHdrPSO = false;
psoLocationset.clear();
}
if(prsvLocationset.size() >= Integer.parseInt(activeReplSplitCnt))
{
System.out.println("prsv exceed....");
isReplHdrRSV = false;
prsvLocationset.clear();
}
//Changed by Rohan on 04-07-13 for split active replanishment task based on configuration of disparam.end
} }
//////////////////////To add Carton no generation for Actives Hear/////////////////////////////////////// //////////////////////To add Carton no generation for Actives Hear///////////////////////////////////////
...@@ -9703,7 +10150,6 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -9703,7 +10150,6 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
//change by rekha on 23-05-13 start //change by rekha on 23-05-13 start
//if(packgeList.length != 0 || packgeList.length > 0) //if(packgeList.length != 0 || packgeList.length > 0)
if("P".equalsIgnoreCase(waveMode) && packgeList != null && packgeList.length > 0) if("P".equalsIgnoreCase(waveMode) && packgeList != null && packgeList.length > 0)
......
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