Commit 0cc2cbdb authored by prane's avatar prane

to visible eff_date during processing

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@184467 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 103e2176
...@@ -60,8 +60,7 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal, ...@@ -60,8 +60,7 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal,
} }
rtrStr = getData(dom, dom1, windowName, xtraParams); rtrStr = getData(dom, dom1, windowName, xtraParams);
} catch (Exception e) { } catch (Exception e) {
System.out System.out.println("Exception :BankRecoEJB :getData(String xmlString, String xmlString2, String windowName, String xtraParams):"
.println("Exception :BankRecoEJB :getData(String xmlString, String xmlString2, String windowName, String xtraParams):"
+ e.getMessage() + ":"); + e.getMessage() + ":");
throw new ITMException(e); throw new ITMException(e);
} }
...@@ -76,43 +75,38 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal, ...@@ -76,43 +75,38 @@ public class BankRecoPrc extends ProcessEJB implements BankRecoPrcLocal,
String refDate = ""; String refDate = "";
String resultString = ""; String resultString = "";
String errString = ""; String errString = "";
String errCode = "", entryBatchNo = ""; String errCode = "";
String entryBatchNo = "";
String refNo = "";
Connection conn = null; Connection conn = null;
ResultSet rs = null; ResultSet rs = null;
Statement stmt = null; //Statement stmt = null;
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
int cnt = 0; int cnt = 0;
java.sql.Timestamp refDateTs = null; java.sql.Timestamp refDateTs = null;
// StringBuffer retTabSepStrBuff = new StringBuffer(); // StringBuffer retTabSepStrBuff = new StringBuffer();
StringBuffer retTabSepStrBuff = new StringBuffer( StringBuffer retTabSepStrBuff = new StringBuffer("<?xml version = \"1.0\"?>");
"<?xml version = \"1.0\"?>");
retTabSepStrBuff.append("<DocumentRoot>"); retTabSepStrBuff.append("<DocumentRoot>");
retTabSepStrBuff.append("<description>").append("Datawindow Root") retTabSepStrBuff.append("<description>").append("Datawindow Root").append("</description>");
.append("</description>");
retTabSepStrBuff.append("<group0>"); retTabSepStrBuff.append("<group0>");
retTabSepStrBuff.append("<description>").append("Group0 description") retTabSepStrBuff.append("<description>").append("Group0 description").append("</description>");
.append("</description>");
retTabSepStrBuff.append("<Header0>"); retTabSepStrBuff.append("<Header0>");
ConnDriver connDriver = new ConnDriver(); //ConnDriver connDriver = new ConnDriver();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
// GenericUtility genericUtility = GenericUtility.getInstance(); // GenericUtility genericUtility = GenericUtility.getInstance();
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
SimpleDateFormat sdf = null; SimpleDateFormat sdf = null;
try { try {
//Changes and Commented By Bhushan on 06-06-2016 :START //Changes and Commented By Bhushan on 06-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
conn = getConnection(); conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END //Changes and Commented By Bhushan on 06-06-2016 :END
bankCode = genericUtility.getColumnValue("bank_code", dom); bankCode = genericUtility.getColumnValue("bank_code", dom);
effDate = genericUtility.getColumnValue("eff_date", dom); effDate = genericUtility.getColumnValue("eff_date", dom);
refDate = genericUtility.getColumnValue("ref_date", dom); refDate = genericUtility.getColumnValue("ref_date", dom);
sdf = new SimpleDateFormat(genericUtility.getApplDateFormat()); sdf = new SimpleDateFormat(genericUtility.getApplDateFormat());
if (refDate != null) { if (refDate != null) {
refDateTs = Timestamp.valueOf(genericUtility refDateTs = Timestamp.valueOf(genericUtility.getValidDateString(refDate, genericUtility .getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
.getValidDateString(refDate, genericUtility
.getApplDateFormat(), genericUtility
.getDBDateFormat())
+ " 00:00:00.0");
} }
getDataSql = "SELECT TRAN_ID," getDataSql = "SELECT TRAN_ID,"
+ " TRAN_TYPE," + " TRAN_TYPE,"
...@@ -144,7 +138,6 @@ conn = getConnection(); ...@@ -144,7 +138,6 @@ conn = getConnection();
System.out.println("The getDataSql becomes :" + getDataSql); System.out.println("The getDataSql becomes :" + getDataSql);
pstmt = conn.prepareStatement(getDataSql); pstmt = conn.prepareStatement(getDataSql);
pstmt.setString(1, bankCode); pstmt.setString(1, bankCode);
pstmt.setTimestamp(2, refDateTs); pstmt.setTimestamp(2, refDateTs);
...@@ -178,83 +171,35 @@ conn = getConnection(); ...@@ -178,83 +171,35 @@ conn = getConnection();
* retTabSepStrBuff.append(entryBatchNo).append("\n"); //End * retTabSepStrBuff.append(entryBatchNo).append("\n"); //End
* Addition Gulzar 20/12/06 * Addition Gulzar 20/12/06
*/ */
entryBatchNo = rs.getString("ENTRY_BATCH_NO"); entryBatchNo = checkNull(rs.getString("ENTRY_BATCH_NO"));
if (entryBatchNo == null) { if (entryBatchNo == null) {
entryBatchNo = " "; entryBatchNo = " ";
} }
retTabSepStrBuff.append("<Detail2>"); retTabSepStrBuff.append("<Detail2>");
retTabSepStrBuff.append("<entry_batch_no>").append( retTabSepStrBuff.append("<entry_batch_no>").append("<![CDATA[" + entryBatchNo + "]]>").append("</entry_batch_no>");
"<![CDATA[" + entryBatchNo + "]]>").append( retTabSepStrBuff.append("<ref_no>").append("<![CDATA[" + checkNull(rs.getString("REF_NO")) + "]]>").append("</ref_no>");
"</entry_batch_no>"); retTabSepStrBuff.append("<ref_date>").append("<![CDATA["+ sdf.format(rs.getTimestamp("REF_DATE"))+ "]]>").append("</ref_date>");
retTabSepStrBuff.append("<ref_no>").append( retTabSepStrBuff.append("<amount>").append("<![CDATA[" + checkNull(rs.getString("AMOUNT")) + "]]>").append("</amount>");
"<![CDATA[" + checkNull(rs.getString("REF_NO")) + "]]>") retTabSepStrBuff.append("<curr_code>").append("<![CDATA[" + checkNull(rs.getString("CURR_CODE")) + "]]>").append("</curr_code>");
.append("</ref_no>"); retTabSepStrBuff.append("<amount_curr>").append("<![CDATA[" + rs.getDouble("AMOUNT") / rs.getDouble("EXCH_RATE") + "]]>").append("</amount_curr>");
retTabSepStrBuff.append("<ref_date>").append( retTabSepStrBuff.append("<tran_type>").append("<![CDATA[" + checkNull(rs.getString("TRAN_TYPE")) + "]]>").append("</tran_type>");
"<![CDATA[" retTabSepStrBuff.append("<sundry_code>").append("<![CDATA[" + checkNull(rs.getString("SUNDRY_CODE")) + "]]>").append("</sundry_code>");
+ sdf.format(rs.getTimestamp("REF_DATE")) retTabSepStrBuff.append("<sundry_name>").append("<![CDATA[" + checkNull(rs.getString("SUNDRY_NAME")) + "]]>").append("</sundry_name>");
+ "]]>").append("</ref_date>"); retTabSepStrBuff.append("<amt_adj>").append("<![CDATA[" + checkNull(rs.getString("AMT_ADJ")) + "]]>").append("</amt_adj>");
retTabSepStrBuff.append("<amount>").append( retTabSepStrBuff.append("<tran_date>").append("<![CDATA["+ sdf.format(rs.getTimestamp("TRAN_DATE")) + "]]>").append("</tran_date>");
"<![CDATA[" + rs.getString("AMOUNT") + "]]>") retTabSepStrBuff.append("<ref_mode>").append("<![CDATA[" + checkNull(rs.getString("REF_MODE")) + "]]>").append("</ref_mode>");
.append("</amount>"); retTabSepStrBuff.append("<tran_ser>").append("<![CDATA[" + checkNull(rs.getString("TRAN_SER")) + "]]>").append("</tran_ser>");
retTabSepStrBuff.append("<curr_code>").append( retTabSepStrBuff.append("<tran_no>").append("<![CDATA[" + checkNull(rs.getString("TRAN_NO")) + "]]>").append("</tran_no>");
"<![CDATA[" + rs.getString("CURR_CODE") + "]]>") retTabSepStrBuff.append("<bank_code>").append("<![CDATA[" + checkNull(rs.getString("BANK_CODE")) + "]]>").append("</bank_code>");
.append("</curr_code>"); retTabSepStrBuff.append("<site_code>").append("<![CDATA[" + checkNull(rs.getString("SITE_CODE")) + "]]>").append("</site_code>");
retTabSepStrBuff.append("<amount_curr>").append( retTabSepStrBuff.append("<acct_code>").append("<![CDATA[" + checkNull(rs.getString("ACCT_CODE")) + "]]>").append("</acct_code>");
"<![CDATA[" + rs.getDouble("AMOUNT") retTabSepStrBuff.append("<cctr_code>").append("<![CDATA[" + checkNull(rs.getString("CCTR_CODE")) + "]]>").append("</cctr_code>");
/ rs.getDouble("EXCH_RATE") + "]]>") retTabSepStrBuff.append("<status>").append("<![CDATA[" + checkNull(rs.getString("STATUS")) + "]]>").append("</status>");
.append("</amount_curr>"); retTabSepStrBuff.append("<tran_id>").append("<![CDATA[" + checkNull(rs.getString("TRAN_ID")) + "]]>").append("</tran_id>");
retTabSepStrBuff.append("<tran_type>").append( retTabSepStrBuff.append("<remarks>").append("<![CDATA[" + checkNull(rs.getString("REMARKS")) + "]]>").append("</remarks>");
"<![CDATA[" + rs.getString("TRAN_TYPE") + "]]>") retTabSepStrBuff.append("<exch_rate>").append("<![CDATA[" + checkNull(rs.getString("EXCH_RATE")) + "]]>").append("</exch_rate>");
.append("</tran_type>");
retTabSepStrBuff.append("<sundry_code>").append(
"<![CDATA[" + rs.getString("SUNDRY_CODE") + "]]>")
.append("</sundry_code>");
retTabSepStrBuff.append("<sundry_name>").append(
"<![CDATA[" + rs.getString("SUNDRY_NAME") + "]]>")
.append("</sundry_name>");
retTabSepStrBuff.append("<amt_adj>").append(
"<![CDATA[" + rs.getString("AMT_ADJ") + "]]>")
.append("</amt_adj>");
retTabSepStrBuff.append("<tran_date>").append(
"<![CDATA["
+ sdf.format(rs.getTimestamp("TRAN_DATE"))
+ "]]>").append("</tran_date>");
retTabSepStrBuff.append("<ref_mode>").append(
"<![CDATA[" + rs.getString("REF_MODE") + "]]>")
.append("</ref_mode>");
retTabSepStrBuff.append("<tran_ser>").append(
"<![CDATA[" + rs.getString("TRAN_SER") + "]]>")
.append("</tran_ser>");
retTabSepStrBuff.append("<tran_no>").append(
"<![CDATA[" + rs.getString("TRAN_NO") + "]]>")
.append("</tran_no>");
retTabSepStrBuff.append("<bank_code>").append(
"<![CDATA[" + rs.getString("BANK_CODE") + "]]>")
.append("</bank_code>");
retTabSepStrBuff.append("<site_code>").append(
"<![CDATA[" + rs.getString("SITE_CODE") + "]]>")
.append("</site_code>");
retTabSepStrBuff.append("<acct_code>").append(
"<![CDATA[" + rs.getString("ACCT_CODE") + "]]>")
.append("</acct_code>");
retTabSepStrBuff.append("<cctr_code>").append(
"<![CDATA[" + rs.getString("CCTR_CODE") + "]]>")
.append("</cctr_code>");
retTabSepStrBuff.append("<status>").append(
"<![CDATA[" + rs.getString("STATUS") + "]]>")
.append("</status>");
retTabSepStrBuff.append("<tran_id>").append(
"<![CDATA[" + rs.getString("TRAN_ID") + "]]>")
.append("</tran_id>");
retTabSepStrBuff.append("<remarks>").append(
"<![CDATA[" + checkNull(rs.getString("REMARKS")) + "]]>")
.append("</remarks>");
retTabSepStrBuff.append("<exch_rate>").append(
"<![CDATA[" + rs.getString("EXCH_RATE") + "]]>")
.append("</exch_rate>");
//Pavan R on 03-may-18 to visible eff_date during processing //Pavan R on 03-may-18 to visible eff_date during processing
retTabSepStrBuff.append("<eff_date>").append("<![CDATA[" +effDate+ "]]>").append("</eff_date>"); retTabSepStrBuff.append("<eff_date>").append("<![CDATA[" + checkNull(effDate) + "]]>").append("</eff_date>");
//Pavan R on 03-may-18 end //Pavan R on 03-may-18 end
retTabSepStrBuff.append("</Detail2>"); retTabSepStrBuff.append("</Detail2>");
cnt++; cnt++;
...@@ -265,24 +210,21 @@ conn = getConnection(); ...@@ -265,24 +210,21 @@ conn = getConnection();
retTabSepStrBuff.append("</DocumentRoot>"); retTabSepStrBuff.append("</DocumentRoot>");
resultString = retTabSepStrBuff.toString(); resultString = retTabSepStrBuff.toString();
System.out.println("212--resultString:["+resultString+"]");
} else { } else {
errCode = "VTNOREC2"; errCode = "VTNOREC2";
} }
if (errCode != null && errCode.trim().length() > 0) { if (errCode != null && errCode.trim().length() > 0)
errString = itmDBAccessEJB.getErrorString("", errCode, "", "", {
conn); errString = itmDBAccessEJB.getErrorString("", errCode, "", "", conn);
resultString = errString; resultString = errString;
System.out.println("errString: " + errString); System.out.println("errString: " + errString);
} }
} catch (SQLException e) { } catch (SQLException e) {
System.out System.out.println("Exception :BankRecoEJB :getData(String xmlString, String xmlString2, String windowName, String xtraParams):"+ e.getMessage() + ":");
.println("Exception :BankRecoEJB :getData(String xmlString, String xmlString2, String windowName, String xtraParams):"
+ e.getMessage() + ":");
throw new ITMException(e); throw new ITMException(e);
} catch (Exception e) { } catch (Exception e) {
System.out System.out.println("Exception :BankRecoEJB :getData(String xmlString, String xmlString2, String windowName, String xtraParams):"+ e.getMessage() + ":");
.println("Exception :BankRecoEJB :getData(String xmlString, String xmlString2, String windowName, String xtraParams):"
+ e.getMessage() + ":");
throw new ITMException(e); throw new ITMException(e);
} finally { } finally {
try { try {
...@@ -295,9 +237,8 @@ conn = getConnection(); ...@@ -295,9 +237,8 @@ conn = getConnection();
return resultString; return resultString;
} }
public String process(String xmlString, String xmlString2, public String process(String xmlString, String xmlString2, String windowName, String xtraParams) throws RemoteException, ITMException
String windowName, String xtraParams) throws RemoteException, {
ITMException {
String retStr = ""; String retStr = "";
Document detailDom = null; Document detailDom = null;
Document headerDom = null; Document headerDom = null;
...@@ -314,9 +255,7 @@ conn = getConnection(); ...@@ -314,9 +255,7 @@ conn = getConnection();
} }
retStr = process(headerDom, detailDom, windowName, xtraParams); retStr = process(headerDom, detailDom, windowName, xtraParams);
} catch (Exception e) { } catch (Exception e) {
System.out System.out.println("Exception :BankRecoEJB :getData(String xmlString, String xmlString2, String windowName, String xtraParams):"+ e.getMessage() + ":");
.println("Exception :BankRecoEJB :getData(String xmlString, String xmlString2, String windowName, String xtraParams):"
+ e.getMessage() + ":");
throw new ITMException(e); throw new ITMException(e);
} }
return retStr; return retStr;
...@@ -360,9 +299,9 @@ conn = getConnection(); ...@@ -360,9 +299,9 @@ conn = getConnection();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
try { try {
//Changes and Commented By Bhushan on 06-06-2016 :START //Changes and Commented By Bhushan on 06-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
conn = getConnection(); conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END //Changes and Commented By Bhushan on 06-06-2016 :END
parentNodeList = detailDom.getElementsByTagName("Detail2"); parentNodeList = detailDom.getElementsByTagName("Detail2");
parentNodeListLength = parentNodeList.getLength(); parentNodeListLength = parentNodeList.getLength();
sql = "SELECT AMOUNT, AMT_ADJ, STATUS, EXCH_RATE FROM BANKTRAN_LOG WHERE TRAN_ID = ? ";// '"+tranId+"'"; sql = "SELECT AMOUNT, AMT_ADJ, STATUS, EXCH_RATE FROM BANKTRAN_LOG WHERE TRAN_ID = ? ";// '"+tranId+"'";
...@@ -378,27 +317,18 @@ conn = getConnection(); ...@@ -378,27 +317,18 @@ conn = getConnection();
if (childNodeName.equals("tran_id")) { if (childNodeName.equals("tran_id")) {
if (childNode.getFirstChild() != null) { if (childNode.getFirstChild() != null) {
tranId = childNode.getFirstChild().getNodeValue(); tranId = childNode.getFirstChild().getNodeValue();
System.out.println("childNodeName [" System.out.println("childNodeName ["+ childNodeName + "] NodeValue ["+ childNode.getFirstChild().getNodeValue()+ "]");
+ childNodeName + "] NodeValue ["
+ childNode.getFirstChild().getNodeValue()
+ "]");
} }
} else if (childNodeName.equals("tran_ser")) { } else if (childNodeName.equals("tran_ser")) {
if (childNode.getFirstChild() != null) { if (childNode.getFirstChild() != null) {
tranSer = childNode.getFirstChild().getNodeValue(); tranSer = childNode.getFirstChild().getNodeValue();
} }
System.out.println("childNodeName [" + childNodeName System.out.println("childNodeName [" + childNodeName+ "] NodeValue ["+ childNode.getFirstChild().getNodeValue() + "]");
+ "] NodeValue ["
+ childNode.getFirstChild().getNodeValue()
+ "]");
} else if (childNodeName.equals("tran_no")) { } else if (childNodeName.equals("tran_no")) {
if (childNode.getFirstChild() != null) { if (childNode.getFirstChild() != null) {
tranNo = childNode.getFirstChild().getNodeValue(); tranNo = childNode.getFirstChild().getNodeValue();
} }
System.out.println("childNodeName [" + childNodeName System.out.println("childNodeName [" + childNodeName+ "] NodeValue ["+ childNode.getFirstChild().getNodeValue() + "]");
+ "] NodeValue ["
+ childNode.getFirstChild().getNodeValue()
+ "]");
} }
} }
pstmt.setString(1, tranId); pstmt.setString(1, tranId);
...@@ -411,12 +341,10 @@ conn = getConnection(); ...@@ -411,12 +341,10 @@ conn = getConnection();
status = rs.getString(3); status = rs.getString(3);
exchRate = rs.getDouble(4); exchRate = rs.getDouble(4);
if (exchRate == 0) { if (exchRate == 0) {
xmlStr = getBanklogExchRate(tranSer, tranNo); xmlStr = getBanklogExchRate(tranSer, tranNo,conn);
dom1 = genericUtility.parseString(xmlStr); dom1 = genericUtility.parseString(xmlStr);
currCode = genericUtility.getColumnValue("curr_code", currCode = genericUtility.getColumnValue("curr_code",dom1);
dom1); exchRate1 = genericUtility.getColumnValue("exch_rate",dom1);
exchRate1 = genericUtility.getColumnValue("exch_rate",
dom1);
} }
if (!status.equals("R")) { if (!status.equals("R")) {
amount = amount - amtAdj; amount = amount - amtAdj;
...@@ -441,25 +369,21 @@ conn = getConnection(); ...@@ -441,25 +369,21 @@ conn = getConnection();
return ""; return "";
} }
if (errCode != null && errCode.trim().length() > 0) { if (errCode != null && errCode.trim().length() > 0) {
errString = itmDBAccessEJB.getErrorString("", errCode, "", "", errString = itmDBAccessEJB.getErrorString("", errCode, "", "", conn);
conn);
conn.close(); conn.close();
conn = null; conn = null;
return errString; return errString;
} }
errCode = updateTable(cnt, headerDom, detailDom, conn); errCode = updateTable(cnt, headerDom, detailDom, conn);
if (errCode != null || errCode.trim().length() > 0) { if (errCode != null || errCode.trim().length() > 0) {
errString = itmDBAccessEJB.getErrorString("", errCode, "", "", errString = itmDBAccessEJB.getErrorString("", errCode, "", "", conn);
conn);
System.out.println("errString becomes: " + errString); System.out.println("errString becomes: " + errString);
} else { } else {
errString = itmDBAccessEJB.getErrorString("", "VTRECOSUCC", "", errString = itmDBAccessEJB.getErrorString("", "VTRECOSUCC", "", "", conn);
"", conn);
} }
} catch (Exception e) { } catch (Exception e) {
System.out System.out.println("Exception :BankRecoEJB :process(String xmlString2, String xmlString2, String windowName, String xtraParams):"+ e.getMessage() + ":");
.println("Exception :BankRecoEJB :process(String xmlString2, String xmlString2, String windowName, String xtraParams):" e.printStackTrace();
+ e.getMessage() + ":");
throw new ITMException(e); throw new ITMException(e);
} finally { } finally {
try { try {
...@@ -472,11 +396,9 @@ conn = getConnection(); ...@@ -472,11 +396,9 @@ conn = getConnection();
return errString; return errString;
} }
private String updateTable(int cnt, Document headerDom, Document detailDom, private String updateTable(int cnt, Document headerDom, Document detailDom, Connection conn) throws RemoteException, ITMException {
Connection conn) throws RemoteException, ITMException {
Document dom1 = null; Document dom1 = null;
System.out.println("Counter :" + cnt + "\n detailDom :" + detailDom System.out.println("Counter :[" + cnt + "]\n detailDom :[" + detailDom + "]\n headerDom :[" + headerDom + "]");
+ "\n headerDom :" + headerDom);
String errCode = ""; String errCode = "";
String errString = ""; String errString = "";
String childNodeName = null; String childNodeName = null;
...@@ -503,9 +425,11 @@ conn = getConnection(); ...@@ -503,9 +425,11 @@ conn = getConnection();
ArrayList tranIdList = new ArrayList(); ArrayList tranIdList = new ArrayList();
ArrayList amountList = new ArrayList(); ArrayList amountList = new ArrayList();
ArrayList amtAdjList = new ArrayList(); ArrayList amtAdjList = new ArrayList();
// Connection conn = null; //commented by rajendra on 31/03/09
ResultSet rSet = null; ResultSet rSet = null;
Statement stmt = null; PreparedStatement pstmt = null;
PreparedStatement pstmt1 = null;
PreparedStatement pstmt2 = null;
PreparedStatement pstmt3 = null;
String keyStringQuery = ""; String keyStringQuery = "";
double amt = 0; double amt = 0;
int childNodeListLength = 0; int childNodeListLength = 0;
...@@ -531,19 +455,19 @@ conn = getConnection(); ...@@ -531,19 +455,19 @@ conn = getConnection();
Node childNode = null; Node childNode = null;
String xmlValues = ""; String xmlValues = "";
String effDate = ""; String effDate = "";
java.sql.Timestamp refDateTs = null, effDateTs = null; String tranSer1 = "";
String keyString = "";
// commented by rajendra on 31/03/09 String keyCol = "";
// ConnDriver connDriver = new ConnDriver(); String uniqueKey = null;
// GenericUtility genericUtility = GenericUtility.getInstance(); String insertSql = "";
String updateSql = "";
int insertCnt = 0;
int updateCnt = 0;
//java.sql.Timestamp refDateTs = null, effDateTs = null;
E12GenericUtility genericUtility = new E12GenericUtility(); E12GenericUtility genericUtility = new E12GenericUtility();
ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessEJB = new ITMDBAccessEJB();
try { try {
// conn = getConnection();
// commented by rajendra on 31/03/09
// conn = connDriver.getConnectDB("DriverITM");
// ended by rajendra on 31/03/09
/*--- Commented by Gulzar as the logic to process single and multiple record should same 15/11/06 /*--- Commented by Gulzar as the logic to process single and multiple record should same 15/11/06
if (cnt == 1) if (cnt == 1)
{ {
...@@ -653,9 +577,9 @@ conn = getConnection(); ...@@ -653,9 +577,9 @@ conn = getConnection();
else else
{*/// End Comment Gulzar 15/11/06 {*/// End Comment Gulzar 15/11/06
bankCode = genericUtility.getColumnValue("bank_code", headerDom); bankCode = genericUtility.getColumnValue("bank_code", headerDom);
effDate = genericUtility.getColumnValue("eff_date", headerDom); //effDate = genericUtility.getColumnValue("eff_date", headerDom);
refDate = genericUtility.getColumnValue("ref_date", headerDom); refDate = genericUtility.getColumnValue("ref_date", headerDom);
if (effDate != null) { /*if (effDate != null) {
effDateTs = Timestamp.valueOf(genericUtility effDateTs = Timestamp.valueOf(genericUtility
.getValidDateString(effDate, genericUtility .getValidDateString(effDate, genericUtility
.getApplDateFormat(), genericUtility .getApplDateFormat(), genericUtility
...@@ -668,41 +592,36 @@ conn = getConnection(); ...@@ -668,41 +592,36 @@ conn = getConnection();
.getApplDateFormat(), genericUtility .getApplDateFormat(), genericUtility
.getDBDateFormat()) .getDBDateFormat())
+ " 00:00:00.0"); + " 00:00:00.0");
} }*/
/** /**
* Amount getting seprated in Bank statement table, if selected all * Amount getting seprated in Bank statement table, if selected all
* in Bank Reco. process Abhijit Gaikwad 16/10/15 Start * in Bank Reco. process Abhijit Gaikwad 16/10/15 Start
*/ */
keyStringQuery = "SELECT KEY_STRING, TRAN_ID_COL, REF_SER FROM TRANSETUP WHERE UPPER(TRAN_WINDOW) = 'W_BANK_STATEMENT'"; keyStringQuery = "SELECT KEY_STRING, TRAN_ID_COL, REF_SER FROM TRANSETUP WHERE UPPER(TRAN_WINDOW) = 'W_BANK_STATEMENT'";
stmt = conn.createStatement(); //stmt = conn.createStatement();
rSet = stmt.executeQuery(keyStringQuery); pstmt = conn.prepareStatement(keyStringQuery);
String tranSer1 = ""; rSet = pstmt.executeQuery();
String keyString = "";
String keyCol = "";
String uniqueKey = null;
String insertSql = "";
String updateSql = "";
int insertCnt = 0;
int updateCnt = 0;
if (rSet.next()) { if (rSet.next()) {
keyString = rSet.getString(1); keyString = rSet.getString(1);
keyCol = rSet.getString(2); keyCol = rSet.getString(2);
tranSer1 = rSet.getString(3); tranSer1 = rSet.getString(3);
} else { } else {
errCode = "VTSEQ"; errCode = "VTSEQ";
return errCode; return errCode;
} }
pstmt.close();
pstmt = null;
parentNodeList = detailDom.getElementsByTagName("Detail2"); parentNodeList = detailDom.getElementsByTagName("Detail2");
parentNodeListLength = parentNodeList.getLength(); parentNodeListLength = parentNodeList.getLength();
System.out.println("parentNodeListLength:::::::::" System.out.println("parentNodeListLength:::::::::"+ parentNodeListLength);
+ parentNodeListLength); for (int selectedRow = 0; selectedRow < parentNodeListLength; selectedRow++)
for (int selectedRow = 0; selectedRow < parentNodeListLength; selectedRow++) { {
parentNode = parentNodeList.item(selectedRow); parentNode = parentNodeList.item(selectedRow);
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
System.out.println("childNodeListLength::: " System.out.println("childNodeListLength::: "+ childNodeListLength + "\n");
+ childNodeListLength + "\n"); for (int childRow = 0; childRow < childNodeListLength; childRow++)
for (int childRow = 0; childRow < childNodeListLength; childRow++) { {
childNode = childNodeList.item(childRow); childNode = childNodeList.item(childRow);
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
System.out.println("Child node" + childNodeName); System.out.println("Child node" + childNodeName);
...@@ -731,6 +650,8 @@ conn = getConnection(); ...@@ -731,6 +650,8 @@ conn = getConnection();
tranNo = childNode.getFirstChild().getNodeValue(); tranNo = childNode.getFirstChild().getNodeValue();
} else if (childNodeName.equals("ref_no")) { } else if (childNodeName.equals("ref_no")) {
refNo = childNode.getFirstChild().getNodeValue(); refNo = childNode.getFirstChild().getNodeValue();
if(refNo == null || refNo.trim().length() == 0 || "null".equals(refNo)) {
refNo = " "; }
} else if (childNodeName.equals("ref_date")) { } else if (childNodeName.equals("ref_date")) {
refDate = childNode.getFirstChild().getNodeValue(); refDate = childNode.getFirstChild().getNodeValue();
} else if (childNodeName.equals("ref_mode")) { } else if (childNodeName.equals("ref_mode")) {
...@@ -752,136 +673,147 @@ conn = getConnection(); ...@@ -752,136 +673,147 @@ conn = getConnection();
effDate = childNode.getFirstChild().getNodeValue(); effDate = childNode.getFirstChild().getNodeValue();
} }
//Pavan R on 03-may-18 end //Pavan R on 03-may-18 end
}// end inner for System.out.println("tranType["+tranType+"]tranDate["+tranDate+"]bankCode["+bankCode+"]siteCode["+siteCode+"]tranSer["+tranSer+"]" +
xmlValues = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>"; "tranNo["+tranNo+"]refNo["+refNo+"]refDate["+refMode+"]sundryCode["+sundryCode+"]acctCode["+acctCode+"]" +
xmlValues = xmlValues + "<Header></Header>"; "cctrCode["+cctrCode+"]remarks["+remarks+"]currCode["+currCode+"]exchRate["+exchRate+"]effDate["+effDate+"]");
xmlValues = xmlValues + "<Detail1>";
xmlValues = xmlValues + "</Detail1></Root>"; }//childNode loop end
System.out.println("xmlValues :[" + xmlValues + "]"); try
TransIDGenerator tg = new TransIDGenerator(xmlValues, "BASE", {
""); // end inner for
uniqueKey = tg.generateTranSeqID(tranSer1, keyCol, keyString, xmlValues = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
conn); xmlValues = xmlValues + "<Header></Header>";
System.out.println("uniqueKey :" + uniqueKey); xmlValues = xmlValues + "<Detail1>";
if (uniqueKey.equals("ERROR")) { xmlValues = xmlValues + "</Detail1></Root>";
errCode = "VTTRANID"; System.out.println("xmlValues :[" + xmlValues + "]");
return errCode; TransIDGenerator tg = new TransIDGenerator(xmlValues, "BASE","");
} uniqueKey = tg.generateTranSeqID(tranSer1, keyCol, keyString,conn);
System.out.println("uniqueKey Tran Id :[" + uniqueKey+"]");
status = "R"; if (uniqueKey.equals("ERROR")) {
exchRate = exchRate != null && exchRate.trim().length() > 0 ? exchRate errCode = "VTTRANID";
.trim() return errCode;
: "0"; }
amtAdj = amtAdj != null && amtAdj.trim().length() > 0 ? amtAdj
.trim() : "0"; status = "R";
exchRateD = Double.parseDouble(exchRate); exchRate = exchRate != null && exchRate.trim().length() > 0 ? exchRate.trim(): "0";
amtAdjD = Double.parseDouble(amtAdj); amtAdj = amtAdj != null && amtAdj.trim().length() > 0 ? amtAdj.trim() : "0";
if (exchRateD == 0) { exchRateD = Double.parseDouble(exchRate);
xmlStr = getBanklogExchRate(tranSer, tranNo); amtAdjD = Double.parseDouble(amtAdj);
dom1 = genericUtility.parseString(xmlStr); if (exchRateD == 0)
currCode = genericUtility.getColumnValue("curr_code", dom1); {
exchRate = genericUtility.getColumnValue("exch_rate", dom1); xmlStr = getBanklogExchRate(tranSer, tranNo, conn);
amtAdjBase = amtAdjD * exchRateD; dom1 = genericUtility.parseString(xmlStr);
} else { currCode = checkNull(genericUtility.getColumnValue("curr_code", dom1));
amtAdjBase = amtAdjD * exchRateD; exchRate = genericUtility.getColumnValue("exch_rate", dom1);
} amtAdjBase = amtAdjD * exchRateD;
// amtAdjBase = Double.parseDouble(amtAdj) * } else {
// Double.parseDouble(exchRate); amtAdjBase = amtAdjD * exchRateD;
// }//End of Else() //Gulzar : removed the if block }
// amtAdjBase = Double.parseDouble(amtAdj) *
/* insert data into the 'bank_statement' table */ // Double.parseDouble(exchRate);
currDate = new java.sql.Date(System.currentTimeMillis()); // }//End of Else() //Gulzar : removed the if block
//effDate = genericUtility.getColumnValue("eff_date", headerDom);
/* insert data into the 'bank_statement' table */
// int loop = amountList.size(); currDate = new java.sql.Date(System.currentTimeMillis());
if (remarks == null) { //effDate = genericUtility.getColumnValue("eff_date", headerDom);
remarks = " ";
} // int loop = amountList.size();
amt = Double.valueOf(amount); if (remarks == null) {
System.out.println("Amount@@@@@@@@@@@@" + amt); remarks = " ";
amt3 = Double.valueOf(amtAdj); }
System.out.println("Adj Amount@@@@@@@@@@@@" + amt3); amt = Double.valueOf(amount);
java.sql.Date effDate1 = java.sql.Date.valueOf(genericUtility System.out.println("Amount@@@@@@@@@@@@" + amt);
.getValidDateString(effDate, genericUtility amt3 = Double.valueOf(amtAdj);
.getApplDateFormat(), genericUtility System.out.println("Adj Amount@@@@@@@@@@@@" + amt3);
.getDBDateFormat())); java.sql.Date effDate1 = java.sql.Date.valueOf(genericUtility.getValidDateString(effDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()));
System.out.println("effDate1 :" + effDate1); System.out.println("effDate1 :" + effDate1);
System.out.println("refDate :" System.out.println("refDate :" + new java.sql.Date(System.currentTimeMillis()));
+ new java.sql.Date(System.currentTimeMillis())); // String refDate1 = refDate.substring(0,10);
// String refDate1 = refDate.substring(0,10); java.sql.Date refDate2 = java.sql.Date.valueOf(genericUtility.getValidDateString(refDate, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()));
java.sql.Date refDate2 = java.sql.Date.valueOf(genericUtility System.out.println("refDate2 :" + refDate2);
.getValidDateString(refDate, genericUtility insertSql = "INSERT INTO BANK_STATEMENT(TRAN_ID, BANK_CODE, SITE_CODE, REF_NO, REF_DATE,"
.getApplDateFormat(), genericUtility + " REF_MODE, AMOUNT, TRAN_TYPE, EDI_REF, REMARKS, STATUS, CHG_DATE, CHG_USER, CHG_TERM,"
.getDBDateFormat())); + " AMT_ADJ, EFF_DATE, AUTO_ENTRY, STATUS_DATE, EXCH_RATE, CURR_CODE , STAT_DATE)"
System.out.println("refDate2 :" + refDate2); + " VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
insertSql = "INSERT INTO BANK_STATEMENT(TRAN_ID, BANK_CODE, SITE_CODE, REF_NO, REF_DATE," pstmt1 = conn.prepareStatement(insertSql);
+ " REF_MODE, AMOUNT, TRAN_TYPE, EDI_REF, REMARKS, STATUS, CHG_DATE, CHG_USER, CHG_TERM,"
+ " AMT_ADJ, EFF_DATE, AUTO_ENTRY, STATUS_DATE, EXCH_RATE, CURR_CODE , STAT_DATE)"
+ " VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
PreparedStatement pstmt = conn.prepareStatement(insertSql);
pstmt.setString(1, uniqueKey);
pstmt.setString(2, bankCode);
pstmt.setString(3, siteCode);
pstmt.setString(4, refNo);
pstmt.setDate(5, refDate2);
pstmt.setString(6, refMode);
pstmt.setDouble(7, amt);
pstmt.setString(8, tranType);
pstmt.setString(9, " ");
pstmt.setString(10, remarks);
pstmt.setString(11, status);
pstmt.setDate(12, currDate);
pstmt.setString(13, "Base");
pstmt.setString(14, "Base");
pstmt.setDouble(15, amt3);
pstmt.setDate(16, effDate1);
pstmt.setString(17, "Y");
pstmt.setDate(18, currDate);
pstmt.setDouble(19, exchRateD);
pstmt.setString(20, currCode);
pstmt.setDate(21, effDate1);
insertCnt = pstmt.executeUpdate();
System.out.println("insertSql is :" + insertSql);
System.out.println("insertCnt :" + insertCnt);
System.out.println("counter :" + counter);
if (insertCnt != 0) {
insertSql = "insert into bankreco_trace(tran_id__stat, tran_id__log, amount) values (?, ?, ?)";
System.out.println("insertSql :" + insertSql);
System.out.println("tranIdList.get(intcnt).toString() :"
+ tranId);
PreparedStatement pstmt1 = conn.prepareStatement(insertSql);
pstmt1.setString(1, uniqueKey); pstmt1.setString(1, uniqueKey);
pstmt1.setString(2, tranId); pstmt1.setString(2, bankCode);
pstmt1.setDouble(3, amt); pstmt1.setString(3, siteCode);
insertCnt = pstmt1.executeUpdate(); pstmt1.setString(4, refNo);
pstmt1.close(); pstmt1.setDate(5, refDate2);
pstmt1 = null; pstmt1.setString(6, refMode);
pstmt1.setDouble(7, amt);
pstmt1.setString(8, tranType);
pstmt1.setString(9, " ");
pstmt1.setString(10, remarks);
pstmt1.setString(11, status);
pstmt1.setDate(12, currDate);
pstmt1.setString(13, "Base");
pstmt1.setString(14, "Base");
pstmt1.setDouble(15, amt3);
pstmt1.setDate(16, effDate1);
pstmt1.setString(17, "Y");
pstmt1.setDate(18, currDate);
pstmt1.setDouble(19, exchRateD);
pstmt1.setString(20, currCode);
pstmt1.setDate(21, effDate1);
insertCnt = pstmt1.executeUpdate();
System.out.println("insertCnt :" + insertCnt); System.out.println("insertCnt :" + insertCnt);
System.out.println("cnt :" + cnt); System.out.println("counter :" + counter);
updateSql = "UPDATE BANKTRAN_LOG SET STATUS = ?, AMT_ADJ = AMT_ADJ + ?, EXCH_RATE = ?, CURR_CODE = ?" if (insertCnt != 0)
+ " WHERE TRAN_ID = ?"; {
System.out.println("updateSql :" + updateSql); insertSql = "insert into bankreco_trace(tran_id__stat, tran_id__log, amount) values (?, ?, ?)";
PreparedStatement pstmt2 = conn.prepareStatement(updateSql); //System.out.println("insertSql :" + insertSql);
pstmt2.setString(1, status); System.out.println("tranIdList.get(intcnt).toString() :"+ tranId);
pstmt2.setDouble(2, amt);
pstmt2.setDouble(3, exchRateD); pstmt2 = conn.prepareStatement(insertSql);
pstmt2.setString(4, currCode); pstmt2.setString(1, uniqueKey);
pstmt2.setString(5, tranId); pstmt2.setString(2, tranId);
updateCnt = pstmt2.executeUpdate(); pstmt2.setDouble(3, amt);
System.out.println("updateCnt :" + updateCnt); insertCnt = pstmt2.executeUpdate();
pstmt2.close(); pstmt2.close();
pstmt2 = null; pstmt2 = null;
System.out.println("insertCnt :" + insertCnt);
conn.commit(); System.out.println("cnt :" + cnt);
// 12/05/09 manoharan changed the message updateSql = "UPDATE BANKTRAN_LOG SET STATUS = ?, AMT_ADJ = AMT_ADJ + ?, EXCH_RATE = ?, CURR_CODE = ?"
// errCode = "VMSUCC"; + " WHERE TRAN_ID = ?";
errCode = "VTPRC1"; System.out.println("updateSql :" + updateSql);
pstmt.close(); pstmt3 = conn.prepareStatement(updateSql);
pstmt = null; pstmt3.setString(1, status);
} else { pstmt3.setDouble(2, amt);
errCode = "VTPROCUS"; pstmt3.setDouble(3, exchRateD);
} pstmt3.setString(4, currCode);
pstmt3.setString(5, tranId);
updateCnt = pstmt3.executeUpdate();
System.out.println("updateCnt :" + updateCnt);
pstmt3.close();
pstmt3 = null;
conn.commit();
// 12/05/09 manoharan changed the message
// errCode = "VMSUCC";
errCode = "VTPRC1";
pstmt1.close();
pstmt1 = null;
} else {
errCode = "VTPROCUS";
}
}catch (SQLException d)
{
try
{
conn.rollback();
} catch (Exception e)
{
e.printStackTrace();
errString = e.getMessage();
throw new ITMException(e);
}
System.out.println("Exception : BankRecoPrc =>: updateTable"+ d.toString());
d.printStackTrace();
errString = d.getMessage();
throw new ITMException(d);
}
}// end outer for /** Abhijit Gaikwad 16/10/15 End }// end outer for /** Abhijit Gaikwad 16/10/15 End
/* /*
...@@ -1115,93 +1047,79 @@ conn = getConnection(); ...@@ -1115,93 +1047,79 @@ conn = getConnection();
return errCode; return errCode;
} }
private String getBanklogExchRate(String tranSer, String tranNo) private String getBanklogExchRate(String tranSer, String tranNo, Connection conn) throws RemoteException, ITMException {
throws RemoteException, ITMException {
System.out.println("TranSer :" + tranSer); System.out.println("TranSer :" + tranSer);
String currCode = ""; //String currCode = "";
StringBuffer valueXmlString = new StringBuffer( StringBuffer valueXmlString = new StringBuffer("<?xml version=\"1.0\"?>\r\n<Root>\r\n");
"<?xml version=\"1.0\"?>\r\n<Root>\r\n"); //double exchRate = 0;
double exchRate = 0; //Statement stmt = null;
Statement stmt = null; //Connection conn = null;
Connection conn = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
boolean isSql = false; boolean isSql = false;
ConnDriver connDriver = new ConnDriver(); //ConnDriver connDriver = new ConnDriver();
String sql = ""; String sql = "";
String tableName="";
try { try {
//Changes and Commented By Bhushan on 06-06-2016 :START //Changes and Commented By Bhushan on 06-06-2016 :START
//conn = connDriver.getConnectDB("DriverITM"); //conn = connDriver.getConnectDB("DriverITM");
conn = getConnection(); //conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END //Changes and Commented By Bhushan on 06-06-2016 :END
stmt = conn.createStatement(); //stmt = conn.createStatement();
sql = "SELECT CURR_CODE, EXCH_RATE FROM ";
if (tranSer.equals("E-PAY")) { if (tranSer.equals("E-PAY")) {
sql = "SELECT CURR_CODE, EXCH_RATE FROM PAYMENT_EXP WHERE TRAN_ID = '" tableName = " FROM PAYMENT_EXP ";
+ tranNo + "'";
isSql = true; isSql = true;
} else if (tranSer.equals("F-XFR")) { } else if (tranSer.equals("F-XFR")) {
sql = "SELECT CURR_CODE, EXCH_RATE FROM FUNDTRANSFER WHERE TRAN_ID = '" tableName = " FUNDTRANSFER ";
+ tranNo + "'";
isSql = true; isSql = true;
} else if (tranSer.equals("M-PAY")) { } else if (tranSer.equals("M-PAY")) {
sql = "SELECT CURR_CODE, EXCH_RATE FROM MISC_PAYMENT WHERE TRAN_ID = '" tableName = " MISC_PAYMENT ";
+ tranNo + "'";
isSql = true; isSql = true;
} else if (tranSer.equals("M-RCP")) { } else if (tranSer.equals("M-RCP")) {
sql = "SELECT CURR_CODE, EXCH_RATE FROM MISC_RECEIPT WHERE TRAN_ID = '" tableName = " MISC_RECEIPT ";
+ tranNo + "'";
isSql = true; isSql = true;
} else if (tranSer.equals("MPCANC")) { } else if (tranSer.equals("MPCANC")) {
sql = "SELECT CURR_CODE, EXCH_RATE FROM MISC_PAYMENT_CANC WHERE TRAN_ID = '" tableName = " MISC_PAYMENT_CANC ";
+ tranNo + "'";
isSql = true; isSql = true;
} else if (tranSer.equals("R-DIS")) { } else if (tranSer.equals("R-DIS")) {
sql = "SELECT CURR_CODE, EXCH_RATE FROM RCPDISHNR WHERE TRAN_ID = '" tableName = " RCPDISHNR ";
+ tranNo + "'";
isSql = true; isSql = true;
} else if (tranSer.equals("RCP")) { } else if (tranSer.equals("RCP")) {
sql = "SELECT CURR_CODE, EXCH_RATE FROM RECEIPT WHERE TRAN_ID = '" tableName = " RECEIPT ";
+ tranNo + "'";
isSql = true; isSql = true;
} else if (tranSer.equals("E-FUND")) { } else if (tranSer.equals("E-FUND")) {
sql = "SELECT CURR_CODE, EXCH_RATE FROM EXPORT_FUND WHERE TRAN_ID = '" tableName = " EXPORT_FUND ";
+ tranNo + "'";
isSql = true; isSql = true;
} }
sql = sql + tableName +" WHERE TRAN_ID = ? ";
System.out.println("SQL---getBanklogExchRate---["+sql+"]-------");
if (isSql) { if (isSql) {
rs = stmt.executeQuery(sql); pstmt= conn.prepareStatement(sql);
pstmt.setString(1, tranNo);
rs = pstmt.executeQuery();
if (rs.next()) { if (rs.next()) {
valueXmlString.append("<Detail>\r\n"); valueXmlString.append("<Detail>\r\n");
valueXmlString.append("<curr_code>") valueXmlString.append("<curr_code>").append(rs.getString(1)).append("</curr_code>\r\n");
.append(rs.getString(1)).append("</curr_code>\r\n"); valueXmlString.append("<exch_rate>").append(rs.getString(2)).append("</exch_rate>\r\n");
valueXmlString.append("<exch_rate>")
.append(rs.getString(2)).append("</exch_rate>\r\n");
valueXmlString.append("</Detail>\r\n"); valueXmlString.append("</Detail>\r\n");
} }
} }
stmt.close(); pstmt.close();
pstmt = null;
valueXmlString.append("</Root>\r\n"); valueXmlString.append("</Root>\r\n");
} catch (Exception e) { } catch (Exception e) {
System.out System.out.println("Exception :ITMDBAccessEJB :getBanklogExchRate(String xmlString, String xmlString2):"+ e.getMessage() + ":");
.println("Exception :ITMDBAccessEJB :getBanklogExchRate(String xmlString, String xmlString2):"
+ e.getMessage() + ":");
throw new ITMException(e); throw new ITMException(e);
} finally {
try {
System.out.println("Closing Connection.......");
conn.close();
conn = null;
} catch (Exception se) {
}
} }
System.out.println("valueXmlString.toString() :" System.out.println("valueXmlString---getBanklogExchRate---:["+ valueXmlString.toString()+"]");
+ valueXmlString.toString());
return valueXmlString.toString(); return valueXmlString.toString();
} }
private String checkNull(String input) private String checkNull(String input)
{ {
if (input == null || "null".equals(input)) if (input == null || "null".equals(input))
{ {
input = ""; input = " ";
} }
return input; return input;
} }
......
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