Commit df74844c authored by ppatro's avatar ppatro

On Confirmation of pick Issue, System should confirm all the Pick Issues

belongs to the same pallet no WM2LSUN011


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92868 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 8adb64bb
...@@ -57,7 +57,7 @@ public class PickIssPos extends ValidatorEJB implements PickIssPosLocal, PickIss ...@@ -57,7 +57,7 @@ public class PickIssPos extends ValidatorEJB implements PickIssPosLocal, PickIss
ResultSet rs = null; ResultSet rs = null;
System.out.println("Dom String = "+domString); System.out.println("Dom String = "+domString);
PickIssConf pickConf = new PickIssConf(); PickIssConf pickConf = new PickIssConf();
ArrayList tranIdArrList = new ArrayList();
...@@ -177,7 +177,9 @@ public class PickIssPos extends ValidatorEJB implements PickIssPosLocal, PickIss ...@@ -177,7 +177,9 @@ public class PickIssPos extends ValidatorEJB implements PickIssPosLocal, PickIss
//end by kunal //end by kunal
} }
//select no of art from pick_ord_det //select no of art from pick_ord_det
//Changed by sumit on 18/03/13 adding condition //Changed By Pragyan WM2LSUN011 23/03/13 This code is no longer required for confirmation checking.start
//select no of art from pick_ord_det
/*//Changed by sumit on 18/03/13 adding condition
//sql = "SELECT SUM(NO_ART) FROM PICK_ORD_DET WHERE PICK_ORDER = ? "; //sql = "SELECT SUM(NO_ART) FROM PICK_ORD_DET WHERE PICK_ORDER = ? ";
sql = "SELECT SUM(NO_ART) FROM PICK_ORD_DET WHERE PICK_ORDER = ? " + sql = "SELECT SUM(NO_ART) FROM PICK_ORD_DET WHERE PICK_ORDER = ? " +
"AND (QUANTITY - CASE WHEN DEALLOC_QTY IS NULL THEN 0 ELSE DEALLOC_QTY END ) > 0 "; "AND (QUANTITY - CASE WHEN DEALLOC_QTY IS NULL THEN 0 ELSE DEALLOC_QTY END ) > 0 ";
...@@ -206,7 +208,10 @@ public class PickIssPos extends ValidatorEJB implements PickIssPosLocal, PickIss ...@@ -206,7 +208,10 @@ public class PickIssPos extends ValidatorEJB implements PickIssPosLocal, PickIss
//if total pick order detail is equals to total order scanned then confirm method is called //if total pick order detail is equals to total order scanned then confirm method is called
System.out.println("Total details of pick order == ["+totOrdDet+"]"); System.out.println("Total details of pick order == ["+totOrdDet+"]");
System.out.println("Total order scanned == ["+ordDetScaned+"]"); System.out.println("Total order scanned == ["+ordDetScaned+"]");
/* if( totOrdDet == ordDetScaned ) */
/*if( totOrdDet == ordDetScaned )
{ */ { */
//changes done by cpandey to call confirm method in case of pick type is (m or c) 31//07/12 //changes done by cpandey to call confirm method in case of pick type is (m or c) 31//07/12
System.out.println("pick type from pick_ord_hdr table--->>["+pickType+"]"); System.out.println("pick type from pick_ord_hdr table--->>["+pickType+"]");
...@@ -214,7 +219,7 @@ public class PickIssPos extends ValidatorEJB implements PickIssPosLocal, PickIss ...@@ -214,7 +219,7 @@ public class PickIssPos extends ValidatorEJB implements PickIssPosLocal, PickIss
//if (!("A".equalsIgnoreCase(pickType))) //if (!("A".equalsIgnoreCase(pickType)))
//if(pickType.equalsIgnoreCase("C")|| pickType.equalsIgnoreCase("M")) //if(pickType.equalsIgnoreCase("C")|| pickType.equalsIgnoreCase("M"))
//{ //{
System.out.println("Calling Confirm method.................."); /*System.out.println("Calling Confirm method..................");
errString = pickConf.confirm( tranId, xtraParams, forcedFlag ,conn, toCommit ); errString = pickConf.confirm( tranId, xtraParams, forcedFlag ,conn, toCommit );
if (errString.indexOf("CONFSUCESS") > -1) if (errString.indexOf("CONFSUCESS") > -1)
...@@ -224,7 +229,38 @@ public class PickIssPos extends ValidatorEJB implements PickIssPosLocal, PickIss ...@@ -224,7 +229,38 @@ public class PickIssPos extends ValidatorEJB implements PickIssPosLocal, PickIss
if ( errString != null && errString.length() > 0 ) if ( errString != null && errString.length() > 0 )
{ {
throw new Exception(errString); throw new Exception(errString);
}*/
sql = "SELECT H.TRAN_ID FROM PICK_ISS_HRD H, PICK_ISS_DET D WHERE H.TRAN_ID = D.TRAN_ID AND H.PALLET_NO = ?";
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, palletNo );
rs = pstmt.executeQuery();
while(rs.next())
{
tranIdArrList.add(rs.getString("TRAN_ID"));
} }
rs.close(); rs = null;
pstmt.close(); pstmt = null;
int traIdListLen = tranIdArrList.size();
for(int cCtr = 0;cCtr <= traIdListLen;cCtr++)
{
tranId = (String)tranIdArrList.get(cCtr);
System.out.println("Current Tran Id For Confirmation ["+tranId+"]");
errString = pickConf.confirm( tranId, xtraParams, forcedFlag ,conn, toCommit );
if (errString.indexOf("CONFSUCESS") > -1)
{
errString = "";
}
if ( errString != null && errString.length() > 0 )
{
throw new Exception(errString);
}
}
//Changed By Pragyan WM2LSUN011 23/03/13 This code is no longer required for confirmation checking.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