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;
import java.util.*;
import java.text.*;
import java.sql.*;
import javax.ejb.*;
import ibase.webitm.ejb.MasterStatefulLocal;
import javax.naming.InitialContext;
......@@ -41,18 +40,7 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
PreparedStatement pstmt = null;
Connection conn = null;
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();
try
......@@ -93,66 +81,6 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
errString = itmdbAccess.getErrorString("","ASNCONFEMD",loginEmpCode);
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 = ?";
pstmt = conn.prepareStatement( sql );
pstmt.setTimestamp(1, Timestamp.valueOf( confDateStr ) );
......@@ -167,7 +95,7 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
{
pstmt.close();
pstmt = null;
}
}
// 16/10/11 manoharan call po generation here
errString = generatePurcOrder(tranId, xtraParams, forcedFlag, conn);
......@@ -185,6 +113,7 @@ public class AsnConf extends ActionHandlerEJB implements AsnConfLocal, AsnConfRe
else
{
isError = true;
return errString;
}
System.out.println("isError111 =["+isError+"]");
// end 16/10/11 manoharan call po generation here
......@@ -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
......
......@@ -237,7 +237,10 @@ public class CartonNoGenPrc extends ProcessEJB implements CartonNoGenPrcLocal,Ca
{
try
{
conn.rollback();
if (conn != null)
{
conn.rollback();
}
int [] updateCounts = buex.getUpdateCounts();
for (int i = 0; i < updateCounts.length; i++)
{
......
......@@ -207,6 +207,11 @@ public class CheckSheetPos extends ValidatorEJB implements CheckSheetPosLocal, C
{
errString = generateBOLReport(shipmentId, printer, conn, xtraParams);
}
else
{
isError = true;
return errString;
}
}
else
......
......@@ -1370,7 +1370,9 @@ public class ConsolidatToDoc {
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") || 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");
if(!"C".equalsIgnoreCase(status))
......@@ -1378,7 +1380,9 @@ public class ConsolidatToDoc {
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");
if(!"C".equalsIgnoreCase(status))
......
......@@ -658,8 +658,6 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
}
} catch (Exception e) {
// TODO: handle exception
......@@ -667,17 +665,25 @@ public class DockTranPos extends ValidatorEJB implements DockTranPosLocal, DockT
}
finally
{
if(pstmt != null)
try
{
pstmt.close();
pstmt = null;
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
}
if(rs != null)
{
rs.close();
rs = null;
catch (Exception e) {
// TODO: handle exception
throw e;
}
}
......
......@@ -91,7 +91,7 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
String lineNoSord = "";
String pickType = "";
String stagingLoc = "";//STAGING_LOC
String refSer = "";
double grossRate = 0d;
double convQtyStduom = 0d;
......@@ -513,6 +513,7 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
}
else
{
isError = true;
retString = itmDBAccess.getErrorString("","RECNOTSORA","");
return retString;
}
......@@ -895,44 +896,66 @@ public class PickIssConf extends ActionHandlerEJB implements PickIssConfLocal, P
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
if(!("A".equalsIgnoreCase(pickType)))
//if(!("A".equalsIgnoreCase(pickType)) && !("M".equalsIgnoreCase(pickType)))
//Changed by sumit on 24/01/13 getting ref_ser start.
sql = "SELECT REF_SER,PTCN FROM WAVE_TASK_DET WHERE REF_ID = ?";
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'
//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 = ? ";
pstmt = conn.prepareStatement(updateSql);
pstmt.setString(1, pickOrder);
updCnt = pstmt.executeUpdate();
if( updCnt > 0 )
{
System.out.println( updCnt + " rows updated successfully" );
}
pstmt.close();pstmt = null;
refSer = rs.getString("ref_ser");
refSer = refSer == null?"":refSer;
ptcn = rs.getString("ptcn");
ptcn = ptcn == null?"":ptcn;
}
//end of addition on 08/08/12
//changes by kunal on 08/08/12
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;
}
System.out.println(" ref_ser ["+refSer+"]");
rs.close();rs = null;
pstmt.close();pstmt = null;
//Changed by sumit on 24/01/13 getting ref_ser end.
//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 15/01/13 in case of master pick status too not update here.
//if(!("A".equalsIgnoreCase(pickType)))
//Changed by sumit on 21/01/13 revert changes did on 15/01/13.
//Changed by sumit on 24/01/13 adding refser in condition
//if(!("A".equalsIgnoreCase(pickType)))
if(!("A".equalsIgnoreCase(pickType)) && !"P-PICK".equalsIgnoreCase(refSer) && !"A-PICK".equalsIgnoreCase(refSer) )
{
//Changed by sumit on 10/08/12 update wave_status of wave_task_det, same time of updating status 'Y'
//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 = ? ";
pstmt = conn.prepareStatement(updateSql);
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
//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.
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
pstmt.close();
pstmt = null;
}
if(rs1 != null )
{
rs1.close();
rs1 = null;
}
if(pstmtIss != null )
{
pstmtIss.close();
......
......@@ -503,12 +503,19 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
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);
}
//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;
}
//update actual quantity in repl_order_det.end
......@@ -550,11 +557,13 @@ public class WaveCancelEJB extends ActionHandlerEJB implements WaveCancelEJBLoca
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);
}
//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)
{
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
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
......@@ -3978,6 +3978,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
String dspRefId = updateWaveTaskDet(waveId,4,saleOrder,"","",ptcnID,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
//changed by sumit on 23/08/12 update wave_status
errString = updateWaveSatus(waveId, conn);
}
else
{
return errString;
}
}
catch(Exception e)
{
......@@ -12497,6 +12506,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
{
System.out.println("GENERATING ERREOS&&&&&&&&&&&&&&&&&&&-------&&&&&&&&&&&&&&&&&&&&&&&");
errString = getError(saleOrder,"INVORDQTY",conn);
return errString;
}
//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
if (tranIDSer.indexOf("ERROR") > -1 )
{
errString = itmDBAccessEJB.getErrorString("","VTTRANID","","",conn);
return errString;
}
System.out.println(tranIDSer);
......@@ -15137,6 +15148,11 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
pstmtPacking =null;
}
if(errString != null && errString.indexOf("ERROR") != -1)
{
throw new Exception();
}
}
catch(Exception e)
{
......@@ -15865,17 +15881,24 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
finally
{
if(pstmt != null)
try
{
pstmt.close();
pstmt = null;
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
}
if(rs != null)
catch(Exception e)
{
rs.close();
rs = null;
throw e;
}
}
......@@ -15922,7 +15945,26 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
finally
{
try
{
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rs != null)
{
rs.close();
rs = null;
}
}
catch (Exception e)
{
throw e;
}
}
return lastLineNo;
......@@ -16006,6 +16048,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
catch (Exception e1)
{
throw new ITMException(e1);
}
}
System.out.println("Returing Result==============>>>"+masterPack);
......@@ -16664,6 +16707,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
catch (Exception e1)
{
throw new ITMException(e1);
}
}
......@@ -17061,6 +17105,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
catch (Exception e1)
{
throw new ITMException(e1);
}
}
......@@ -17532,6 +17577,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
catch (Exception e1)
{
throw new ITMException(e1);
}
}
return transInfoMap;
......@@ -17622,6 +17668,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
catch (Exception e1)
{
throw new ITMException(e1);
}
}
return sordInfoMap;
......@@ -17687,6 +17734,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
catch (Exception e1)
{
throw new ITMException(e1);
}
}
return docLoc;
......@@ -17755,6 +17803,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
catch (Exception e1)
{
throw new ITMException(e1);
}
}
return stationMap;
......@@ -17819,6 +17868,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
catch (Exception e1)
{
throw new ITMException(e1);
}
}
return partQty;
......@@ -18606,7 +18656,7 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
catch(Exception e)
{
throw new ITMException(e);
}
return stockQuantity;
......@@ -19296,15 +19346,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
finally
{
if(rs != null)
try
{
rs.close();
rs = null;
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
if(pstmt != null)
catch(Exception e)
{
pstmt.close();
pstmt = null;
throw new ITMException(e);
}
}
return isSingleLot;
......@@ -20140,25 +20197,32 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
finally
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rsRepl != null)
try
{
rsRepl.close();
rsRepl = null;
if(rs != 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();
pstmtRepl = null;
throw new ITMException(e2);
}
}
......@@ -20205,15 +20269,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
finally
{
if(rs != null)
try
{
rs.close();
rs = null;
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
if(pstmt != null)
catch(Exception e2)
{
pstmt.close();
pstmt = null;
throw new ITMException(e2);
}
}
......@@ -20681,15 +20752,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
finally
{
if(rs != null)
try
{
rs.close();
rs = null;
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
if(pstmt != null)
catch(Exception e2)
{
pstmt.close();
pstmt = null;
throw new ITMException(e2);
}
}
......@@ -20734,15 +20812,22 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
finally
{
if(rs != null)
try
{
rs.close();
rs = null;
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
if(pstmt != null)
catch(Exception e2)
{
pstmt.close();
pstmt = null;
throw new ITMException(e2);
}
}
......@@ -20804,25 +20889,32 @@ public class WaveGenerationPrc extends ProcessEJB implements WaveGenerationPrcLo
}
finally
{
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(rsPick != null)
try
{
rsPick.close();
rsPick = null;
if(rs != 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();
pstmtPick = null;
throw new ITMException(e2);
}
}
......@@ -20981,15 +21073,22 @@ public int updateReplOrdDet(String replType,String itemCode,String siteCode,Stri
}
finally
{
if(rs != null)
try
{
rs.close();
rs = null;
if(rs != null)
{
rs.close();
rs = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
}
if(pstmt != null)
catch(Exception e2)
{
pstmt.close();
pstmt = null;
throw new ITMException(e2);
}
}
......
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