Commit 189f665b authored by ppatro's avatar ppatro

replenishment set and wave active split


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92200 ce508802-f39f-4f6c-b175-0d175dae99d5
parent f69fd213
......@@ -2871,10 +2871,17 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
int ctr = 0, issLineNo = 0;
StringBuffer valueXmlString;
String objName = "",tranId = "",singleLotSl = "";
//Changed By Pragyan 26/11/12 To set the last used Inventory for scaning.start
String casePickInv = "",activePickInv = "",invReserve = "",invDeepReserve = "", invPndReserve = "", partialResrvLoc = "";
String replOrderChkInv = "";
String replOrderChk = "";
//Changed By Pragyan 26/11/12 To set the last used Inventory for scaning.end
System.out.println("xtraParams=["+xtraParams+"]");
String objNameChk = "";
DistCommon distComm = new DistCommon();
try
{
......@@ -2890,6 +2897,15 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
{
currentFormNo = Integer.parseInt( objContext );
}
casePickInv = distComm.getDisparams("999999","CASE_PICK_INVSTAT",conn);
activePickInv = distComm.getDisparams("999999","ACTIVE_PICK_INVSTAT",conn);
invReserve = distComm.getDisparams("999999","RESERV_LOCATION",conn);
invDeepReserve = distComm.getDisparams("999999","DEEP_STORE_INVSTAT",conn);
invPndReserve = distComm.getDisparams("999999","PND_INVSTAT",conn);
partialResrvLoc = distComm.getDisparams("999999","PRSRV_INVSTAT",conn);
System.out.println("current form no["+currentFormNo+"]");
valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n<Header>\r\n<editFlag>").append( editFlag );
valueXmlString.append("</editFlag>\r\n</Header>\r\n");
......@@ -2901,6 +2917,58 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
if( currentColumn.trim().equalsIgnoreCase( "itm_default" ) )
{
//Changed By Pragyan 26/11/12 To set the last used Inventory for scaning.start
String loginCode = checkNull(genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginCode" ));
System.out.println("MAP_USER_STR_VAL----["+MAP_USER_STR_VAL.toString()+"]");
if(MAP_USER_STR_VAL.containsKey(loginCode))
{
System.out.println("MAP_USER_STR_VAL---- Inside["+MAP_USER_STR_VAL.toString()+"]");
replOrderChkInv = (String)MAP_USER_STR_VAL.get(loginCode);
objNameChk = getObjNameFromDom(currFormDataDom, "objName", objContext);
System.out.println("objNameChk["+objNameChk+"]");
System.out.println("replOrderChkInv["+replOrderChkInv+"]");
if("repl_iss".equalsIgnoreCase(objNameChk))
{
sql = " SELECT REPL_ORDER,LOC_CODE FROM (SELECT DISTINCT R.REPL_ORDER ,L.LOC_CODE" +
" FROM REPL_ORD_DET R,REPL_ORD_HDR H,WAVE_TASK_DET W,LOCATION L,WAVE_TASK WH" +
" WHERE W.WAVE_ID = WH.WAVE_ID AND R.REPL_ORDER = H.REPL_ORDER AND" +
" R.REPL_ORDER = W.REF_ID AND W.STATUS = 'N' AND H.ORDER_TYPE NOT IN ('E','Q') " +
" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' AND R.LOC_CODE = L.LOC_CODE AND L.INV_STAT = ?) ORDER BY LOC_CODE";
}
else if("active_repl_iss".equalsIgnoreCase(objNameChk))
{
sql = " SELECT REPL_ORDER,LOC_CODE FROM (SELECT DISTINCT R.REPL_ORDER ,L.LOC_CODE FROM REPL_ORD_DET R,REPL_ORD_HDR H," +
" WAVE_TASK_DET W,LOCATION L ,WAVE_TASK WH WHERE W.WAVE_ID = WH.WAVE_ID AND R.REPL_ORDER = H.REPL_ORDER " +
" AND R.REPL_ORDER = W.REF_ID AND W.STATUS = 'N' AND H.ORDER_TYPE IN ('E','Q','T') " +
" AND FN_VALID_REPL(H.REPL_ORDER) = 'Y' AND R.LOC_CODE = L.LOC_CODE AND L.INV_STAT = ?) ORDER BY LOC_CODE ";
}
System.out.println("CURRENT SQL["+sql+"]");
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, replOrderChkInv );
rs = pstmt.executeQuery();
if( rs.next() )
{
replOrderChk = rs.getString("REPL_ORDER");
}
if(rs != null )
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
valueXmlString.append( "<repl_order><![CDATA[" ).append( checkNull( replOrderChk )).append( "]]></repl_order>\r\n" );
}
//Changed By Pragyan 26/11/12 To set the last used Inventory for scaning.end
//valueXmlString.append( "<trans_mode><![CDATA[" ).append( "E" ).append( "]]></trans_mode>\r\n" );
System.out.println("CHanges by rohan");
siteCode = checkNull(genericUtility.getValueFromXTRA_PARAMS( xtraParams, "loginSiteCode" ));
......@@ -2942,7 +3010,8 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
replOrder = genericUtility.getColumnValue( "repl_order", hdrDataDom );
//Changed By Pragyan 15-sep-12 To add Carton No
String cartonNo = "";//checkNull(genericUtility.getColumnValue( "carton_no", hdrDataDom ));
System.out.println("siteCode from xtraParams = ["+siteCode+"]");
System.out.println("Carton No To scan = ["+cartonNo+"]");
......@@ -3038,6 +3107,29 @@ public class ReplIssIC extends ValidatorEJB implements ReplIssICLocal, ReplIssIC
rs.close(); rs = null;
pstmt.close(); pstmt = null;
//Changed By Pragyan 26/11/12 To set the last used Inventory for scaning.start
if("H".equalsIgnoreCase(orderType) || "E".equalsIgnoreCase(orderType) || "F".equalsIgnoreCase(orderType) || "G".equalsIgnoreCase(orderType))
{
MAP_USER_STR_VAL.put(loginCode, invDeepReserve);
System.out.println("MAP_USER_STR_VAL----set 1loginCode["+loginCode+"]invDeepReserve"+invDeepReserve);
}
else if("L".equalsIgnoreCase(orderType) || "N".equalsIgnoreCase(orderType) || "J".equalsIgnoreCase(orderType) || "K".equalsIgnoreCase(orderType))
{
MAP_USER_STR_VAL.put(loginCode, invPndReserve);
System.out.println("MAP_USER_STR_VAL----set 2loginCode["+loginCode+"]invDeepReserve"+invDeepReserve);
}
else if("D".equalsIgnoreCase(orderType) || "C".equalsIgnoreCase(orderType) || "M".equalsIgnoreCase(orderType) || "Q".equalsIgnoreCase(orderType))
{
MAP_USER_STR_VAL.put(loginCode, invReserve);
System.out.println("MAP_USER_STR_VAL----set 3loginCode["+loginCode+"]invDeepReserve"+invDeepReserve);
}
else if("T".equalsIgnoreCase(orderType))
{
MAP_USER_STR_VAL.put(loginCode, partialResrvLoc);
System.out.println("MAP_USER_STR_VAL----set 4loginCode["+loginCode+"]invDeepReserve"+invDeepReserve);
}
//Changed By Pragyan 26/11/12 To set the last used Inventory for scaning.end
//Changed by Rohan on 18-09-12 to select carton no.start
sql = "SELECT CARTON_NO FROM CARTON_MASTER WHERE PICK_ORDER = ?";
pstmt = conn.prepareStatement( sql );
......
......@@ -10605,7 +10605,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
String mPackAllow = "";
String aPickAllow = "";
String stockToDoc = "";
//Changed by Rohan on 24-11-12 for define variable
int cartonCount = 0;
//Changed by Rohan on 13-09-12 to generate only one Repalnishmement Header.start
/*replCnt = 1;
isReplHdr = false;
......@@ -10646,7 +10647,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
masterPackWeight = Double.parseDouble(discommon.getDisparams("999999","MASTER_PACK_WEIGHT",conn));
masterPackWeightPerOrder = Double.parseDouble(discommon.getDisparams("999999","MASTER_PACK_WEIGHT_PER_ORDER",conn));
isSinglePickMasterPack = discommon.getDisparams("999999","MASTER_PACK_SINGLE_PICK",conn);
//Changed by Rohan on 24-11-12 to get variable from disparam for active pick case count
String actPkCnt = discommon.getDisparams("999999","ACTIVE_PICK_CASE_COUNT",conn);
mPackAllow = genericUtility.getColumnValue("master_pack_allow",detailDom);
mPackAllow = (mPackAllow != null && mPackAllow.length() > 0)?mPackAllow:"N";
aPickAllow = genericUtility.getColumnValue("active_pick_allow",detailDom);
......@@ -11812,6 +11815,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//Changed by Rohan on 9/03/12 to get case packet,volume,wegiht.end
double quantityPerPallet = Math.floor( (quantity * perItemVolume)/packetMaxVolumeActive);
System.out.println("quantityPerPallet::::::"+quantityPerPallet);
double totQtyPerPallet = Math.floor(packetMaxVolumeActive/perItemVolume);
double renCtr = 0;
double volumeRmaining = Math.floor(perItemVolume * quantity);
......@@ -11826,7 +11830,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
{
quantityPerPallet = quantityPerPallet + 1;
}
System.out.println("activeCount"+activeCount+"quantityPerPallet"+quantityPerPallet);
do
{
......@@ -12869,7 +12873,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//String replRefId ="";
String replRefDeepId = "";
String replRefPndId ="";
//Changed by Rohan on 24-11-12 to get variable from disparam for active pick case count.start
//casePickLoc = discommon.getDisparams("999999","CASE_PICK_INVSTAT",conn);
cartonCount = 0;
//Changed by Rohan on 24-11-12 to get variable from disparam for active pick case count.end
pstmtRplHdr.setString(1,replRefDeepId);
pstmtRplHdr.setDate(2,orderDate);
pstmtRplHdr.setString(3, siteCode);
......@@ -14010,6 +14017,17 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//////////////////////To add Carton no generation for Actives Hear///////////////////////////////////////
System.out.println("Finally ["+itemWeightTotal+"]Finally itemVolumeTotal["+itemVolumeTotal+"]");
updateCartonMaster(pickRefId, pickCtr,Double.parseDouble(noArt),ptcn,"A-PICK", xtraParams, conn,itemWeightTotal,itemVolumeTotal,pickType);
//Changed by Rohan on 24/11/12 to spilt active pick depending upon cartons.start
cartonCount++;
System.out.println("cartonCount:::"+cartonCount+"Active pick case count::"+Integer.parseInt(actPkCnt));
if(cartonCount == Integer.parseInt(actPkCnt))
{
System.out.println("Creating new pick header");
isActivePickHdr = false;
cartonCount = 0;
pickCtr = 1;
}
//Changed by Rohan on 24/11/12 to spilt active pick depending upon cartons.end
}
}
......
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