Commit a3615d9e authored by vkadam's avatar vkadam

Add some missing variables for validation.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@36842 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 6e52a759
/********************************************************
Title : MiscPaySubAct[F14FSUN003]
Date : 17/SEP/14
Developer: Sagar M.
********************************************************/
package ibase.webitm.ejb.fin.adv; package ibase.webitm.ejb.fin.adv;
import ibase.system.config.ConnDriver; import ibase.webitm.utility.*;
import ibase.webitm.ejb.ActionHandlerEJB; import ibase.webitm.ejb.*;
import ibase.system.config.*;
import ibase.webitm.utility.ITMException;
import ibase.webitm.ejb.ITMDBAccessEJB; import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.fin.FinCommon; import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
import java.io.PrintStream;
import java.rmi.RemoteException; import java.rmi.RemoteException;
import java.sql.Connection; import java.sql.*;
import java.sql.PreparedStatement; import java.text.SimpleDateFormat;
import java.sql.ResultSet; import java.util.*;
import java.sql.Timestamp;
import java.util.ArrayList;
import javax.ejb.Stateless; import javax.ejb.Stateless;
@Stateless @Stateless
public class MiscPaySubAct extends ActionHandlerEJB
implements MiscPaySubActLocal, MiscPaySubActRemote public class MiscPaySubAct extends ActionHandlerEJB implements MiscPaySubActLocal, MiscPaySubActRemote
{ {
String userId = ""; String termId = ""; /**
* The public method is used for update the Workflow status
* @param tranId
* @param xtraParams contais additional information such as loginEmpCode,loginCode,chgTerm etc
* @param forcedFlag (true or false)
*/
String userId = "", termId = "";
GenericUtility genericUtility = GenericUtility.getInstance(); GenericUtility genericUtility = GenericUtility.getInstance();
public String actionHandler(String tranId, String xtraParams, String forcedFlag) @Override
throws RemoteException, ITMException public String actionHandler(String tranId, String xtraParams, String forcedFlag) throws RemoteException, ITMException
{ {
System.out.println("---ActionHandler---@@@@@@@@xtraParams[" + xtraParams + "]@@@@@@forcedFlag[" + forcedFlag + "]"); System.out.println("---ActionHandler---@@@@@@@@xtraParams["+xtraParams+"]@@@@@@forcedFlag["+forcedFlag+"]");
Connection conn = null; Connection conn = null;
PreparedStatement pstmt = null; PreparedStatement pstmt1 = null; PreparedStatement pstmt2 = null; PreparedStatement pstmt = null, pstmt1 = null, pstmt2 = null;
ResultSet rs = null; ResultSet rs1 = null; ResultSet rs2 = null; ResultSet rs = null, rs1 = null, rs2 = null;
String retString = ""; String retString = "";
String sql = ""; String sql1 = ""; String sql2 = ""; String sql = ""; String sql1 = ""; String sql2 = "";
String confStatus = ""; String wfStatus = ""; String sundryType = ""; String sundryCode = ""; String payMode = ""; String supPayMod = ""; String bankCode = ""; String chqNo = ""; String confStatus="",wfStatus="",sundryCode = "", payMode = "", supPayMod = "", bankCode = "", chqNo = "",sundryType="";
int cnt = 0; int cnt1 = 0; /*String currAppdate ="";
String tranIdTest="",todayStr="";*/
Timestamp datesubmit = null; java.sql.Timestamp datesubmit=null;
//added by vishakha on 03/Aug/2015 for validations on Submit button.
double totAmt = 0.0,totAmtMiscPay = 0.0,adjAmtMiscPay = 0.0,payAmt = 0.0;
int cnt = 0, cnt1 = 0;
double totAmt = 0.0D; double totAmtMiscPay = 0.0D; double adjAmtMiscPay = 0.0D; double payAmt = 0.0D; ArrayList<String> stnCdList = new ArrayList<String>();
ArrayList stnCdList = new ArrayList(); boolean stanCdBlank = false, stanCdDupl = false, stanCodeInv = false;
boolean stanCdBlank = false; boolean stanCdDupl = false; boolean stanCodeInv = false;
// String ignorechklimit ="",tranKeyFld = "",bankCode = "",siteCode = "",payType = "";
Timestamp tranDate = null; Timestamp tranDate = null;
String refNo = ""; String tranSer = ""; String refNo = "",tranSer = "";
FinCommon fin = new FinCommon(); FinCommon fin = new FinCommon();
try try
{ {
...@@ -54,24 +66,24 @@ public class MiscPaySubAct extends ActionHandlerEJB ...@@ -54,24 +66,24 @@ public class MiscPaySubAct extends ActionHandlerEJB
connDriver = null; connDriver = null;
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB(); ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
this.userId = this.genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "loginCode");
this.termId = this.genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId"); termId = genericUtility.getValueFromXTRA_PARAMS(xtraParams, "termId");
if ((this.userId == null) || (this.userId.trim().length() == 0)) if (userId == null || userId.trim().length() == 0)
{ {
this.userId = "SYSTEM"; userId = "SYSTEM";
} }
if ((this.termId == null) || (this.termId.trim().length() == 0)) if (termId == null || termId.trim().length() == 0)
{ {
this.termId = "SYSTEM"; termId = "SYSTEM";
} }
System.out.println(">>>>>>>>>>tranId:" + tranId); System.out.println(">>>>>>>>>>tranId:"+tranId);
sql = "SELECT CONFIRMED,CASE WHEN WF_STATUS IS NULL THEN 'O' ELSE WF_STATUS END AS WF_STATUS,SUNDRY_CODE,SUNDRY_TYPE,PAY_MODE,BANK_CODE,REF_NO FROM MISC_PAYMENT WHERE TRAN_ID= ? "; sql = "SELECT CONFIRMED,CASE WHEN WF_STATUS IS NULL THEN 'O' ELSE WF_STATUS END AS WF_STATUS,SUNDRY_CODE,SUNDRY_TYPE,PAY_MODE,"
+ "BANK_CODE,REF_NO FROM MISC_PAYMENT WHERE TRAN_ID= ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId); pstmt.setString(1, tranId);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if ( rs.next() )
{ {
confStatus = rs.getString("CONFIRMED").trim(); confStatus = rs.getString("CONFIRMED").trim();
wfStatus = rs.getString("WF_STATUS").trim(); wfStatus = rs.getString("WF_STATUS").trim();
...@@ -85,89 +97,92 @@ public class MiscPaySubAct extends ActionHandlerEJB ...@@ -85,89 +97,92 @@ public class MiscPaySubAct extends ActionHandlerEJB
pstmt = null; pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
String str1;
if ("Y".equalsIgnoreCase(confStatus)) if( "Y".equalsIgnoreCase(confStatus) )
{ {
retString = itmDBAccessLocal.getErrorString("", "VTDIST26", ""); retString = itmDBAccessLocal.getErrorString("","VTDIST26","");
str1 = retString; return retString;
return str1;
} }
if ("S".equalsIgnoreCase(wfStatus)) if( "S".equalsIgnoreCase(wfStatus) )
{ {
retString = itmDBAccessLocal.getErrorString("", "ALRDYSUBMT", ""); retString = itmDBAccessLocal.getErrorString("","ALRDYSUBMT","");
str1 = retString; return retString;
return str1;
} }
if (("N".equalsIgnoreCase(confStatus)) && ("O".equalsIgnoreCase(wfStatus))) if( "N".equalsIgnoreCase(confStatus) && "O".equalsIgnoreCase(wfStatus))
{ {
//added by vishakha on 03/Aug/2015 as to incorporate the validations on submit button like those on commit button.
sql = "select sum(pay_amt) as totAmt from misc_paydet where tran_id = ? "; sql = "select sum(pay_amt) as totAmt from misc_paydet where tran_id = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId); pstmt.setString(1, tranId);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) if ( rs.next() )
{ {
totAmt = rs.getDouble("totAmt"); totAmt = rs.getDouble("totAmt");//fetching totalAmount from details
} }
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
if (totAmt < 0.0D) if(totAmt < 0.0)//total amount should not be negative
{ {
retString = itmDBAccessLocal.getErrorString("", "VTAMTMIS1", ""); retString = itmDBAccessLocal.getErrorString("","VTAMTMIS1","");
str1 = retString; return retString;
return str1;
} }
sql1 = "select TRAN_SER,vouch_no,pay_amt from misc_paydet where tran_id = ?"; sql1 = "select TRAN_SER,vouch_no,pay_amt from misc_paydet where tran_id = ?";
pstmt1 = conn.prepareStatement(sql1); pstmt1 = conn.prepareStatement(sql1);
pstmt1.setString(1, tranId); pstmt1.setString(1, tranId);
rs1 = pstmt1.executeQuery(); rs1 = pstmt1.executeQuery();
while (rs1.next()) while ( rs1.next() )
{ {
tranSer = checkNull(rs1.getString("TRAN_SER")); tranSer = checkNull(rs1.getString("TRAN_SER"));
refNo = checkNull(rs1.getString("vouch_no")); refNo = checkNull(rs1.getString("vouch_no"));
payAmt = rs1.getDouble("pay_amt"); payAmt = rs1.getDouble("pay_amt");
sql = "SELECT tot_amt as tot_amt, adj_amt as adj_amt , sundry_type as sundrytype from misc_payables where tran_ser = ? and ref_no = ? "; sql = "SELECT tot_amt as tot_amt, adj_amt as adj_amt , sundry_type as sundrytype from misc_payables where tran_ser = ?"
+ " and ref_no = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranSer); pstmt.setString(1,tranSer);
pstmt.setString(2, refNo); pstmt.setString(2,refNo);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
while (rs.next()) while ( rs.next() )
{ {
totAmtMiscPay = rs.getDouble("tot_amt"); totAmtMiscPay = rs.getDouble("tot_amt");
adjAmtMiscPay = rs.getDouble("adj_amt"); adjAmtMiscPay = rs.getDouble("adj_amt");
System.out.println("totAmtMiscPay =========" + totAmtMiscPay); System.out.println("totAmtMiscPay ========="+ totAmtMiscPay);
System.out.println("adjAmtMiscPay =========" + adjAmtMiscPay); System.out.println("adjAmtMiscPay ========="+ adjAmtMiscPay);
System.out.println("Pay Amount ============ " + payAmt); System.out.println("Pay Amount ============ "+ payAmt);
if (Math.abs(totAmtMiscPay - adjAmtMiscPay) >= Math.abs(payAmt)) if(Math.abs(totAmtMiscPay - adjAmtMiscPay) < Math.abs(payAmt))//if there is no balance in misc_payables
{ {
continue; System.out.println("Entering the if condition Pay Amount ============ "+ payAmt);
retString = itmDBAccessLocal.getErrorString("","VTBAL1","");
return retString;
} }
System.out.println("Entering the if condition Pay Amount ============ " + payAmt);
retString = itmDBAccessLocal.getErrorString("", "VTBAL1", "");
str1 = retString;
return str1;
} }
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
rs.close(); rs.close();
rs = null; rs = null;
}
}
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
rs1.close(); rs1.close();
rs1 = null; rs1 = null;
/**
* VALLABH KADAM
* Validation for [F14FSUN003]
* on [16/SEP/15]
* */
System.out.println("@V@ Sundry Type :- [" + sundryType + "]"); System.out.println("@V@ Sundry Type :- [" + sundryType + "]");
System.out.println("@V@ Sundry Code :- [" + sundryCode + "]"); System.out.println("@V@ Sundry Code :- [" + sundryCode + "]");
...@@ -195,8 +210,7 @@ public class MiscPaySubAct extends ActionHandlerEJB ...@@ -195,8 +210,7 @@ public class MiscPaySubAct extends ActionHandlerEJB
{ {
System.out.println("@V@ Pay Mode not matching"); System.out.println("@V@ Pay Mode not matching");
retString = itmDBAccessLocal.getErrorString("", "VTPYMDDIFF", ""); retString = itmDBAccessLocal.getErrorString("", "VTPYMDDIFF", "");
str1 = retString; return retString;
return str1;
} }
} }
...@@ -212,53 +226,56 @@ public class MiscPaySubAct extends ActionHandlerEJB ...@@ -212,53 +226,56 @@ public class MiscPaySubAct extends ActionHandlerEJB
stanCdBlank = true; stanCdBlank = true;
break; break;
} }
else
{
System.out.println("@V@ Stan code not blank"); System.out.println("@V@ Stan code not blank");
sql2 = "select count(*) a cnt from station where stan_code=?"; // sql2 = "select count(*) a cnt from station where stan_code=?";
pstmt2 = conn.prepareStatement(sql2); // pstmt2 = conn.prepareStatement(sql2);
pstmt2.setString(1, checkNull(rs.getString("stan_code"))); // pstmt2.setString(1, checkNull(rs.getString("stan_code")));
//
// rs2 = pstmt2.executeQuery();
// if (rs2.next())
// {
// cnt1 = rs2.getInt("cnt");
// }
// pstmt2.close();
// pstmt2 = null;
// rs2.close();
// rs2 = null;
//
// if (cnt1 == 0)
// {
// stanCodeInv = true;
// break;
// }
rs2 = pstmt2.executeQuery(); if (!"E".equalsIgnoreCase(sundryType))
if (rs2.next())
{
cnt1 = rs2.getInt("cnt");
}
pstmt2.close();
pstmt2 = null;
rs2.close();
rs2 = null;
if (cnt1 == 0)
{ {
stanCodeInv = true;
break;
}
if ("E".equalsIgnoreCase(sundryType))
continue;
System.out.println("@V@ Sundry type NOT 'E'"); System.out.println("@V@ Sundry type NOT 'E'");
if (stnCdList.size() > 0) if (stnCdList.size() > 0)
{ {
System.out.println("@V@ List size is NOT 0 :-[" + stnCdList.size() + "]"); System.out.println("@V@ List size is NOT 0 :-[" + stnCdList.size() + "]");
if (!stnCdList.contains(rs.getString("stan_code"))) if (!stnCdList.contains(rs.getString("stan_code")))
{ {
System.out.println("@V@ Stan code match found"); System.out.println("@V@ Stan code match NOT found");
stanCdDupl = true; stanCdDupl = true;
break; break;
} }
else
{
System.out.println("@V@ Stan code added in list"); System.out.println("@V@ Stan code added in list");
stnCdList.add(rs.getString("stan_code")); stnCdList.add(rs.getString("stan_code"));
} }
}
else else
{ {
System.out.println("@V@ First Stan code added in list"); System.out.println("@V@ First Stan code added in list");
stnCdList.add(rs.getString("stan_code")); stnCdList.add(rs.getString("stan_code"));
} }
} }
}
}
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
rs.close(); rs.close();
...@@ -268,15 +285,13 @@ public class MiscPaySubAct extends ActionHandlerEJB ...@@ -268,15 +285,13 @@ public class MiscPaySubAct extends ActionHandlerEJB
{ {
System.out.println("@V@ Station code null found"); System.out.println("@V@ Station code null found");
retString = itmDBAccessLocal.getErrorString("", "VTSTNCDBLK", ""); retString = itmDBAccessLocal.getErrorString("", "VTSTNCDBLK", "");
str1 = retString; return retString;
return str1;
} }
if (stanCodeInv) if (stanCodeInv)
{ {
System.out.println("@V@ Station code invalid"); System.out.println("@V@ Station code invalid");
retString = itmDBAccessLocal.getErrorString("", "VTSTNCDINV", ""); retString = itmDBAccessLocal.getErrorString("", "VTSTNCDINV", "");
str1 = retString; return retString;
return str1;
} }
if (!"E".equalsIgnoreCase(sundryType)) if (!"E".equalsIgnoreCase(sundryType))
{ {
...@@ -284,8 +299,7 @@ public class MiscPaySubAct extends ActionHandlerEJB ...@@ -284,8 +299,7 @@ public class MiscPaySubAct extends ActionHandlerEJB
{ {
System.out.println("@V@ Station code Duplicate found"); System.out.println("@V@ Station code Duplicate found");
retString = itmDBAccessLocal.getErrorString("", "VTSTNCDDPL", ""); retString = itmDBAccessLocal.getErrorString("", "VTSTNCDDPL", "");
str1 = retString; return retString;
return str1;
} }
} }
...@@ -310,8 +324,7 @@ public class MiscPaySubAct extends ActionHandlerEJB ...@@ -310,8 +324,7 @@ public class MiscPaySubAct extends ActionHandlerEJB
{ {
System.out.println("@V@ Voucher Duplicate found in 'misc_payment'"); System.out.println("@V@ Voucher Duplicate found in 'misc_payment'");
retString = itmDBAccessLocal.getErrorString("", "VTVCHNODPL", ""); retString = itmDBAccessLocal.getErrorString("", "VTVCHNODPL", "");
str1 = retString; return retString;
return str1;
} }
sql = "SELECT COUNT(*) AS CNT FROM BANKTRAN_LOG WHERE BANK_CODE=? AND TRAN_TYPE='P' AND TRAN_SER <> 'R-DIS' AND REF_NO=?"; sql = "SELECT COUNT(*) AS CNT FROM BANKTRAN_LOG WHERE BANK_CODE=? AND TRAN_TYPE='P' AND TRAN_SER <> 'R-DIS' AND REF_NO=?";
...@@ -333,100 +346,187 @@ public class MiscPaySubAct extends ActionHandlerEJB ...@@ -333,100 +346,187 @@ public class MiscPaySubAct extends ActionHandlerEJB
{ {
System.out.println("@V@ Duplicate cheque found"); System.out.println("@V@ Duplicate cheque found");
retString = itmDBAccessLocal.getErrorString("", "VTCHQ3", ""); retString = itmDBAccessLocal.getErrorString("", "VTCHQ3", "");
str1 = retString; return retString;
return str1;
} }
/**
* VALLABH KADAM
* Validation for [F14FSUN003]
* on [16/SEP/15]
* END
* */
//SQL for update the work flow status/..........
sql = "UPDATE MISC_PAYMENT SET WF_STATUS='S',emp_code__submit=?,submit_date=? WHERE tran_id = ?"; sql = "UPDATE MISC_PAYMENT SET WF_STATUS='S',emp_code__submit=?,submit_date=? WHERE tran_id = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, this.userId); pstmt.setString(1,userId);
datesubmit = new Timestamp(System.currentTimeMillis()); datesubmit=new java.sql.Timestamp(System.currentTimeMillis());
pstmt.setTimestamp(2, datesubmit); pstmt.setTimestamp(2,datesubmit);
pstmt.setString(3, tranId); pstmt.setString(3,tranId);
int rowcnt = pstmt.executeUpdate(); int rowcnt = pstmt.executeUpdate();
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
if (rowcnt > 0) if(rowcnt > 0)
{ {
retString = itmDBAccessLocal.getErrorString("", "SUBMITSUCC", ""); retString = itmDBAccessLocal.getErrorString("","SUBMITSUCC","");
System.out.println(">>>>>>>>>>>>>>>Before conn.commit()"); System.out.println(">>>>>>>>>>>>>>>Before conn.commit()");
conn.commit(); conn.commit();
//return retString;
} }
} }
} }
catch (Exception e) catch(Exception e)
{ {
try try
{ {
conn.rollback(); conn.rollback();
} }
catch (Exception localException1) { catch (Exception e1)
{
} }
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
{ {
try { try
if (pstmt1 != null) {
if(pstmt1 != null)
{ {
pstmt1.close(); pstmt1.close();
pstmt1 = null; pstmt1 = null;
} }
if (pstmt != null) if(pstmt != null)
{ {
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if ((conn != null) && (!conn.isClosed())) if( conn != null && ! conn.isClosed() )
{ {
conn.close(); conn.close();
conn = null; conn = null;
} }
} }
catch (Exception ef) { catch(Exception ef)
{
System.out.println(ef.getMessage()); System.out.println(ef.getMessage());
ef.printStackTrace(); ef.printStackTrace();
throw new ITMException(ef); throw new ITMException(ef);
} }
} }
try System.out.println("Returning Result ::"+retString);
return retString;
}
private String checkNull( String input )
{ {
if (pstmt1 != null) if ( input == null )
{ {
pstmt1.close(); input = "";
pstmt1 = null;
} }
if (pstmt != null) return input;
}
}
/********CODE COMMENTED as it only checks the balance for bank_type = 'B'*********/
/*public String getBalChk(String bankCode,String siteCode,Timestamp tranDate,double netAmt,Connection conn)throws Exception
{ {
System.out.println("@@@@@@getBalChk method@@@@@@@");
String errCode = "";
double bal = 0.0;
ITMDBAccessEJB itmDBAccessLocal = new ITMDBAccessEJB();
PreparedStatement pstmt = null;
ResultSet rs = null;
String sql = "",bankType = "",acctprd = "";
sql = "select bank_type as ls_type from bank where bank_code = ? ";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1,bankCode);
rs = pstmt.executeQuery();
if ( rs.next() )
{
bankType = checkNull(rs.getString("ls_type"));
}
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
rs.close();
rs = null;
sql = "select code as ls_acctprd from acctprd where ? between fr_date and to_date ";
pstmt = conn.prepareStatement(sql);
pstmt.setTimestamp(1,tranDate);
rs = pstmt.executeQuery();
if ( rs.next() )
{
acctprd = rs.getString("ls_acctprd");
} }
if ((conn != null) && (!conn.isClosed())) pstmt.close();
pstmt = null;
rs.close();
rs = null;
if(bankType == "C")
{ {
conn.close(); sql = "select sum(dr_amt - cr_amt) as lc_bal from sundrybal where acct_prd = ? and prd_code = 'zzzzzz' and site_code = ? and sundry_type = 'B' and sundry_code = ? ";
conn = null; pstmt = conn.prepareStatement(sql);
pstmt.setString(1,acctprd);
pstmt.setString(2,siteCode);
pstmt.setString(3,bankCode);
rs = pstmt.executeQuery();
if ( rs.next() )
{
bal = rs.getDouble("lc_bal");
} }
pstmt.close();
pstmt = null;
rs.close();
rs = null;
System.out.println("Value of sum(dr_amt - cr_amt)"+bal);
System.out.println("Value of net amount ==========="+netAmt);
if(netAmt > 0.0 && netAmt > bal )
{
errCode = itmDBAccessLocal.getErrorString("","VTPAYAMT","");
return errCode;
} }
catch (Exception ef) {
System.out.println(ef.getMessage());
ef.printStackTrace();
throw new ITMException(ef);
} }
System.out.println("Returning Result ::" + retString); return errCode;
return retString;
} }
private String checkNull(String input)
sql = "select tran_id as ls_keyfld, bank_code as ls_bank, net_amt as lc_net, site_code as ls_site, tran_date as ld_tran_date,ref_no , pay_type as ls_pay_type from misc_payment where tran_id = ? for update nowait";
pstmt = conn.prepareStatement(sql);
pstmt.setString(1, tranId);
rs = pstmt.executeQuery();
if ( rs.next() )
{ {
if (input == null) tranKeyFld = checkNull(rs.getString("ls_keyfld"));
bankCode = checkNull(rs.getString("ls_bank"));
netAmt = rs.getDouble("lc_net");
tranDate = rs.getTimestamp("ld_tran_date");
siteCode = checkNull(rs.getString("ls_site"));
payType = checkNull(rs.getString("ls_pay_type"));
refNo = checkNull(rs.getString("ref_no"));
}
pstmt.close();
pstmt = null;
rs.close();
rs = null;
ignorechklimit = fin.getFinparams("999999","IGNORE_WARNINGS",conn);
System.out.println("Value of Ignore chk limit ===="+ignorechklimit);
if("NULLFOUND".equals(ignorechklimit ) || ignorechklimit == null)
{ {
input = ""; ignorechklimit = "N";
System.out.println("Value of Ignore chk limit ===="+ignorechklimit);
} }
return input; if("N".equalsIgnoreCase(ignorechklimit))
{
System.out.println("Insiding****BalChk condition");
retString = getBalChk(bankCode,siteCode,tranDate,netAmt,conn);
if(retString.trim().length() > 0)
{
return retString;
} }
} }*/
\ 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