Commit eb2d3a4e authored by ppatro's avatar ppatro

issue tracker 295 & 297


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93797 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 3334d76d
......@@ -879,6 +879,8 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
errFields.add( childNodeName.toLowerCase() );
// end 26/10/11 manoharan all the errors should be returned so that warnings can be processed
}
}//End pick_order validation
else if ( "pick_type".equalsIgnoreCase( childNodeName ) )
{
......@@ -1805,7 +1807,24 @@ public class PickIssIC extends ValidatorEJB implements PickIssICLocal, PickIssIC
pstmt.close();
pstmt = null;
String comleteStatus = "";
sql = "SELECT STATUS FROM PICK_ORD_HDR WHERE PICK_ORDER = ?";
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, pickOrdIss );
rs = pstmt.executeQuery();
if( rs.next() )
{
comleteStatus = rs.getString("STATUS");
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
System.out.println("Current Pick Status ["+comleteStatus+"]["+pickOrdIss+"]");
if("C".equalsIgnoreCase(comleteStatus))
{
errList.add( "VTPICKCOMP" );
errFields.add( childNodeName.toLowerCase() );
}
}
//Changed by Rohan on 29-10-12 to add warinig message in depended repanishment not scan.end
......
......@@ -197,215 +197,219 @@ public class PickIssPos extends ValidatorEJB implements PickIssPosLocal, PickIss
locCodeTo = genericUtility.getColumnValueFromNode("loc_code__to", dom.getElementsByTagName("Detail4").item(0)); // 22/09/12 manoharan
pickOrder = genericUtility.getColumnValueFromNode("pick_order", dom.getElementsByTagName("Detail2").item(0));
System.out.println("pick order from header ["+pickOrder+"]");
sql = "UPDATE pick_iss_det SET loc_code__to = ? WHERE tran_id = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,locCodeTo);
pstmt.setString(2,tranId);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully of master pick---->"+updCnt);
}
//Changed By pragyan 02-oct-13 to update pallet no for respective transaction .start
//added by kunal mandhre on 09/08/12 as per S Manoharan Sir instruction
/*sql = "UPDATE PALLET_NO SET STATUS = 'U' WHERE PALLET_NO IN(SELECT PALLET_NO FROM PICK_ISS_HDR WHERE PICK_ORDER = ? ) ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, pickOrder);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully in pallet no ---->"+updCnt);
}*/
sql = "UPDATE PALLET_NO SET STATUS = 'U' WHERE PALLET_NO = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, palletNo);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully in pallet no changed---->"+updCnt);
}
//Changed By pragyan 02-oct-13 to update pallet no for respective transaction .end
//Changed by Rohan on 25-02-13 for updating pallet no against master pack in carton master.start
sql = " UPDATE CARTON_MASTER SET PALLET_NO = ? WHERE CARTON_NO IN(SELECT MASTER_CARTON FROM CARTON_MASTER WHERE PICK_ORDER = ? "
+" GROUP BY MASTER_CARTON) ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, palletNo);
pstmt.setString(2, pickOrder);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully in carton master--->"+updCnt);
}
//Changed by Rohan on 25-02-13 for updating pallet no against master pack in carton master.end
//Changed By Pragyan 05/03/12 to update pallet no on carton master.
//Update the carton master
//if(!"M".equalsIgnoreCase(pickType)) // 22/09/12 manoharan
/*if(!"M".equalsIgnoreCase(pickType) || "P-PICK".equalsIgnoreCase(refSer)) // 22/09/12 manoharan
{
//Changed by sumit on 11/09/13 adding condition of status.
//sql = "UPDATE CARTON_MASTER SET STATUS = 'U', pallet_no = ? WHERE PICK_ORDER = ? and line_no__pick in (select line_no__ord from pick_iss_det where tran_id = ?) ";
sql = " UPDATE CARTON_MASTER SET STATUS = 'U', PALLET_NO = ? WHERE PICK_ORDER = ? " +
" AND LINE_NO__PICK IN (SELECT LINE_NO__ORD FROM PICK_ISS_DET WHERE TRAN_ID = ?) " +
" AND STATUS <> 'R'";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,palletNo);
pstmt.setString(2, pickOrder);
pstmt.setString(3,tranId);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully of master pick---->"+updCnt);
}
//added by kunal mandhre on 09/08/12 as per S Manoharan Sir instruction
sql = "UPDATE PALLET_NO SET STATUS = 'U' WHERE PALLET_NO IN(SELECT PALLET_NO FROM PICK_ISS_HDR WHERE PICK_ORDER = ? ) ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, pickOrder);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully in pallet no ---->"+updCnt);
}
//end by kunal
}*/
//select no of art from pick_ord_det
//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 = ? " +
"AND (QUANTITY - CASE WHEN DEALLOC_QTY IS NULL THEN 0 ELSE DEALLOC_QTY END ) > 0 ";
pstmt = conn.prepareStatement(sql);
pstmt.setString( 1, pickOrder );
rs = pstmt.executeQuery();
if(rs.next())
{
totOrdDet = rs.getInt(1);
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
//select the no of order scanned
sql = "SELECT SUM(NO_ART) AS COUNT FROM PICK_ISS_DET WHERE PICK_ORDER = ? ";
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, pickOrder );
rs = pstmt.executeQuery();
if(rs.next())
if(locCodeTo != null && locCodeTo.length() > 0)
{
ordDetScaned = rs.getInt("COUNT");
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
//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 order scanned == ["+ordDetScaned+"]");
*/
/*if( totOrdDet == ordDetScaned )
{ */
//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+"]");
//commented by chitranjan to call confirm method for all pick type on 07/08/12
//if (!("A".equalsIgnoreCase(pickType)))
//if(pickType.equalsIgnoreCase("C")|| pickType.equalsIgnoreCase("M"))
//{
/*System.out.println("Calling Confirm method..................");
errString = pickConf.confirm( tranId, xtraParams, forcedFlag ,conn, toCommit );
if (errString.indexOf("CONFSUCESS") > -1)
{
errString = "";
}
if ( errString != null && errString.length() > 0 )
{
throw new Exception(errString);
}*/
sql = " UPDATE CARTON_MASTER SET STATUS = 'U', PALLET_NO = ? WHERE PICK_ORDER = ? " +
" AND LINE_NO__PICK IN (SELECT LINE_NO__ORD FROM PICK_ISS_DET WHERE TRAN_ID = ?) " +
" AND STATUS <> 'R'";
pstmtUpdCarton = conn.prepareStatement(sql);
sql = "SELECT DISTINCT H.TRAN_ID,H.PICK_ORDER,H.PICK_TYPE FROM PICK_ISS_HDR H, PICK_ISS_DET D WHERE H.TRAN_ID = D.TRAN_ID AND H.PALLET_NO = ?";
pstmtTran = conn.prepareStatement( sql );
pstmtTran.setString( 1, palletNo );
rsTran = pstmtTran.executeQuery();
while(rsTran.next())
{
//changed by Rohan on 28-03-13 for bug fixing.start
/*
tranId = rs.getString("TRAN_ID");
pickOrder = rs.getString("PICK_ORDER");
pickType = rs.getString("PICK_TYPE");
*/
tranId = rsTran.getString("TRAN_ID");
pickOrder = rsTran.getString("PICK_ORDER");
pickType = rsTran.getString("PICK_TYPE");
//changed by Rohan on 28-03-13 for bug fixing.end
sql = "UPDATE pick_iss_det SET loc_code__to = ? WHERE tran_id = ? ";
if(!"M".equalsIgnoreCase(pickType) || "P-PICK".equalsIgnoreCase(refSer)) // 22/09/12 manoharan
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,locCodeTo);
pstmt.setString(2,tranId);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully of master pick---->"+updCnt);
}
//Changed By pragyan 02-oct-13 to update pallet no for respective transaction .start
//added by kunal mandhre on 09/08/12 as per S Manoharan Sir instruction
/*sql = "UPDATE PALLET_NO SET STATUS = 'U' WHERE PALLET_NO IN(SELECT PALLET_NO FROM PICK_ISS_HDR WHERE PICK_ORDER = ? ) ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, pickOrder);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully in pallet no ---->"+updCnt);
}*/
sql = "UPDATE PALLET_NO SET STATUS = 'U' WHERE PALLET_NO = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, palletNo);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully in pallet no changed---->"+updCnt);
}
//Changed By pragyan 02-oct-13 to update pallet no for respective transaction .end
//Changed by Rohan on 25-02-13 for updating pallet no against master pack in carton master.start
sql = " UPDATE CARTON_MASTER SET PALLET_NO = ? WHERE CARTON_NO IN(SELECT MASTER_CARTON FROM CARTON_MASTER WHERE PICK_ORDER = ? "
+" GROUP BY MASTER_CARTON) ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, palletNo);
pstmt.setString(2, pickOrder);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully in carton master--->"+updCnt);
}
//Changed by Rohan on 25-02-13 for updating pallet no against master pack in carton master.end
//Changed By Pragyan 05/03/12 to update pallet no on carton master.
//Update the carton master
//if(!"M".equalsIgnoreCase(pickType)) // 22/09/12 manoharan
/*if(!"M".equalsIgnoreCase(pickType) || "P-PICK".equalsIgnoreCase(refSer)) // 22/09/12 manoharan
{
//Changed by sumit on 11/09/13 adding condition of status.
//sql = "UPDATE CARTON_MASTER SET STATUS = 'U', pallet_no = ? WHERE PICK_ORDER = ? and line_no__pick in (select line_no__ord from pick_iss_det where tran_id = ?) ";
sql = " UPDATE CARTON_MASTER SET STATUS = 'U', PALLET_NO = ? WHERE PICK_ORDER = ? " +
" AND LINE_NO__PICK IN (SELECT LINE_NO__ORD FROM PICK_ISS_DET WHERE TRAN_ID = ?) " +
" AND STATUS <> 'R'";
pstmtUpdCarton.setString(1,palletNo);
pstmtUpdCarton.setString(2, pickOrder);
pstmtUpdCarton.setString(3,tranId);
updCnt = pstmtUpdCarton.executeUpdate();
pstmtUpdCarton.clearParameters();
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,palletNo);
pstmt.setString(2, pickOrder);
pstmt.setString(3,tranId);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully of master pick---->"+updCnt);
}
}
errString = pickConf.confirm( tranId, xtraParams, forcedFlag ,conn, toCommit );
if (errString.indexOf("CONFSUCESS") > -1)
//added by kunal mandhre on 09/08/12 as per S Manoharan Sir instruction
sql = "UPDATE PALLET_NO SET STATUS = 'U' WHERE PALLET_NO IN(SELECT PALLET_NO FROM PICK_ISS_HDR WHERE PICK_ORDER = ? ) ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, pickOrder);
updCnt = pstmt.executeUpdate();
pstmt.close(); pstmt = null;
if(updCnt > 0)
{
System.out.println("---row updated sucessfully in pallet no ---->"+updCnt);
}
//end by kunal
}*/
//select no of art from pick_ord_det
//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 = ? " +
"AND (QUANTITY - CASE WHEN DEALLOC_QTY IS NULL THEN 0 ELSE DEALLOC_QTY END ) > 0 ";
pstmt = conn.prepareStatement(sql);
pstmt.setString( 1, pickOrder );
rs = pstmt.executeQuery();
if(rs.next())
{
errString = "";
totOrdDet = rs.getInt(1);
}
if ( errString != null && errString.length() > 0 )
rs.close(); rs = null;
pstmt.close(); pstmt = null;
//select the no of order scanned
sql = "SELECT SUM(NO_ART) AS COUNT FROM PICK_ISS_DET WHERE PICK_ORDER = ? ";
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, pickOrder );
rs = pstmt.executeQuery();
if(rs.next())
{
throw new Exception(errString);
ordDetScaned = rs.getInt("COUNT");
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
//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 order scanned == ["+ordDetScaned+"]");
*/
}
/*if( totOrdDet == ordDetScaned )
{ */
//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+"]");
//commented by chitranjan to call confirm method for all pick type on 07/08/12
//if (!("A".equalsIgnoreCase(pickType)))
//if(pickType.equalsIgnoreCase("C")|| pickType.equalsIgnoreCase("M"))
//{
/*System.out.println("Calling Confirm method..................");
errString = pickConf.confirm( tranId, xtraParams, forcedFlag ,conn, toCommit );
if (errString.indexOf("CONFSUCESS") > -1)
{
errString = "";
}
if ( errString != null && errString.length() > 0 )
{
throw new Exception(errString);
}*/
sql = " UPDATE CARTON_MASTER SET STATUS = 'U', PALLET_NO = ? WHERE PICK_ORDER = ? " +
" AND LINE_NO__PICK IN (SELECT LINE_NO__ORD FROM PICK_ISS_DET WHERE TRAN_ID = ?) " +
" AND STATUS <> 'R'";
if(rsTran != null)
{
rsTran.close();
rsTran = null;
}
if(pstmtTran != null)
{
pstmtTran.close();
pstmtTran = null;
}
pstmtUpdCarton = conn.prepareStatement(sql);
if(pstmtUpdCarton != null)
{
pstmtUpdCarton.close();
pstmtUpdCarton = null;
}
//Changed By Pragyan WM2LSUN011 23/03/13 This code is no longer required for confirmation checking.end
//}
/*} */
sql = "SELECT DISTINCT H.TRAN_ID,H.PICK_ORDER,H.PICK_TYPE FROM PICK_ISS_HDR H, PICK_ISS_DET D WHERE H.TRAN_ID = D.TRAN_ID AND H.PALLET_NO = ?";
pstmtTran = conn.prepareStatement( sql );
pstmtTran.setString( 1, palletNo );
rsTran = pstmtTran.executeQuery();
while(rsTran.next())
{
//changed by Rohan on 28-03-13 for bug fixing.start
/*
tranId = rs.getString("TRAN_ID");
pickOrder = rs.getString("PICK_ORDER");
pickType = rs.getString("PICK_TYPE");
*/
tranId = rsTran.getString("TRAN_ID");
pickOrder = rsTran.getString("PICK_ORDER");
pickType = rsTran.getString("PICK_TYPE");
//changed by Rohan on 28-03-13 for bug fixing.end
if(!"M".equalsIgnoreCase(pickType) || "P-PICK".equalsIgnoreCase(refSer)) // 22/09/12 manoharan
{
pstmtUpdCarton.setString(1,palletNo);
pstmtUpdCarton.setString(2, pickOrder);
pstmtUpdCarton.setString(3,tranId);
updCnt = pstmtUpdCarton.executeUpdate();
pstmtUpdCarton.clearParameters();
if(updCnt > 0)
{
System.out.println("---row updated sucessfully of master pick---->"+updCnt);
}
}
errString = pickConf.confirm( tranId, xtraParams, forcedFlag ,conn, toCommit );
if (errString.indexOf("CONFSUCESS") > -1)
{
errString = "";
}
if ( errString != null && errString.length() > 0 )
{
throw new Exception(errString);
}
}
if(rsTran != null)
{
rsTran.close();
rsTran = null;
}
if(pstmtTran != null)
{
pstmtTran.close();
pstmtTran = null;
}
if(pstmtUpdCarton != null)
{
pstmtUpdCarton.close();
pstmtUpdCarton = null;
}
//Changed By Pragyan WM2LSUN011 23/03/13 This code is no longer required for confirmation checking.end
//}
/*} */
}
}
}
else
......
......@@ -8867,6 +8867,8 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//Chnaged by Rohan on 21-08-13 for shipAddrs 3 is blank then set address 2.end
recipient.setCity(shipCity);//Customer Adress City
recipient.setState(stateCodeDlv);//Customer Adress State
//Changed By Pragyan to overcome from postal code error
shipCountry = shipCountry!=null?shipCountry.trim():"";
Country country = soap.getCountry("ISO3", shipCountry).getResponseCountry();
recipient.setCountry(country);//Customer Adress Country
......@@ -10686,6 +10688,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
comInfo.setHarmonizedCode(harmonizCode);//As per Taro Haromonization code
comInfo.setUnitValue(unitValue);
comInfo.setUnitWeight(caseWeight);
originCountry = originCountry!=null?originCountry.trim():"";
Country originCountryMfg = soap.getCountry("ISO3", originCountry).getResponseCountry();
comInfo.setOriginCountry(originCountryMfg);
//change by rekha on 31-05-13 start
......@@ -10923,6 +10926,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
comInfo.setHarmonizedCode(harmonizCode);//As per Taro Haromonization code
comInfo.setUnitValue(unitValue);
comInfo.setUnitWeight(itemWeight);
originCountry = originCountry!=null?originCountry.trim():"";
Country originCountryMfg = soap.getCountry("ISO3", originCountry).getResponseCountry();
comInfo.setOriginCountry(originCountryMfg);
......@@ -12451,6 +12455,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
comInfo.setHarmonizedCode(harmonizCode);//As per Taro Haromonization code
comInfo.setUnitValue(unitValue);
comInfo.setUnitWeight(itemWeight);
originCountry = originCountry!=null?originCountry.trim():"";
Country originCountryMfg = soap.getCountry("ISO3", originCountry).getResponseCountry();
comInfo.setOriginCountry(originCountryMfg);
System.out.println("VALUES IN NAFTA VALUES "+nafFlag);
......
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