Commit de5623ec authored by msalla's avatar msalla

Unconfirmed PDC unable to edit

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@208877 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 988d2454
...@@ -159,7 +159,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -159,7 +159,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
ConnDriver connDriver = new ConnDriver(); ConnDriver connDriver = new ConnDriver();
StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>"); StringBuffer errStringXml = new StringBuffer("<?xml version = \"1.0\"?> \r\n <Root> <Errors>");
String effBankStr = "", rcpacctAmt = "", tranDateStr = null; String effBankStr = "", rcpacctAmt = "", tranDateStr = null;
String refType = "", guid = "", custbankref = null, tranid, tranidhdr, exchrate, amtStr; String refType = "", guid = "", custbankref = null, tranid, tranidhdr, exchrate, amtStr,rcpNo=null,rfDateS;
String amountbc; String amountbc;
double advAmtd,confAmt = 0; double advAmtd,confAmt = 0;
double rcpacctAmtdbl = 0, osamt = 0,amtbc,exrate; double rcpacctAmtdbl = 0, osamt = 0,amtbc,exrate;
...@@ -172,7 +172,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -172,7 +172,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
conn = getConnection(); conn = getConnection();
connDriver = null; connDriver = null;
userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams,"loginCode");
System.out.println("user ID form XtraParam : "+userId); //System.out.println("user ID form XtraParam : "+userId);
loginSiteDescr = (genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode")); loginSiteDescr = (genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginSiteCode"));
if(objContext != null && objContext.trim().length()>0) if(objContext != null && objContext.trim().length()>0)
...@@ -200,7 +200,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -200,7 +200,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
tranDate = Timestamp.valueOf(genericUtility.getValidDateString(tranDateS, tranDate = Timestamp.valueOf(genericUtility.getValidDateString(tranDateS,
genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("trandate is :"+tranDate); // System.out.println("trandate is :"+tranDate);
if (tranDate == null) if (tranDate == null)
{ {
errCode = "VMTRANDT"; errCode = "VMTRANDT";
...@@ -213,7 +213,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -213,7 +213,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
{ {
bankCodedep = this.genericUtility.getColumnValue("bank_code__dep", dom); bankCodedep = this.genericUtility.getColumnValue("bank_code__dep", dom);
siteCode = this.genericUtility.getColumnValue("site_code", dom); siteCode = this.genericUtility.getColumnValue("site_code", dom);
System.out.println("bank cpde:"+bankCodedep+" site code is: "+siteCode); //System.out.println("bank cpde:"+bankCodedep+" site code is: "+siteCode);
if (bankCodedep != null && bankCodedep.trim().length() > 0) if (bankCodedep != null && bankCodedep.trim().length() > 0)
{ {
//errCode = isBankCode(bankCodedep, siteCode, "FIN"); // done //errCode = isBankCode(bankCodedep, siteCode, "FIN"); // done
...@@ -231,7 +231,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -231,7 +231,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
{ {
sundryType = this.genericUtility.getColumnValue("sundry_type", dom); sundryType = this.genericUtility.getColumnValue("sundry_type", dom);
System.out.println("sundry type:"+sundryType); //System.out.println("sundry type:"+sundryType);
if (sundryType == null && sundryType.trim().length() == 0) if (sundryType == null && sundryType.trim().length() == 0)
{ {
errCode = "VTSUNTYPE"; errCode = "VTSUNTYPE";
...@@ -259,15 +259,17 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -259,15 +259,17 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
else if(childNodeName.equalsIgnoreCase("ref_no")) else if(childNodeName.equalsIgnoreCase("ref_no"))
{ {
System.out.println("this id ref no block"); //System.out.println("this id ref no block");
refNo = this.genericUtility.getColumnValue("ref_no", dom); refNo = this.genericUtility.getColumnValue("ref_no", dom);
refSer = this.genericUtility.getColumnValue("ref_ser", dom); refSer = this.genericUtility.getColumnValue("ref_ser", dom);
custCode=this.genericUtility.getColumnValue("sundry_code", dom);
tranDateS = this.genericUtility.getColumnValue("tran_date", dom); tranDateS = this.genericUtility.getColumnValue("tran_date", dom);
tranid = this.genericUtility.getColumnValue("tran_id", dom); tranid = this.genericUtility.getColumnValue("tran_id", dom);
tranDate = Timestamp.valueOf(genericUtility.getValidDateString(tranDateS, tranDate = Timestamp.valueOf(genericUtility.getValidDateString(tranDateS,
genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
amount = this.genericUtility.getColumnValue("amount", dom); amount = this.genericUtility.getColumnValue("amount", dom);
System.out.println("ref no:"+refNo); //System.out.println("ref no:"+refNo);
if(amount!= null && amount.trim().length()>0) if(amount!= null && amount.trim().length()>0)
{ {
...@@ -280,9 +282,9 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -280,9 +282,9 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
// for ref no duplicate value check-- // for ref no duplicate value check--
if(refNo!= null && refNo.trim().length() > 0) if(refNo!= null && refNo.trim().length() > 0)
{ { //COMMENETD BY MONIKA 03-10-2019 TO CHECK REF NO
//System.out.println("enter ref no is 1"+refNo); //System.out.println("enter ref no is 1"+refNo);
sql = "select count(*) from pdc_received where ref_no=? and status not in ('X','P')"; /*sql = "select count(*) from pdc_received where ref_no=? and status not in ('X','P')";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,refNo); pstmt.setString(1,refNo);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
...@@ -298,17 +300,39 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -298,17 +300,39 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
System.out.println("@V@ pdc_received no count:- [" + cnt + "]"); System.out.println("@V@ pdc_received no count:- [" + cnt + "]");
if(cnt > 0 && tranid != null && tranid.trim().length() > 0) if(cnt > 0 && tranid != null && tranid.trim().length() > 0)
{*///commented by monika
//Added by monika 3 oct 2019 TO CHECK DUPLICATE REF_NO REF NO
//sql = "select tran_id from receipt where ref_no=? and confirmed='Y'";
if(tranid != null && tranid.trim().length() > 0)
{
sql = "select tran_id from receipt where cust_code=? and ref_no=? and confirmed='Y'";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode);
pstmt.setString(2, refNo);
rs = pstmt.executeQuery();
if(rs.next())
{ {
System.out.println("enter ref no is 1"+refNo); tranIdRcp=checkNull(rs.getString("tran_id"));
}
rs.close();
rs = null;
pstmt.close();
pstmt = null;
// System.out.println("@V@ Tran id receipt :- ["+tranIdRcp+"]");
// System.out.println("enter ref no is 1"+refNo);
sql = "select count(*) from rcpdishnr where receipt_no=? and tran_ser='R'"; sql = "select count(*) from rcpdishnr where receipt_no=? and tran_ser='R'";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranid); // pstmt.setString(1, tranid);
pstmt.setString(1, tranIdRcp);//end
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
} }
System.out.println("@V@ pdc_received no count11:- [" + cnt + "]"); // System.out.println("@V@ pdc_received no count11:- [" + cnt + "]");
rs.close(); rs.close();
rs = null; rs = null;
...@@ -321,40 +345,51 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -321,40 +345,51 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
/*sql = "select count(*) from receipt where ref_no=? and tran_id <> ?";
sql = "select count(*) from receipt where ref_no=? and tran_id <> ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, refNo); pstmt.setString(1, refNo);
pstmt.setString(2, tranid); // pstmt.setString(2, tranid);
pstmt.setString(2, tranIdRcp);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if(rs.next()) if(rs.next())
{ {
cnt = rs.getInt(1); cnt = rs.getInt(1);
} }
System.out.println("@V@ pdc_received no count22:- [" + cnt + "]"); System.out.println("@V@ pdc_received no count22:- [" + cnt + "]")
*/
sql = "select count(*) from pdc_received where ref_no=? and tran_id <> ? and status not in ('X','P')" ;
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,refNo);
pstmt.setString(2,tranid);
rs = pstmt.executeQuery();
if (rs.next())
{
cnt = rs.getInt(1);
}
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
// System.out.println("@V@ pdc_received no count22:- [" + cnt + "]");
if(cnt > 0) if(cnt > 0)
{ {
System.out.println("@V@ received:- [" + cnt + "]"); //System.out.println("@V@ received:- [" + cnt + "]");
errCode = "VTPDCREC"; errCode = "VTPDCREC";
errList.add(errCode); errList.add(errCode);
errFields.add(childNodeName.toLowerCase()); errFields.add(childNodeName.toLowerCase());
} }
}//closing of tran_id if condition
}//closing is ref_no condition
} }
}
}
else if(childNodeName.equalsIgnoreCase("curr_code")) else if(childNodeName.equalsIgnoreCase("curr_code"))
{ {
currCode = this.genericUtility.getColumnValue("curr_code",dom); currCode = this.genericUtility.getColumnValue("curr_code",dom);
System.out.println("currCide is:::"+currCode); //System.out.println("currCide is:::"+currCode);
if (currCode != null && currCode.trim().length() > 0) if (currCode != null && currCode.trim().length() > 0)
{ {
sql = "select count(*) from currency where curr_code =?"; sql = "select count(*) from currency where curr_code =?";
...@@ -376,7 +411,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -376,7 +411,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("currcode..."+currCode); //System.out.println("currcode..."+currCode);
} }
else else
{ {
...@@ -604,7 +639,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -604,7 +639,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
valueXmlString.append("</Detail1>"); valueXmlString.append("</Detail1>");
} }
// close tag // close tag
System.out.println(" itemchanged case 1 valueXmlString : "+valueXmlString); // System.out.println(" itemchanged case 1 valueXmlString : "+valueXmlString);
break; break;
case 2 : case 2 :
...@@ -646,20 +681,20 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -646,20 +681,20 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
else if(childNodeName.equalsIgnoreCase("ref_no")) else if(childNodeName.equalsIgnoreCase("ref_no"))
{ {
System.out.println("welcomne refno"); //System.out.println("welcomne refno");
refNo = this.genericUtility.getColumnValue("ref_no", dom); refNo = this.genericUtility.getColumnValue("ref_no", dom);
refSer = this.genericUtility.getColumnValue("ref_ser", dom); refSer = this.genericUtility.getColumnValue("ref_ser", dom);
tranDateS = this.genericUtility.getColumnValue("tran_date", dom1); tranDateS = this.genericUtility.getColumnValue("tran_date", dom1);
System.out.println("trandate id 11:;:"+tranDateS); //System.out.println("trandate id 11:;:"+tranDateS);
tranid = this.genericUtility.getColumnValue("tran_id", dom1); tranid = this.genericUtility.getColumnValue("tran_id", dom1);
tranDate = Timestamp.valueOf(genericUtility.getValidDateString(tranDateS, tranDate = Timestamp.valueOf(genericUtility.getValidDateString(tranDateS,
genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0"); genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("trandate id :;:"+tranDate); //System.out.println("trandate id :;:"+tranDate);
amount = this.genericUtility.getColumnValue("amount", dom); amount = this.genericUtility.getColumnValue("amount", dom);
System.out.println("hello amount"+amount); //System.out.println("hello amount"+amount);
if(amount!= null && amount.trim().length()>0) if(amount!= null && amount.trim().length()>0)
{ {
...@@ -670,7 +705,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -670,7 +705,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
amt=0; amt=0;
} }
System.out.println("amount is==="+amt); //System.out.println("amount is==="+amt);
sql = "select count(*), sum(tot_Amt - adj_amt) from receivables where tran_ser = ? and ref_no = ?"; sql = "select count(*), sum(tot_Amt - adj_amt) from receivables where tran_ser = ? and ref_no = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -688,7 +723,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -688,7 +723,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("totamt::"+osamt); // System.out.println("totamt::"+osamt);
if(cnt == 0) if(cnt == 0)
{ {
...@@ -717,7 +752,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -717,7 +752,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
{ {
confAmt=0; confAmt=0;
} }
System.out.println("confamount:::"+confAmt); //System.out.println("confamount:::"+confAmt);
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
...@@ -746,7 +781,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -746,7 +781,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
else if (childNodeName.trim().equalsIgnoreCase("exch_rate")) else if (childNodeName.trim().equalsIgnoreCase("exch_rate"))
{ {
exchrate = this.genericUtility.getColumnValue("exch_rate", dom); exchrate = this.genericUtility.getColumnValue("exch_rate", dom);
System.out.println("ex rate::"+exchrate); //System.out.println("ex rate::"+exchrate);
if (exchrate == null) if (exchrate == null)
{ {
errCode = "VTINVEXR"; errCode = "VTINVEXR";
...@@ -758,7 +793,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -758,7 +793,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
else if(childNodeName.equalsIgnoreCase("amount")) else if(childNodeName.equalsIgnoreCase("amount"))
{ {
amount = this.genericUtility.getColumnValue("amount", dom); amount = this.genericUtility.getColumnValue("amount", dom);
System.out.println("amount 111:"+amount); //System.out.println("amount 111:"+amount);
if(amount != null && amount.trim().length()>0) if(amount != null && amount.trim().length()>0)
{ {
...@@ -769,7 +804,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -769,7 +804,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
amt=0; amt=0;
} }
System.out.println("amount 112:"+amt); //System.out.println("amount 112:"+amt);
refNo = this.genericUtility.getColumnValue("ref_no", dom); refNo = this.genericUtility.getColumnValue("ref_no", dom);
htranId = this.genericUtility.getColumnValue("tran_id", dom1); htranId = this.genericUtility.getColumnValue("tran_id", dom1);
...@@ -786,7 +821,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -786,7 +821,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
cnt = rs.getInt(1); cnt = rs.getInt(1);
osamt = rs.getDouble(2); osamt = rs.getDouble(2);
} }
System.out.println("amount in detail 2:"+osamt); //System.out.println("amount in detail 2:"+osamt);
rs.close(); rs.close();
rs = null; rs = null;
pstmt.close(); pstmt.close();
...@@ -867,7 +902,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -867,7 +902,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
amountbc =this.genericUtility.getColumnValue("amount__bc", dom); amountbc =this.genericUtility.getColumnValue("amount__bc", dom);
refSer = this.genericUtility.getColumnValue("ref_ser", dom); refSer = this.genericUtility.getColumnValue("ref_ser", dom);
refNo = this.genericUtility.getColumnValue("ref_no", dom); refNo = this.genericUtility.getColumnValue("ref_no", dom);
System.out.println("amount is:::"+amountbc); //System.out.println("amount is:::"+amountbc);
sql = "select count(*),sum(tot_Amt - adj_amt) from receivables where tran_ser = ? and ref_no = ?"; sql = "select count(*),sum(tot_Amt - adj_amt) from receivables where tran_ser = ? and ref_no = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -892,7 +927,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -892,7 +927,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
{ {
amtbc=0; amtbc=0;
} }
System.out.println("amount is 222:::"+amountbc); //System.out.println("amount is 222:::"+amountbc);
if (amtbc < 0 && osamt > 0) if (amtbc < 0 && osamt > 0)
{ {
errCode = "VMAMT"; errCode = "VMAMT";
...@@ -914,23 +949,23 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -914,23 +949,23 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
errListSize = errList.size(); errListSize = errList.size();
cnt = 0; cnt = 0;
String errFldName = null; String errFldName = null;
System.out.println("errListSize [" + errListSize + "] errFields size [" + errFields.size() + "]"); //System.out.println("errListSize [" + errListSize + "] errFields size [" + errFields.size() + "]");
if ((errList != null) && (errListSize > 0)) if ((errList != null) && (errListSize > 0))
{ {
for (cnt = 0; cnt < errListSize; cnt++) for (cnt = 0; cnt < errListSize; cnt++)
{ {
errCode = (String)errList.get(cnt); errCode = (String)errList.get(cnt);
System.out.println("errCode :"+errCode); //System.out.println("errCode :"+errCode);
int pos = errCode.indexOf("~"); int pos = errCode.indexOf("~");
System.out.println("pos :"+pos); //System.out.println("pos :"+pos);
if(pos>-1) if(pos>-1)
{ {
errCode=errCode.substring(0,pos); errCode=errCode.substring(0,pos);
} }
System.out.println("error code is :"+errCode); //System.out.println("error code is :"+errCode);
errFldName = (String)errFields.get(cnt); errFldName = (String)errFields.get(cnt);
System.out.println(" cnt [" + cnt + "] errCode [" + errCode + "] errFldName [" + errFldName + "]"); // System.out.println(" cnt [" + cnt + "] errCode [" + errCode + "] errFldName [" + errFldName + "]");
errString = getErrorString(errFldName, errCode, userId); errString = getErrorString(errFldName, errCode, userId);
errorType = errorType(conn, errCode); errorType = errorType(conn, errCode);
if (errString.length() > 0) if (errString.length() > 0)
...@@ -960,7 +995,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -960,7 +995,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
catch(Exception e) catch(Exception e)
{ {
e.printStackTrace(); e.printStackTrace();
System.out.println("Exception ::"+ e.getMessage()); //System.out.println("Exception ::"+ e.getMessage());
throw new ITMException(e); throw new ITMException(e);
} }
finally finally
...@@ -990,8 +1025,8 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -990,8 +1025,8 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
} }
}// end of finally statement }// end of finally statement
return errStringXml.toString(); return errStringXml.toString();
} }
public String itemChanged(String xmlString, String xmlString1, String objContext, public String itemChanged(String xmlString, String xmlString1, String objContext,
String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException { String currentColumn, String editFlag, String xtraParams) throws RemoteException, ITMException {
String errString = ""; String errString = "";
Document dom = null; Document dom = null;
...@@ -999,7 +1034,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -999,7 +1034,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
Document domAll = null; Document domAll = null;
String retString = ""; String retString = "";
try { try {
System.out.println("************** Inside itemChanged method ****************"); //System.out.println("************** Inside itemChanged method ****************");
if (xmlString != null && xmlString.trim().length() > 0) { if (xmlString != null && xmlString.trim().length() > 0) {
dom = genericUtility.parseString(xmlString); dom = genericUtility.parseString(xmlString);
} }
...@@ -1008,17 +1043,17 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -1008,17 +1043,17 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
} }
retString = itemChanged(dom, domhr, objContext, currentColumn, editFlag, xtraParams); retString = itemChanged(dom, domhr, objContext, currentColumn, editFlag, xtraParams);
System.out.println("retString::::::::::" + retString); // System.out.println("retString::::::::::" + retString);
} catch (Exception e) { } catch (Exception e) {
System.out.println(":::" + getClass().getSimpleName() + "::" + e.getMessage()); //System.out.println(":::" + getClass().getSimpleName() + "::" + e.getMessage());
e.getMessage(); e.getMessage();
} }
return retString; return retString;
} }
public String itemChanged(Document dom, Document dom1, String objContext, String currentColumn, public String itemChanged(Document dom, Document dom1, String objContext, String currentColumn,
String editFlag, String xtraParams) throws RemoteException, ITMException String editFlag, String xtraParams) throws RemoteException, ITMException
{ {
Connection conn = null; Connection conn = null;
// Added by sarita on 01/06/2017 // Added by sarita on 01/06/2017
ConnDriver connDriver = null; ConnDriver connDriver = null;
...@@ -1089,7 +1124,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -1089,7 +1124,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
childNodeList = parentNode.getChildNodes(); childNodeList = parentNode.getChildNodes();
valueXmlString.append("<Detail1>"); valueXmlString.append("<Detail1>");
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
System.out.println("first receipt mode ------>"+genericUtility.getColumnValue("rcp_mode", dom)); // System.out.println("first receipt mode ------>"+genericUtility.getColumnValue("rcp_mode", dom));
do do
{ {
childNode = childNodeList.item(ctr); childNode = childNodeList.item(ctr);
...@@ -1171,7 +1206,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -1171,7 +1206,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("site_code::::"+descr1+" finentity:::"+finent+"bancode:::"+bankcode); //System.out.println("site_code::::"+descr1+" finentity:::"+finent+"bancode:::"+bankcode);
valueXmlString.append("<site_descr>").append("<![CDATA[" + descr1 + "]]>").append("</site_descr>"); valueXmlString.append("<site_descr>").append("<![CDATA[" + descr1 + "]]>").append("</site_descr>");
...@@ -1204,12 +1239,12 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -1204,12 +1239,12 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
System.out.println("curr_code11::::"+mcurr); //System.out.println("curr_code11::::"+mcurr);
valueXmlString.append("<bank_code__dep>").append("<![CDATA[" + bankcode + "]]>").append("</bank_code__dep>"); valueXmlString.append("<bank_code__dep>").append("<![CDATA[" + bankcode + "]]>").append("</bank_code__dep>");
valueXmlString.append("<bank_name>").append("<![CDATA[" + bankdescr + "]]>").append("</bank_name>"); valueXmlString.append("<bank_name>").append("<![CDATA[" + bankdescr + "]]>").append("</bank_name>");
valueXmlString.append("<curr_code>").append("<![CDATA[" + mcurr + "]]>").append("</curr_code>"); valueXmlString.append("<curr_code>").append("<![CDATA[" + mcurr + "]]>").append("</curr_code>");
System.out.println("currency..."+mcurr); //System.out.println("currency..."+mcurr);
} }
...@@ -1449,7 +1484,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -1449,7 +1484,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
valueXmlString.append("<acct_code__adv>").append("<![CDATA[" + acctCodeAdv + "]]>").append("</acct_code__adv>"); valueXmlString.append("<acct_code__adv>").append("<![CDATA[" + acctCodeAdv + "]]>").append("</acct_code__adv>");
valueXmlString.append("<cctr_code__adv>").append("<![CDATA[" + cctrCodeAdv + "]]>").append("</cctr_code__adv>"); valueXmlString.append("<cctr_code__adv>").append("<![CDATA[" + cctrCodeAdv + "]]>").append("</cctr_code__adv>");
System.out.println("currency code2---"+currCode); // System.out.println("currency code2---"+currCode);
if ((loginSite == null || loginSite.trim().length() == 0) && sitecode.trim().length() > 0) if ((loginSite == null || loginSite.trim().length() == 0) && sitecode.trim().length() > 0)
{ {
valueXmlString.append("<site_code>").append("<![CDATA[" + sitecode + "]]>").append("</site_code>"); valueXmlString.append("<site_code>").append("<![CDATA[" + sitecode + "]]>").append("</site_code>");
...@@ -1531,7 +1566,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -1531,7 +1566,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
childNode = childNodeList.item(ctr); childNode = childNodeList.item(ctr);
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
childNodeListLength = childNodeList.getLength(); childNodeListLength = childNodeList.getLength();
System.out.println("currentColumn-------->>[" + currentColumn + "]"); //System.out.println("currentColumn-------->>[" + currentColumn + "]");
valueXmlString.append("<Detail2>"); valueXmlString.append("<Detail2>");
if ("itm_default".equalsIgnoreCase(currentColumn.trim())) if ("itm_default".equalsIgnoreCase(currentColumn.trim()))
{ {
...@@ -1597,7 +1632,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -1597,7 +1632,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
sql = "select descr from currency where curr_code = ?"; sql = "select descr from currency where curr_code = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, currCode); pstmt.setString(1, currCode);
System.out.println("test2 currncy"+currCode); // System.out.println("test2 currncy"+currCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if (rs.next())
{ {
...@@ -1607,13 +1642,13 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -1607,13 +1642,13 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
rs = null; rs = null;
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
/* Changed by -monika-8 aug-2019 /* Changed by -monika-8 aug-2019
if(adjAmt == 0) if(adjAmt == 0)
{ {
amt= totAmt - adjAmt; amt= totAmt - adjAmt;
adjAmtBc = amt* exrate; adjAmtBc = amt* exrate;
} }
*/ */
amt= totAmt - adjAmt; amt= totAmt - adjAmt;
adjAmtBc = amt* exrate; adjAmtBc = amt* exrate;
valueXmlString.append("<curr_code>").append("<![CDATA[" + currCode + "]]>").append("</curr_code>"); valueXmlString.append("<curr_code>").append("<![CDATA[" + currCode + "]]>").append("</curr_code>");
...@@ -1651,7 +1686,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -1651,7 +1686,7 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
exrate=0; exrate=0;
} }
amtBc= amt * exrate; amtBc= amt * exrate;
System.out.println("adjamt::"+amtBc); //System.out.println("adjamt::"+amtBc);
valueXmlString.append("<amount__bc>").append("<![CDATA[" +amtBc + "]]>").append("</amount__bc>"); valueXmlString.append("<amount__bc>").append("<![CDATA[" +amtBc + "]]>").append("</amount__bc>");
} }
valueXmlString.append("</Detail2>"); valueXmlString.append("</Detail2>");
...@@ -1687,9 +1722,9 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -1687,9 +1722,9 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
} }
} }
return valueXmlString.toString(); return valueXmlString.toString();
} }
private String errorType(Connection conn, String errorCode) throws ITMException { private String errorType(Connection conn, String errorCode) throws ITMException {
String msgType = ""; String msgType = "";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;
...@@ -1727,13 +1762,13 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd ...@@ -1727,13 +1762,13 @@ public class PdcReceivedIC extends ValidatorEJB implements PdcReceivedRemote, Pd
} }
} }
return msgType; return msgType;
} }
private double checkDouble(String input) { private double checkDouble(String input) {
if (input == null || input.trim().length() == 0) { if (input == null || input.trim().length() == 0) {
return 0; return 0;
} else { } else {
return Double.parseDouble(input); return Double.parseDouble(input);
} }
} }
} }
\ No newline at end of file
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