Commit 8a921434 authored by ppatro's avatar ppatro

Changed By Pragyan Parcel Picking /LTL to Master & Parcel covert


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92769 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 976fba61
...@@ -646,6 +646,7 @@ etc ...@@ -646,6 +646,7 @@ etc
String stockToDockAllow = ""; String stockToDockAllow = "";
String parcelPackAllow = ""; String parcelPackAllow = "";
String directPickLoc = ""; String directPickLoc = "";
String oldPtcn = "";
//Changed By Pragyan 25/feb/13 To change the validation with ship type //Changed By Pragyan 25/feb/13 To change the validation with ship type
String shipType = ""; String shipType = "";
String custCode = ""; String custCode = "";
...@@ -902,6 +903,42 @@ etc ...@@ -902,6 +903,42 @@ etc
} }
} }
}
else if ( "ptcn_old".equalsIgnoreCase( childNodeName ) )
{
oldPtcn = checkNull(genericUtility.getColumnValue( "ptcn_old", currFormDataDom ));
int countLoc = 0;
if(oldPtcn != null && oldPtcn.trim().length() > 0 )
{
sql = "SELECT COUNT(*) FROM WAVE_TASK_DET WHERE PTCN = ?" ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, oldPtcn);
rs = pstmt.executeQuery();
if( rs.next())
{
countLoc = rs.getInt(1);
if( !(countLoc > 0))
{
//errList.add( "STOCK2DOC" );
errFields.add( childNodeName.toLowerCase() );
errList.add( "INVSELPTCN" );
//errFields.add( "" );
}
}
if( rs != null )
{
rs.close();
rs = null;
}
if( pstmt != null )
{
pstmt.close();
pstmt = null;
}
}
} }
//Changed by sumit on 03/10/12 validating printer service name with existing printer in system start. //Changed by sumit on 03/10/12 validating printer service name with existing printer in system start.
else if ( "active_pick_allow".equalsIgnoreCase( childNodeName ) ) else if ( "active_pick_allow".equalsIgnoreCase( childNodeName ) )
......
...@@ -4047,7 +4047,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -4047,7 +4047,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
totalWeightCurrentshipment = totActWeight + totCaseWeight; totalWeightCurrentshipment = totActWeight + totCaseWeight;
tempMapOrd = new HashMap(); tempMapOrd = new HashMap();
tempMapOrd.put("sale_order", saleOrder); //Changed By Pragyan 28/02/13 To store the data as a Key for different loc type parent
//tempMapOrd.put("sale_order", saleOrder);
tempMapOrd.put("sale_order", sorderKey);
tempMapOrd.put("tot_weight_order", totalWeightCurrentshipment); tempMapOrd.put("tot_weight_order", totalWeightCurrentshipment);
tempMapOrd.put("no_art_order", totCaseCount); tempMapOrd.put("no_art_order", totCaseCount);
tempMapOrd.put("tot_case_weight", totCaseWeight); tempMapOrd.put("tot_case_weight", totCaseWeight);
...@@ -4055,7 +4057,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -4055,7 +4057,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
tempMapOrd.put("tot_act_weight", totActWeight); tempMapOrd.put("tot_act_weight", totActWeight);
tempMapOrd.put("tot_act_volume", totActVolume); tempMapOrd.put("tot_act_volume", totActVolume);
tempMapOrd.put("loc_set", locSet); tempMapOrd.put("loc_set", locSet);
sorderConsigMap.put(saleOrder, currentShipConsGrp); //Changed By Pragyan 28/02/13 To store the data as a Key for different loc type parent
//sorderConsigMap.put(saleOrder, currentShipConsGrp);
sorderConsigMap.put(sorderKey, currentShipConsGrp);
if(currentShipConsGrp != null && currentShipConsGrp.length() > 0) if(currentShipConsGrp != null && currentShipConsGrp.length() > 0)
{ {
...@@ -4165,7 +4169,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -4165,7 +4169,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
System.out.println("current total weight "+totalWeightCurrentshipment+"]"); System.out.println("current total weight "+totalWeightCurrentshipment+"]");
}*/ }*/
String shipCons = (String)sorderConsigMap.get(saleOrder); //Changed By Pragyan 28/02/13 To store the data as a Key for different loc type parent
//String shipCons = (String)sorderConsigMap.get(saleOrder);
String shipCons = (String)sorderConsigMap.get(sorderKey);
ArrayList dataList = (ArrayList)custConsigMap.get(shipCons); ArrayList dataList = (ArrayList)custConsigMap.get(shipCons);
int dataListlen = dataList.size(); int dataListlen = dataList.size();
...@@ -4194,7 +4200,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -4194,7 +4200,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
System.out.println("totActWeight AFTER"+totActWeight+"]"); System.out.println("totActWeight AFTER"+totActWeight+"]");
System.out.println("totCaseCount AFTER"+totCaseCount+"]"); System.out.println("totCaseCount AFTER"+totCaseCount+"]");
if(((String)sordMap.get("sale_order")).equalsIgnoreCase(saleOrder)) //Changed By Pragyan 28/02/13 To store the data as a Key for different loc type parent
//if(((String)sordMap.get("sale_order")).equalsIgnoreCase(saleOrder))
if(((String)sordMap.get("sale_order")).equalsIgnoreCase(sorderKey))
{ {
locSet = (Set)sordMap.get("loc_set"); locSet = (Set)sordMap.get("loc_set");
} }
...@@ -4605,7 +4613,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -4605,7 +4613,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//Changed By Pragyan 26/02/13 To add direct Pick location for Master/Parcel converting from LTL. //Changed By Pragyan 26/02/13 To add direct Pick location for Master/Parcel converting from LTL.
String directPickLoc = ""; String directPickLoc = "";
String sSQLIssHdr = "",sSQLIssDet = "",sSQlUpdWave = ""; String sSQLIssHdr = "",sSQLIssDet = "",sSQlUpdWave = "";
String shipType = ""; String shipType = "",oldPtcn = "";
try try
{ {
...@@ -4624,7 +4632,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -4624,7 +4632,9 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
errString = getError(saleOrder,"INVDOCLOC",conn); errString = getError(saleOrder,"INVDOCLOC",conn);
return errString; return errString;
} }
//Changed By Pragyan 28/02/12 To sel the pallet no from old PTCN
directPickLoc = genericUtility.getColumnValue("direct_pick_loc",headerDom); directPickLoc = genericUtility.getColumnValue("direct_pick_loc",headerDom);
oldPtcn = genericUtility.getColumnValue("ptcn_old",headerDom);
shipType = genericUtility.getColumnValue("ship_type",headerDom);; shipType = genericUtility.getColumnValue("ship_type",headerDom);;
casePickInv = discommon.getDisparams("999999","CASE_PICK_INVSTAT",conn); casePickInv = discommon.getDisparams("999999","CASE_PICK_INVSTAT",conn);
activePickInv = discommon.getDisparams("999999","ACTIVE_PICK_INVSTAT",conn); activePickInv = discommon.getDisparams("999999","ACTIVE_PICK_INVSTAT",conn);
...@@ -6727,13 +6737,14 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -6727,13 +6737,14 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
if(directPickLoc != null && directPickLoc.length() > 0) if(directPickLoc != null && directPickLoc.length() > 0)
{ {
issTranID = getTranId("w_case_pick", conn); issTranID = getTranId("w_case_pick", conn);
palletNo = getPalletNo(siteCode, lotNo, lotSl, itemCode, conn); palletNo = getPalletNo(siteCode, lotNo, lotSl, itemCode,oldPtcn, conn);
pstmtIssHdr.setString(1,issTranID); pstmtIssHdr.setString(1,issTranID);
pstmtIssHdr.setDate(2,orderDate); pstmtIssHdr.setDate(2,orderDate);
pstmtIssHdr.setString(3,pickRefId); pstmtIssHdr.setString(3,pickRefId);
pstmtIssHdr.setString(4,siteCode); pstmtIssHdr.setString(4,siteCode);
pstmtIssHdr.setString(5,"Y"); //pstmtIssHdr.setString(5,"Y");
pstmtIssHdr.setString(5,"N");
pstmtIssHdr.setDate(6,orderDate); pstmtIssHdr.setDate(6,orderDate);
pstmtIssHdr.setString(7,chgUser); pstmtIssHdr.setString(7,chgUser);
pstmtIssHdr.setString(8,chgUser); pstmtIssHdr.setString(8,chgUser);
...@@ -6741,7 +6752,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -6741,7 +6752,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtIssHdr.setString(10,chgTerm); pstmtIssHdr.setString(10,chgTerm);
pstmtIssHdr.setString(11,pickType); pstmtIssHdr.setString(11,pickType);
pstmtIssHdr.setString(12,palletNo); pstmtIssHdr.setString(12,palletNo);
pstmtIssHdr.setString(13,"Y"); //pstmtIssHdr.setString(13,"Y");
pstmtIssHdr.setString(13,"");
pstmtIssHdr.executeUpdate(); pstmtIssHdr.executeUpdate();
pstmtIssHdr.clearParameters(); pstmtIssHdr.clearParameters();
...@@ -15695,7 +15707,7 @@ private double getStockQtyAfterConvert(String saleOrder, String lineNo,String it ...@@ -15695,7 +15707,7 @@ private double getStockQtyAfterConvert(String saleOrder, String lineNo,String it
} }
//Changed by sumit on 31/01/12 convert qty as per unit end //Changed by sumit on 31/01/12 convert qty as per unit end
//Changed By Pragyan 26/02/13 For Master/Parcel convert.Start //Changed By Pragyan 26/02/13 For Master/Parcel convert.Start
private String getPalletNo(String siteCode,String lotNo, String lotSl,String itemCode, Connection conn) throws ITMException private String getPalletNo(String siteCode,String lotNo, String lotSl,String itemCode,String oldPtcn , Connection conn) throws ITMException
{ {
String sql = ""; String sql = "";
String palletNo = ""; String palletNo = "";
...@@ -15707,13 +15719,15 @@ private String getPalletNo(String siteCode,String lotNo, String lotSl,String ite ...@@ -15707,13 +15719,15 @@ private String getPalletNo(String siteCode,String lotNo, String lotSl,String ite
//System.out.println(" -- saleOrder ["+saleOrder+"] lineNo ["+lineNo+"] itemCode ["+itemCode+"] "); //System.out.println(" -- saleOrder ["+saleOrder+"] lineNo ["+lineNo+"] itemCode ["+itemCode+"] ");
sql = " SELECT H.PALLET_NO FROM PICK_ISS_HDR H, PICK_ISS_DET D, WAVE_TASK_DET W,WAVE_TASK T " sql = " SELECT H.PALLET_NO FROM PICK_ISS_HDR H, PICK_ISS_DET D, WAVE_TASK_DET W,WAVE_TASK T "
+ " WHERE T.WAVE_ID = W.WAVE_ID AND W.REF_ID = H.PICK_ORDER AND H.TRAN_ID = D.TRAN_ID " + " WHERE T.WAVE_ID = W.WAVE_ID AND W.REF_ID = H.PICK_ORDER AND H.TRAN_ID = D.TRAN_ID "
+ " AND D.SITE_CODE = ? AND D.LOT_NO =? AND D.LOT_SL =? AND D.ITEM_CODE = ? AND T.CANCEL = ? "; // + " AND D.SITE_CODE = ? AND D.LOT_NO =? AND D.LOT_SL =? AND D.ITEM_CODE = ? AND T.CANCEL = ? ";
+ " AND D.SITE_CODE = ? AND D.LOT_NO =? AND D.LOT_SL =? AND D.ITEM_CODE = ? AND W.PTCN = ? AND H.PALLET_NO IS NOT NULL ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, siteCode); pstmt.setString(1, siteCode);
pstmt.setString(2, lotNo); pstmt.setString(2, lotNo);
pstmt.setString(3, lotSl); pstmt.setString(3, lotSl);
pstmt.setString(4, itemCode); pstmt.setString(4, itemCode);
pstmt.setString(5, "Y"); //pstmt.setString(5, "Y");
pstmt.setString(5, oldPtcn);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if( rs.next()) if( rs.next())
......
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