Commit 0034c4f2 authored by ppatro's avatar ppatro

controll error string and pick -iss issue


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@92562 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 4dcecdb4
...@@ -15,7 +15,6 @@ import java.util.Date; ...@@ -15,7 +15,6 @@ import java.util.Date;
import java.util.*; import java.util.*;
import java.text.*; import java.text.*;
import java.sql.*; import java.sql.*;
import javax.ejb.*; import javax.ejb.*;
import ibase.webitm.ejb.MasterStatefulLocal; import ibase.webitm.ejb.MasterStatefulLocal;
import javax.naming.InitialContext; import javax.naming.InitialContext;
...@@ -41,18 +40,7 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe ...@@ -41,18 +40,7 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
Connection conn = null; Connection conn = null;
String errString = ""; String errString = "";
//Changed by sumit 24/01/13 start.
String suppCode = "",qtyStr = "", priceList = "";
String itemCode = "";
double quantity = 0.0, rate = 0.0;
java.util.Date currDate = null;
String dbDateFormat = null;
String applDateFormat = null;
DateFormat dateFormat = null;
String currDateStr = null;
PreparedStatement pstmt1 = null;
ResultSet rs1 = null;
//Changed by sumit 24/01/13 end.
ITMDBAccessEJB itmdbAccess = new ITMDBAccessEJB(); ITMDBAccessEJB itmdbAccess = new ITMDBAccessEJB();
try try
...@@ -93,66 +81,6 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe ...@@ -93,66 +81,6 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
errString = itmdbAccess.getErrorString("","ASNCONFEMD",loginEmpCode); errString = itmdbAccess.getErrorString("","ASNCONFEMD",loginEmpCode);
return errString; return errString;
} }
//Changed by sumit on 23/01/13 To add price list validation at confirmation.start
currDate = new java.util.Date();
dbDateFormat = genericUtility.getDBDateFormat();
applDateFormat = genericUtility.getApplDateFormat();
dateFormat = new SimpleDateFormat(applDateFormat);
currDateStr = dateFormat.format(currDate);
SimpleDateFormat simpleDateFormatDB = new SimpleDateFormat(genericUtility.getDBDateFormat());
Timestamp timestamp = Timestamp.valueOf(simpleDateFormatDB.format(currDate).toString() + " 00:00:00.0");
sql = "SELECT AH.SUPP_CODE, AD.QUANTITY, AD.ITEM_CODE FROM ASN_HDR AH, ASN_DET AD WHERE AH.TRAN_ID = ? AND AH.TRAN_ID = AD.TRAN_ID";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
while( rs.next())
{
suppCode = rs.getString("SUPP_CODE");
quantity = rs.getDouble("QUANTITY");
itemCode = rs.getString("ITEM_CODE");
System.out.println(" suppCode ["+suppCode+"] quantity ["+quantity+"] itemCode ["+itemCode+"]");
sql = " SELECT PRICE_LIST FROM SUPPLIER WHERE SUPP_CODE = ?";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, suppCode);
rs1 = pstmt1.executeQuery();
if( rs1.next() )
{
priceList = rs1.getString("PRICE_LIST");
}
rs1.close(); rs1 = null;
pstmt1.close(); pstmt1 = null;
sql="select rate from pricelist where item_code = ? and price_list= ? and ? >= eff_from and ? <= valid_upto ";
pstmt1 = conn.prepareStatement(sql);
pstmt1.setString(1, itemCode);// item_code
pstmt1.setString(2,checkNull(priceList));
pstmt1.setTimestamp(3,timestamp);
pstmt1.setTimestamp(4,timestamp );
rs1 = pstmt1.executeQuery();
if( rs1.next() )
{
rate = rs1.getDouble("rate");
}
rs1.close(); rs1 = null;
pstmt1.close(); pstmt1 = null;
if ( rate == 0 )
{
/*// 26/10/11 manoharan all the errors should be returned so that warnings can be processed
//errString = getErrorString("rate","INVRATE",userId);
errList.add( "INVRATE" );
errFields.add( childNodeName.toLowerCase() );*/
errString = itmdbAccess.getErrorString("","INVRATE",loginEmpCode);
return errString;
}
}
rs.close(); rs = null;
pstmt.close(); pstmt = null;
//Changed by sumit on 23/01/13 To add price list validation at confirmation.end
sql = "UPDATE ASN_HDR SET CONFIRMED = 'Y', CONF_DATE = ?, EMP_CODE__APRV = ? WHERE TRAN_ID = ?"; sql = "UPDATE ASN_HDR SET CONFIRMED = 'Y', CONF_DATE = ?, EMP_CODE__APRV = ? WHERE TRAN_ID = ?";
pstmt = conn.prepareStatement( sql ); pstmt = conn.prepareStatement( sql );
pstmt.setTimestamp(1, Timestamp.valueOf( confDateStr ) ); pstmt.setTimestamp(1, Timestamp.valueOf( confDateStr ) );
...@@ -167,7 +95,7 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe ...@@ -167,7 +95,7 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
{ {
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
// 16/10/11 manoharan call po generation here // 16/10/11 manoharan call po generation here
errString = generatePurcOrder(tranId, xtraParams, forcedFlag, conn); errString = generatePurcOrder(tranId, xtraParams, forcedFlag, conn);
...@@ -185,6 +113,7 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe ...@@ -185,6 +113,7 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
else else
{ {
isError = true; isError = true;
return errString;
} }
System.out.println("isError111 =["+isError+"]"); System.out.println("isError111 =["+isError+"]");
// end 16/10/11 manoharan call po generation here // end 16/10/11 manoharan call po generation here
...@@ -1355,6 +1284,13 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe ...@@ -1355,6 +1284,13 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
} }
*/ */
} }
//Chnaged By Pragyan 18/01/13 To gererate error if PO not generated.start
else
{
errString = itmdbAccess.getErrorString("","ERRGENPOD",userId);
return errString;
}
//Chnaged By Pragyan 18/01/13 To gererate error if PO not generated.start
} }
} }
else else
......
...@@ -237,7 +237,10 @@ public class CartonNoGenPrc extends ProcessEJB implements CartonNoGenPrcLocal,Ca ...@@ -237,7 +237,10 @@ public class CartonNoGenPrc extends ProcessEJB implements CartonNoGenPrcLocal,Ca
{ {
try try
{ {
conn.rollback(); if (conn != null)
{
conn.rollback();
}
int [] updateCounts = buex.getUpdateCounts(); int [] updateCounts = buex.getUpdateCounts();
for (int i = 0; i < updateCounts.length; i++) for (int i = 0; i < updateCounts.length; i++)
{ {
......
...@@ -207,6 +207,11 @@ public class CheckSheetPos extends ValidatorEJB implements CheckSheetPosLocal, C ...@@ -207,6 +207,11 @@ public class CheckSheetPos extends ValidatorEJB implements CheckSheetPosLocal, C
{ {
errString = generateBOLReport(shipmentId, printer, conn, xtraParams); errString = generateBOLReport(shipmentId, printer, conn, xtraParams);
} }
else
{
isError = true;
return errString;
}
} }
else else
......
...@@ -1370,7 +1370,9 @@ public class ConsolidatToDoc { ...@@ -1370,7 +1370,9 @@ public class ConsolidatToDoc {
if(rs.next()) if(rs.next())
{ {
//if(key.equalsIgnoreCase("P-TASK") || key.equalsIgnoreCase("C-PICK") ) //added by Kunal on 11/09/12 //if(key.equalsIgnoreCase("P-TASK") || key.equalsIgnoreCase("C-PICK") ) //added by Kunal on 11/09/12
if(key.equalsIgnoreCase("P-TASK") || key.equalsIgnoreCase("C-PICK") || key.equalsIgnoreCase("P-PICK") ) //added by Kunal on 11/09/12 //Changed by sumit on 24/01/13 removed "p-pick" ref ser from if condition
//if(key.equalsIgnoreCase("P-TASK") || key.equalsIgnoreCase("C-PICK") || key.equalsIgnoreCase("P-PICK") ) //added by Kunal on 11/09/12
if(key.equalsIgnoreCase("P-TASK") || key.equalsIgnoreCase("C-PICK") ) //added by Kunal on 11/09/12
{ {
status = rs.getString("status"); status = rs.getString("status");
if(!"C".equalsIgnoreCase(status)) if(!"C".equalsIgnoreCase(status))
...@@ -1378,7 +1380,9 @@ public class ConsolidatToDoc { ...@@ -1378,7 +1380,9 @@ public class ConsolidatToDoc {
return isConfirmed = false; return isConfirmed = false;
} }
} }
else if( key.equalsIgnoreCase("A-PICK") || key.equalsIgnoreCase("M-PICK")) //Changed by sumit on 24/01/13 add "p-pick" ref ser in if condition
//else if( key.equalsIgnoreCase("A-PICK") || key.equalsIgnoreCase("M-PICK") )
else if( key.equalsIgnoreCase("A-PICK") || key.equalsIgnoreCase("M-PICK") || key.equalsIgnoreCase("P-PICK") )
{ {
status = rs.getString("status"); status = rs.getString("status");
if(!"C".equalsIgnoreCase(status)) if(!"C".equalsIgnoreCase(status))
......
...@@ -658,8 +658,6 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT ...@@ -658,8 +658,6 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
} }
} catch (Exception e) { } catch (Exception e) {
// TODO: handle exception // TODO: handle exception
...@@ -667,17 +665,25 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT ...@@ -667,17 +665,25 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
} }
finally finally
{ {
if(pstmt != null) try
{ {
pstmt.close(); if(pstmt != null)
pstmt = null; {
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
} }
if(rs != null) catch (Exception e) {
{ // TODO: handle exception
rs.close();
rs = null; throw e;
} }
} }
......
...@@ -91,7 +91,7 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P ...@@ -91,7 +91,7 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
String lineNoSord = ""; String lineNoSord = "";
String pickType = ""; String pickType = "";
String stagingLoc = "";//STAGING_LOC String stagingLoc = "";//STAGING_LOC
String refSer = "";
double grossRate = 0d; double grossRate = 0d;
double convQtyStduom = 0d; double convQtyStduom = 0d;
...@@ -513,6 +513,7 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P ...@@ -513,6 +513,7 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
} }
else else
{ {
isError = true;
retString = itmDBAccess.getErrorString("","RECNOTSORA",""); retString = itmDBAccess.getErrorString("","RECNOTSORA","");
return retString; return retString;
} }
...@@ -895,44 +896,66 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P ...@@ -895,44 +896,66 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
if(isUpdatehdr) if(isUpdatehdr)
{ {
//case added by cpandey in case of active it should status should not be update in wave_task_det on 08/08/12 //Changed by sumit on 24/01/13 getting ref_ser start.
if(!("A".equalsIgnoreCase(pickType))) sql = "SELECT REF_SER,PTCN FROM WAVE_TASK_DET WHERE REF_ID = ?";
//if(!("A".equalsIgnoreCase(pickType)) && !("M".equalsIgnoreCase(pickType))) pstmt = conn.prepareStatement(sql);
pstmt.setString(1,replOrder);
rs = pstmt.executeQuery();
if( rs.next() )
{ {
//Changed by sumit on 10/08/12 update wave_status of wave_task_det, same time of updating status 'Y' refSer = rs.getString("ref_ser");
//updateSql = "UPDATE WAVE_TASK_DET SET STATUS = 'Y' WHERE REF_ID = ? "; refSer = refSer == null?"":refSer;
updateSql = "UPDATE WAVE_TASK_DET SET STATUS = 'Y', WAVE_STATUS = 'V' WHERE REF_ID = ? "; ptcn = rs.getString("ptcn");
pstmt = conn.prepareStatement(updateSql); ptcn = ptcn == null?"":ptcn;
pstmt.setString(1, pickOrder);
updCnt = pstmt.executeUpdate();
if( updCnt > 0 )
{
System.out.println( updCnt + " rows updated successfully" );
}
pstmt.close();pstmt = null;
} }
//end of addition on 08/08/12 System.out.println(" ref_ser ["+refSer+"]");
//changes by kunal on 08/08/12 rs.close();rs = null;
sql = "select ptcn from wave_task_det where ref_id = ?"; pstmt.close();pstmt = null;
pstmt = conn.prepareStatement(sql); //Changed by sumit on 24/01/13 getting ref_ser end.
pstmt.setString(1,replOrder); //case added by cpandey in case of active it should status should not be update in wave_task_det on 08/08/12
rs = pstmt.executeQuery(); //Changed by sumit on 15/01/13 in case of master pick status too not update here.
if( rs.next() ) //if(!("A".equalsIgnoreCase(pickType)))
{ //Changed by sumit on 21/01/13 revert changes did on 15/01/13.
ptcn = rs.getString("ptcn") == null?"":rs.getString("ptcn"); //Changed by sumit on 24/01/13 adding refser in condition
} //if(!("A".equalsIgnoreCase(pickType)))
if( rs != null) if(!("A".equalsIgnoreCase(pickType)) && !"P-PICK".equalsIgnoreCase(refSer) && !"A-PICK".equalsIgnoreCase(refSer) )
{ {
rs.close(); //Changed by sumit on 10/08/12 update wave_status of wave_task_det, same time of updating status 'Y'
rs = null; //updateSql = "UPDATE WAVE_TASK_DET SET STATUS = 'Y' WHERE REF_ID = ? ";
} updateSql = "UPDATE WAVE_TASK_DET SET STATUS = 'Y', WAVE_STATUS = 'V' WHERE REF_ID = ? ";
if(pstmt != null) pstmt = conn.prepareStatement(updateSql);
{ pstmt.setString(1, pickOrder);
pstmt.close();
pstmt = null; updCnt = pstmt.executeUpdate();
}
if( updCnt > 0 )
{
System.out.println( updCnt + " rows updated successfully" );
}
pstmt.close();pstmt = null;
}
//end of addition on 08/08/12
//changes by kunal on 08/08/12
//Changed by sumit on 24/01/13 commenting and write tvhis code above start
/*sql = "select ptcn from wave_task_det where ref_id = ?";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,replOrder);
rs = pstmt.executeQuery();
if( rs.next() )
{
ptcn = rs.getString("ptcn") == null?"":rs.getString("ptcn");
}
if( rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}*/
//Changed by sumit on 24/01/13 commenting and write tvhis code above end.
//Changed by sumit on 07/08/12 for checking whether pick iss is inserted or not if yes then remaining, wave_task of M-Pack ref_ser will updated 'c' start. //Changed by sumit on 07/08/12 for checking whether pick iss is inserted or not if yes then remaining, wave_task of M-Pack ref_ser will updated 'c' start.
sql = " SELECT * FROM PICK_ORD_HDR WHERE PICK_ORDER = ? AND PICK_TYPE = 'M' "; sql = " SELECT * FROM PICK_ORD_HDR WHERE PICK_ORDER = ? AND PICK_TYPE = 'M' ";
...@@ -1014,6 +1037,11 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P ...@@ -1014,6 +1037,11 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if(rs1 != null )
{
rs1.close();
rs1 = null;
}
if(pstmtIss != null ) if(pstmtIss != null )
{ {
pstmtIss.close(); pstmtIss.close();
......
...@@ -503,12 +503,19 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca ...@@ -503,12 +503,19 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
updateRecord = updateReplanishment(replOrder,replLineNo,pickOrder,pickLineNo,quantity,false,conn);//test1sucess updateRecord = updateReplanishment(replOrder,replLineNo,pickOrder,pickLineNo,quantity,false,conn);//test1sucess
} }
*/ */
if(!refSer.trim().equalsIgnoreCase("S-DOC") || !refSer.equalsIgnoreCase("RP-PND") || !refSer.equalsIgnoreCase("RP-PSO")) //Changed by Rohan on 24-01-13 do not allocate actual Quantity in Repl_ord_det in case of stock to dock
//if(!refSer.trim().equalsIgnoreCase("S-DOC") || !refSer.equalsIgnoreCase("RP-PND") || !refSer.equalsIgnoreCase("RP-PSO"))
//Changed by Rohan on 24-01-13 do not allocate actual Quantity in Repl_ord_det in case of stock to dock
//if(!refSer.trim().equalsIgnoreCase("S-DOC") || !refSer.equalsIgnoreCase("RP-PND") || !refSer.equalsIgnoreCase("RP-PSO"))
if(!refSer.trim().equalsIgnoreCase("S-DOC") && !refSer.equalsIgnoreCase("RP-PND") && !refSer.equalsIgnoreCase("RP-PSO"))
{ {
updateRecord = updateReplanishment(replOrder,replLineNo,pickOrder,pickLineNo,quantity,false,conn); updateRecord = updateReplanishment(replOrder,replLineNo,pickOrder,pickLineNo,quantity,false,conn);
} }
//Changed by Rohan on 03/12/11 not update repanishment in case of stock to dock.start //Changed by Rohan on 03/12/11 not update repanishment in case of stock to dock.start
//Changed by Rohan on 03/12/11 not update repanishment in case of stock to dock.end
//Changed by Rohan on 03/12/11 not update repanishment in case of stock to dock.start
break; break;
} }
//update actual quantity in repl_order_det.end //update actual quantity in repl_order_det.end
...@@ -550,11 +557,13 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca ...@@ -550,11 +557,13 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
updateRecord = updateReplanishment(replPickOrder,replPickLineNo,pickOrder,pickLineNo,quantity,false,conn); updateRecord = updateReplanishment(replPickOrder,replPickLineNo,pickOrder,pickLineNo,quantity,false,conn);
} }
*/ */
if(!refSer.trim().equalsIgnoreCase("S-DOC") || !refSer.equalsIgnoreCase("RP-PND") || !refSer.equalsIgnoreCase("RP-PSO")) //Changed by Rohan on 24-01-13 do not allocate actual Quantity in Repl_ord_det in case of stock to dock
//if(!refSer.trim().equalsIgnoreCase("S-DOC") || !refSer.equalsIgnoreCase("RP-PND") || !refSer.equalsIgnoreCase("RP-PSO"))
if(!refSer.trim().equalsIgnoreCase("S-DOC") && !refSer.equalsIgnoreCase("RP-PND") && !refSer.equalsIgnoreCase("RP-PSO"))
{ {
updateRecord = updateReplanishment(replPickOrder,replPickLineNo,pickOrder,pickLineNo,quantity,false,conn); updateRecord = updateReplanishment(replPickOrder,replPickLineNo,pickOrder,pickLineNo,quantity,false,conn);
} }
//Changed by Rohan on 03/12/11 not update repanishment in case of stock to dock.end //Changed by Rohan on 03/12/11 not update repanishment in case of stock to dock.end
if(updateRecord > 0) if(updateRecord > 0)
{ {
System.out.println("Replenishment updated with actual quantity "+quantity+" For replenishment oder :"+replPickOrder +" and line no :"+replPickLineNo); System.out.println("Replenishment updated with actual quantity "+quantity+" For replenishment oder :"+replPickOrder +" and line no :"+replPickLineNo);
......
...@@ -3903,7 +3903,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -3903,7 +3903,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
if(tranCode == null || tranCode.length() <= 0) if(tranCode == null || tranCode.length() <= 0)
{ {
errString = getError(saleOrder + " Total Weight["+totalWeightCurrentshipment+"] Total Case Count ["+totCaseCount+"] ", "NVLTRANCOD", conn); return errString = getError(saleOrder + " Total Weight["+totalWeightCurrentshipment+"] Total Case Count ["+totCaseCount+"] ", "NVLTRANCOD", conn);
} }
//Changed By Pragyan 26/12/12/ To send the List with ordered Location //Changed By Pragyan 26/12/12/ To send the List with ordered Location
...@@ -3978,6 +3978,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -3978,6 +3978,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
String dspRefId = updateWaveTaskDet(waveId,4,saleOrder,"","",ptcnID,conn); String dspRefId = updateWaveTaskDet(waveId,4,saleOrder,"","",ptcnID,conn);
errString = updateShipment(headerDom, detailDom,waveId,saleOrder,dspRefId,tranCode,transMode, xtraParams, conn); errString = updateShipment(headerDom, detailDom,waveId,saleOrder,dspRefId,tranCode,transMode, xtraParams, conn);
} }
else
{
return errString;
}
} }
...@@ -4060,6 +4065,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -4060,6 +4065,10 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
//changed by sumit on 23/08/12 update wave_status //changed by sumit on 23/08/12 update wave_status
errString = updateWaveSatus(waveId, conn); errString = updateWaveSatus(waveId, conn);
} }
else
{
return errString;
}
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -12497,6 +12506,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -12497,6 +12506,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
{ {
System.out.println("GENERATING ERREOS&&&&&&&&&&&&&&&&&&&-------&&&&&&&&&&&&&&&&&&&&&&&"); System.out.println("GENERATING ERREOS&&&&&&&&&&&&&&&&&&&-------&&&&&&&&&&&&&&&&&&&&&&&");
errString = getError(saleOrder,"INVORDQTY",conn); errString = getError(saleOrder,"INVORDQTY",conn);
return errString;
} }
//Changed by Rohan on 16/08/12 to generate error if customer to not accept actives.end //Changed by Rohan on 16/08/12 to generate error if customer to not accept actives.end
...@@ -14788,6 +14798,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -14788,6 +14798,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
if (tranIDSer.indexOf("ERROR") > -1 ) if (tranIDSer.indexOf("ERROR") > -1 )
{ {
errString = itmDBAccessEJB.getErrorString("","VTTRANID","","",conn); errString = itmDBAccessEJB.getErrorString("","VTTRANID","","",conn);
return errString;
} }
System.out.println(tranIDSer); System.out.println(tranIDSer);
...@@ -15137,6 +15148,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -15137,6 +15148,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtPacking =null; pstmtPacking =null;
} }
if(errString != null && errString.indexOf("ERROR") != -1)
{
throw new Exception();
}
} }
catch(Exception e) catch(Exception e)
{ {
...@@ -15865,17 +15881,24 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -15865,17 +15881,24 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
finally finally
{ {
if(pstmt != null) try
{ {
pstmt.close(); if(pstmt != null)
pstmt = null; {
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
} }
if(rs != null) catch(Exception e)
{ {
rs.close(); throw e;
rs = null;
} }
} }
...@@ -15922,7 +15945,26 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -15922,7 +15945,26 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
finally finally
{ {
try
{
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
}
catch (Exception e)
{
throw e;
}
} }
return lastLineNo; return lastLineNo;
...@@ -16006,6 +16048,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -16006,6 +16048,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
catch (Exception e1) catch (Exception e1)
{ {
throw new ITMException(e1);
} }
} }
System.out.println("Returing Result==============>>>"+masterPack); System.out.println("Returing Result==============>>>"+masterPack);
...@@ -16664,6 +16707,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -16664,6 +16707,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
catch (Exception e1) catch (Exception e1)
{ {
throw new ITMException(e1);
} }
} }
...@@ -17061,6 +17105,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -17061,6 +17105,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
catch (Exception e1) catch (Exception e1)
{ {
throw new ITMException(e1);
} }
} }
...@@ -17532,6 +17577,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -17532,6 +17577,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
catch (Exception e1) catch (Exception e1)
{ {
throw new ITMException(e1);
} }
} }
return transInfoMap; return transInfoMap;
...@@ -17622,6 +17668,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -17622,6 +17668,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
catch (Exception e1) catch (Exception e1)
{ {
throw new ITMException(e1);
} }
} }
return sordInfoMap; return sordInfoMap;
...@@ -17687,6 +17734,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -17687,6 +17734,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
catch (Exception e1) catch (Exception e1)
{ {
throw new ITMException(e1);
} }
} }
return docLoc; return docLoc;
...@@ -17755,6 +17803,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -17755,6 +17803,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
catch (Exception e1) catch (Exception e1)
{ {
throw new ITMException(e1);
} }
} }
return stationMap; return stationMap;
...@@ -17819,6 +17868,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -17819,6 +17868,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
catch (Exception e1) catch (Exception e1)
{ {
throw new ITMException(e1);
} }
} }
return partQty; return partQty;
...@@ -18606,7 +18656,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -18606,7 +18656,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
catch(Exception e) catch(Exception e)
{ {
throw new ITMException(e);
} }
return stockQuantity; return stockQuantity;
...@@ -19296,15 +19346,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -19296,15 +19346,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
finally finally
{ {
if(rs != null) try
{ {
rs.close(); if(rs != null)
rs = null; {
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
} }
if(pstmt != null) catch(Exception e)
{ {
pstmt.close(); throw new ITMException(e);
pstmt = null;
} }
} }
return isSingleLot; return isSingleLot;
...@@ -20140,25 +20197,32 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -20140,25 +20197,32 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
finally finally
{ {
if(rs != null) try
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rsRepl != null)
{ {
rsRepl.close(); if(rs != null)
rsRepl = null; {
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rsRepl != null)
{
rsRepl.close();
rsRepl = null;
}
if(pstmtRepl != null)
{
pstmtRepl.close();
pstmtRepl = null;
}
} }
if(pstmtRepl != null) catch(Exception e2)
{ {
pstmtRepl.close(); throw new ITMException(e2);
pstmtRepl = null;
} }
} }
...@@ -20205,15 +20269,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -20205,15 +20269,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
finally finally
{ {
if(rs != null) try
{ {
rs.close(); if(rs != null)
rs = null; {
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
} }
if(pstmt != null) catch(Exception e2)
{ {
pstmt.close(); throw new ITMException(e2);
pstmt = null;
} }
} }
...@@ -20681,15 +20752,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -20681,15 +20752,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
finally finally
{ {
if(rs != null) try
{ {
rs.close(); if(rs != null)
rs = null; {
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
} }
if(pstmt != null) catch(Exception e2)
{ {
pstmt.close(); throw new ITMException(e2);
pstmt = null;
} }
} }
...@@ -20734,15 +20812,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -20734,15 +20812,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
finally finally
{ {
if(rs != null) try
{ {
rs.close(); if(rs != null)
rs = null; {
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
} }
if(pstmt != null) catch(Exception e2)
{ {
pstmt.close(); throw new ITMException(e2);
pstmt = null;
} }
} }
...@@ -20804,25 +20889,32 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo ...@@ -20804,25 +20889,32 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
} }
finally finally
{ {
if(rs != null) try
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rsPick != null)
{ {
rsPick.close(); if(rs != null)
rsPick = null; {
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rsPick != null)
{
rsPick.close();
rsPick = null;
}
if(pstmtPick != null)
{
pstmtPick.close();
pstmtPick = null;
}
} }
if(pstmtPick != null) catch(Exception e2)
{ {
pstmtPick.close(); throw new ITMException(e2);
pstmtPick = null;
} }
} }
...@@ -20981,15 +21073,22 @@ public int updateReplOrdDet(String replType,String itemCode,String siteCode,Stri ...@@ -20981,15 +21073,22 @@ public int updateReplOrdDet(String replType,String itemCode,String siteCode,Stri
} }
finally finally
{ {
if(rs != null) try
{ {
rs.close(); if(rs != null)
rs = null; {
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
} }
if(pstmt != null) catch(Exception e2)
{ {
pstmt.close(); throw new ITMException(e2);
pstmt = null;
} }
} }
......
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