Commit 6c775800 authored by agaikwad's avatar agaikwad

Added Checknull Condition for validation of MiscVoucherIC EJB.


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@103596 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b1ca649d
...@@ -155,10 +155,7 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M ...@@ -155,10 +155,7 @@ public class MiscVoucherIC extends ValidatorEJB implements MiscVoucherICLocal, M
{ {
finCommon = new FinCommon(); finCommon = new FinCommon();
validator = new ValidatorEJB(); validator = new ValidatorEJB();
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat()); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getApplDateFormat());
SimpleDateFormat dbDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat()); SimpleDateFormat dbDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat());
userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode"); userId = getValueFromXTRA_PARAMS(xtraParams, "loginCode");
...@@ -206,7 +203,7 @@ conn = getConnection(); ...@@ -206,7 +203,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("sundry_type")) else if(childNodeName.equalsIgnoreCase("sundry_type"))
{ {
sundryType = genericUtility.getColumnValue("sundry_type", dom); sundryType = checkNull(genericUtility.getColumnValue("sundry_type", dom));
if(sundryType != null && sundryType.trim().length() > 0) if(sundryType != null && sundryType.trim().length() > 0)
{ {
sql = "SELECT COUNT(*) FROM SUNDRY_TYPE WHERE SUNDRY_TYPE = ?"; sql = "SELECT COUNT(*) FROM SUNDRY_TYPE WHERE SUNDRY_TYPE = ?";
...@@ -232,8 +229,8 @@ conn = getConnection(); ...@@ -232,8 +229,8 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("sundry_code")) else if(childNodeName.equalsIgnoreCase("sundry_code"))
{ {
sundryCode = genericUtility.getColumnValue("sundry_code", dom); sundryCode = checkNull(genericUtility.getColumnValue("sundry_code", dom));
sundryType = genericUtility.getColumnValue("sundry_type", dom); sundryType = checkNull(genericUtility.getColumnValue("sundry_type", dom));
siteCode = genericUtility.getColumnValue("site_code", dom); siteCode = genericUtility.getColumnValue("site_code", dom);
if(sundryCode != null && sundryType != null && siteCode != null && sundryCode.trim().length() > 0 && sundryType.trim().length() > 0 && siteCode.trim().length() > 0) if(sundryCode != null && sundryType != null && siteCode != null && sundryCode.trim().length() > 0 && sundryType.trim().length() > 0 && siteCode.trim().length() > 0)
{ {
...@@ -340,7 +337,7 @@ conn = getConnection(); ...@@ -340,7 +337,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("sundry_code__pay")) else if(childNodeName.equalsIgnoreCase("sundry_code__pay"))
{ {
sundryCodePay = genericUtility.getColumnValue("sundry_code__pay", dom); sundryCodePay = checkNull(genericUtility.getColumnValue("sundry_code__pay", dom));
sundryTypePay = genericUtility.getColumnValue("sundry_type__pay", dom); sundryTypePay = genericUtility.getColumnValue("sundry_type__pay", dom);
siteCode = genericUtility.getColumnValue("site_code", dom); siteCode = genericUtility.getColumnValue("site_code", dom);
//refSer = genericUtility.getColumnValue("ref_ser", dom); //refSer = genericUtility.getColumnValue("ref_ser", dom);
...@@ -410,7 +407,7 @@ conn = getConnection(); ...@@ -410,7 +407,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("order_ref")) else if(childNodeName.equalsIgnoreCase("order_ref"))
{ {
orderRef = genericUtility.getColumnValue("order_ref", dom); orderRef = checkNull(genericUtility.getColumnValue("order_ref", dom));
if(orderRef != null && orderRef.trim().length() > 0) if(orderRef != null && orderRef.trim().length() > 0)
{ {
sql = " select count(tran_id) from srv_order where tran_id = ? and confirmed = 'Y' "; sql = " select count(tran_id) from srv_order where tran_id = ? and confirmed = 'Y' ";
...@@ -463,11 +460,11 @@ conn = getConnection(); ...@@ -463,11 +460,11 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("bill_date")) else if(childNodeName.equalsIgnoreCase("bill_date"))
{ {
billNo = genericUtility.getColumnValue("bill_no", dom); billNo = checkNull(genericUtility.getColumnValue("bill_no", dom));
siteCode = genericUtility.getColumnValue("site_code", dom); siteCode = genericUtility.getColumnValue("site_code", dom);
if(billNo!= null && (billNo.trim().length() > 0 )) if(billNo!= null && (billNo.trim().length() > 0 ))
{ {
billDate = genericUtility.getColumnValue("bill_date", dom); billDate = checkNull(genericUtility.getColumnValue("bill_date", dom));
sundryType = genericUtility.getColumnValue("sundry_type", dom); sundryType = genericUtility.getColumnValue("sundry_type", dom);
sundryCode = genericUtility.getColumnValue("sundry_code", dom); sundryCode = genericUtility.getColumnValue("sundry_code", dom);
tranId = genericUtility.getColumnValue("tran_id", dom); tranId = genericUtility.getColumnValue("tran_id", dom);
...@@ -629,7 +626,7 @@ conn = getConnection(); ...@@ -629,7 +626,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("proj_code")) else if(childNodeName.equalsIgnoreCase("proj_code"))
{ {
projectCode = genericUtility.getColumnValue("proj_code", dom); projectCode = genericUtility.getColumnValue("proj_code", dom);
if(projectCode!= null && (projectCode.trim().length() > 0 )) if(projectCode!= null && !"null".equals(projectCode) && (projectCode.trim().length() > 0 ))
{ {
sql = "SELECT COUNT(*) FROM PROJECT WHERE PROJ_CODE = ?"; sql = "SELECT COUNT(*) FROM PROJECT WHERE PROJ_CODE = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -688,7 +685,7 @@ conn = getConnection(); ...@@ -688,7 +685,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("acct_code__ap")) else if(childNodeName.equalsIgnoreCase("acct_code__ap"))
{ {
acctCodeAp = genericUtility.getColumnValue("acct_code__ap", dom); acctCodeAp = checkNull(genericUtility.getColumnValue("acct_code__ap", dom));
siteCode = genericUtility.getColumnValue("site_code", dom); siteCode = genericUtility.getColumnValue("site_code", dom);
sundryCode = genericUtility.getColumnValue("sundry_code", dom); sundryCode = genericUtility.getColumnValue("sundry_code", dom);
sundryType = genericUtility.getColumnValue("sundry_type", dom); sundryType = genericUtility.getColumnValue("sundry_type", dom);
...@@ -721,8 +718,8 @@ conn = getConnection(); ...@@ -721,8 +718,8 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("acct_code__pay")) else if(childNodeName.equalsIgnoreCase("acct_code__pay"))
{ {
acctCodePay = genericUtility.getColumnValue("acct_code__pay", dom); acctCodePay = checkNull(genericUtility.getColumnValue("acct_code__pay", dom));
siteCode = genericUtility.getColumnValue("site_code", dom); siteCode = checkNull(genericUtility.getColumnValue("site_code", dom));
if(siteCode != null && acctCodePay != null && siteCode.trim().length() > 0 && acctCodePay.trim().length() > 0) if(siteCode != null && acctCodePay != null && siteCode.trim().length() > 0 && acctCodePay.trim().length() > 0)
{ {
errCode = finCommon.isAcctCode(siteCode, acctCodePay, "", conn); errCode = finCommon.isAcctCode(siteCode, acctCodePay, "", conn);
...@@ -754,8 +751,8 @@ conn = getConnection(); ...@@ -754,8 +751,8 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("cctr_code__ap")) else if(childNodeName.equalsIgnoreCase("cctr_code__ap"))
{ {
cctrCodeAp = genericUtility.getColumnValue("cctr_code__ap", dom); cctrCodeAp = checkNull(genericUtility.getColumnValue("cctr_code__ap", dom));
acctCodeAp = genericUtility.getColumnValue("acct_code__ap", dom); acctCodeAp = checkNull(genericUtility.getColumnValue("acct_code__ap", dom));
if(acctCodeAp != null && cctrCodeAp != null && acctCodeAp.trim().length() > 0 && cctrCodeAp.trim().length() > 0) if(acctCodeAp != null && cctrCodeAp != null && acctCodeAp.trim().length() > 0 && cctrCodeAp.trim().length() > 0)
{ {
errCode = finCommon.isCctrCode(acctCodeAp, cctrCodeAp, "", conn); errCode = finCommon.isCctrCode(acctCodeAp, cctrCodeAp, "", conn);
...@@ -773,8 +770,8 @@ conn = getConnection(); ...@@ -773,8 +770,8 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("acct_code__cf")) else if(childNodeName.equalsIgnoreCase("acct_code__cf"))
{ {
acctCodeCf = genericUtility.getColumnValue("acct_code__cf", dom); acctCodeCf = checkNull(genericUtility.getColumnValue("acct_code__cf", dom));
siteCode = genericUtility.getColumnValue("site_code", dom); siteCode = checkNull(genericUtility.getColumnValue("site_code", dom));
if(siteCode != null && acctCodeCf!= null && siteCode.trim().length() > 0 && acctCodeCf.trim().length() > 0 ) if(siteCode != null && acctCodeCf!= null && siteCode.trim().length() > 0 && acctCodeCf.trim().length() > 0 )
{ {
errCode = finCommon.isAcctCode(siteCode, acctCodeCf, "", conn); errCode = finCommon.isAcctCode(siteCode, acctCodeCf, "", conn);
...@@ -802,8 +799,8 @@ conn = getConnection(); ...@@ -802,8 +799,8 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("cctr_code__cf")) else if(childNodeName.equalsIgnoreCase("cctr_code__cf"))
{ {
cctrCodeCf = genericUtility.getColumnValue("cctr_code__cf", dom); cctrCodeCf = checkNull(genericUtility.getColumnValue("cctr_code__cf", dom));
acctCodeCf = genericUtility.getColumnValue("acct_code__cf", dom); acctCodeCf = checkNull(genericUtility.getColumnValue("acct_code__cf", dom));
if(acctCodeCf!= null && (acctCodeCf.trim().length() > 0 )) if(acctCodeCf!= null && (acctCodeCf.trim().length() > 0 ))
{ {
if(acctCodeCf != null && cctrCodeCf != null && acctCodeCf.trim().length() > 0 && cctrCodeCf.trim().length() > 0) if(acctCodeCf != null && cctrCodeCf != null && acctCodeCf.trim().length() > 0 && cctrCodeCf.trim().length() > 0)
...@@ -824,11 +821,11 @@ conn = getConnection(); ...@@ -824,11 +821,11 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("acct_code__adv")) else if(childNodeName.equalsIgnoreCase("acct_code__adv"))
{ {
vouchType = genericUtility.getColumnValue("vouch_type", dom); vouchType = checkNull(genericUtility.getColumnValue("vouch_type", dom));
if(vouchType != null && "A".equalsIgnoreCase(vouchType)) if(vouchType != null && "A".equalsIgnoreCase(vouchType))
{ {
acctCodeAdv = genericUtility.getColumnValue("acct_code__adv", dom); acctCodeAdv = checkNull(genericUtility.getColumnValue("acct_code__adv", dom));
siteCode = genericUtility.getColumnValue("site_code", dom); siteCode = checkNull(genericUtility.getColumnValue("site_code", dom));
if(acctCodeAdv != null && siteCode != null && acctCodeAdv.trim().length() > 0 && siteCode.trim().length() > 0) if(acctCodeAdv != null && siteCode != null && acctCodeAdv.trim().length() > 0 && siteCode.trim().length() > 0)
{ {
errCode = finCommon.isAcctCode(siteCode, acctCodeAdv, "", conn); //added if condition extra by Dipak errCode = finCommon.isAcctCode(siteCode, acctCodeAdv, "", conn); //added if condition extra by Dipak
...@@ -861,11 +858,11 @@ conn = getConnection(); ...@@ -861,11 +858,11 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("cctr_code__adv")) else if(childNodeName.equalsIgnoreCase("cctr_code__adv"))
{ {
vouchType = genericUtility.getColumnValue("vouch_type", dom); vouchType = checkNull(genericUtility.getColumnValue("vouch_type", dom));
if(vouchType != null && "A".equalsIgnoreCase(vouchType)) if(vouchType != null && "A".equalsIgnoreCase(vouchType))
{ {
cctrCodeAdv = genericUtility.getColumnValue("cctr_code__adv", dom); cctrCodeAdv = checkNull(genericUtility.getColumnValue("cctr_code__adv", dom));
acctCodeAdv = genericUtility.getColumnValue("acct_code__adv", dom); acctCodeAdv = checkNull(genericUtility.getColumnValue("acct_code__adv", dom));
if(acctCodeAdv != null && cctrCodeAdv != null && acctCodeAdv.trim().length() > 0 && cctrCodeAdv.trim().length() > 0) if(acctCodeAdv != null && cctrCodeAdv != null && acctCodeAdv.trim().length() > 0 && cctrCodeAdv.trim().length() > 0)
{ {
errCode = finCommon.isCctrCode(acctCodeAdv, cctrCodeAdv, "", conn); errCode = finCommon.isCctrCode(acctCodeAdv, cctrCodeAdv, "", conn);
...@@ -986,7 +983,7 @@ conn = getConnection(); ...@@ -986,7 +983,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("fin_entity")) else if(childNodeName.equalsIgnoreCase("fin_entity"))
{ {
finEntity = genericUtility.getColumnValue("fin_entity", dom); finEntity = checkNull(genericUtility.getColumnValue("fin_entity", dom));
if(finEntity != null && (finEntity.trim().length() > 0)) if(finEntity != null && (finEntity.trim().length() > 0))
{ {
sql = "SELECT COUNT(*) FROM FINENT WHERE FIN_ENTITY = ?"; sql = "SELECT COUNT(*) FROM FINENT WHERE FIN_ENTITY = ?";
...@@ -1012,7 +1009,7 @@ conn = getConnection(); ...@@ -1012,7 +1009,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("tax_class")) else if(childNodeName.equalsIgnoreCase("tax_class"))
{ {
taxClass = genericUtility.getColumnValue("tax_class", dom); taxClass = checkNull(genericUtility.getColumnValue("tax_class", dom));
if(taxClass!= null && (taxClass.trim().length() > 0 )) if(taxClass!= null && (taxClass.trim().length() > 0 ))
{ {
sql = "SELECT COUNT(*) FROM taxclass WHERE tax_class = ? "; sql = "SELECT COUNT(*) FROM taxclass WHERE tax_class = ? ";
...@@ -1038,7 +1035,7 @@ conn = getConnection(); ...@@ -1038,7 +1035,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("tax_chap")) else if(childNodeName.equalsIgnoreCase("tax_chap"))
{ {
taxChap = genericUtility.getColumnValue("tax_chap", dom); taxChap = checkNull(genericUtility.getColumnValue("tax_chap", dom));
if(taxChap!= null && (taxChap.trim().length() > 0 )) if(taxChap!= null && (taxChap.trim().length() > 0 ))
{ {
sql = "SELECT COUNT(*) FROM taxchap WHERE tax_chap = ? "; sql = "SELECT COUNT(*) FROM taxchap WHERE tax_chap = ? ";
...@@ -1064,7 +1061,7 @@ conn = getConnection(); ...@@ -1064,7 +1061,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("tax_env")) else if(childNodeName.equalsIgnoreCase("tax_env"))
{ {
taxEnv = genericUtility.getColumnValue("tax_env", dom); taxEnv = checkNull(genericUtility.getColumnValue("tax_env", dom));
if(taxEnv!= null && (taxEnv.trim().length() > 0 )) if(taxEnv!= null && (taxEnv.trim().length() > 0 ))
{ {
sql = "SELECT COUNT(*) FROM taxenv WHERE tax_env = ? "; sql = "SELECT COUNT(*) FROM taxenv WHERE tax_env = ? ";
...@@ -1111,7 +1108,7 @@ conn = getConnection(); ...@@ -1111,7 +1108,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("cr_term")) else if(childNodeName.equalsIgnoreCase("cr_term"))
{ {
crTerm = genericUtility.getColumnValue("cr_term", dom); crTerm = checkNull(genericUtility.getColumnValue("cr_term", dom));
if(crTerm == null || (crTerm.trim().length() == 0)) if(crTerm == null || (crTerm.trim().length() == 0))
{ {
errCode = "VECRT2"; errCode = "VECRT2";
...@@ -1157,7 +1154,7 @@ conn = getConnection(); ...@@ -1157,7 +1154,7 @@ conn = getConnection();
childNodeName = childNode.getNodeName(); childNodeName = childNode.getNodeName();
if(childNodeName.equalsIgnoreCase("ref_ser")) if(childNodeName.equalsIgnoreCase("ref_ser"))
{ {
refSer = genericUtility.getColumnValue("ref_ser", dom); refSer = checkNull(genericUtility.getColumnValue("ref_ser", dom));
if((refSer != null) && (!("M-ADV".equalsIgnoreCase(refSer))) && (!("P-ADV".equalsIgnoreCase(refSer)) ) && (refSer.trim().length() > 0)) if((refSer != null) && (!("M-ADV".equalsIgnoreCase(refSer))) && (!("P-ADV".equalsIgnoreCase(refSer)) ) && (refSer.trim().length() > 0))
{ {
errCode = "VTREFSER3"; errCode = "VTREFSER3";
...@@ -1168,7 +1165,7 @@ conn = getConnection(); ...@@ -1168,7 +1165,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("ref_no")) else if(childNodeName.equalsIgnoreCase("ref_no"))
{ {
refNo = genericUtility.getColumnValue("ref_no", dom); refNo = checkNull(genericUtility.getColumnValue("ref_no", dom));
refSer = genericUtility.getColumnValue("ref_ser", dom); refSer = genericUtility.getColumnValue("ref_ser", dom);
sundryType = genericUtility.getColumnValue("sundry_type", dom1); sundryType = genericUtility.getColumnValue("sundry_type", dom1);
sundryCode = genericUtility.getColumnValue("sundry_code", dom1); sundryCode = genericUtility.getColumnValue("sundry_code", dom1);
...@@ -1410,10 +1407,10 @@ conn = getConnection(); ...@@ -1410,10 +1407,10 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("cctr_code")) else if(childNodeName.equalsIgnoreCase("cctr_code"))
{ {
acctCode = genericUtility.getColumnValue("acct_code", dom2); acctCode = checkNull(genericUtility.getColumnValue("acct_code", dom2));
cctrCode = genericUtility.getColumnValue("cctr_code", dom2); cctrCode =checkNull( genericUtility.getColumnValue("cctr_code", dom2));
vouchType = genericUtility.getColumnValue("vouch_type", dom1); vouchType = checkNull(genericUtility.getColumnValue("vouch_type", dom1));
cctrCodeAdv = genericUtility.getColumnValue("cctr_code__adv", dom1); cctrCodeAdv = checkNull(genericUtility.getColumnValue("cctr_code__adv", dom1));
if("A".equalsIgnoreCase(vouchType)) if("A".equalsIgnoreCase(vouchType))
{ {
if(cctrCode != cctrCodeAdv && saveflag == "2") if(cctrCode != cctrCodeAdv && saveflag == "2")
...@@ -1443,8 +1440,8 @@ conn = getConnection(); ...@@ -1443,8 +1440,8 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("dept_code")) else if(childNodeName.equalsIgnoreCase("dept_code"))
{ {
deptCode = genericUtility.getColumnValue("dept_code", dom2); deptCode = checkNull(genericUtility.getColumnValue("dept_code", dom2));
acctCode = genericUtility.getColumnValue("acct_code", dom2); acctCode = checkNull(genericUtility.getColumnValue("acct_code", dom2));
if(deptCode != null && (deptCode.trim().length() > 0 )) if(deptCode != null && (deptCode.trim().length() > 0 ))
{ {
sql1 = "SELECT COUNT(1) FROM department WHERE dept_code = ?"; sql1 = "SELECT COUNT(1) FROM department WHERE dept_code = ?";
...@@ -1519,9 +1516,9 @@ conn = getConnection(); ...@@ -1519,9 +1516,9 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("emp_code")) else if(childNodeName.equalsIgnoreCase("emp_code"))
{ {
empCode = genericUtility.getColumnValue("emp_code", dom2); empCode = checkNull(genericUtility.getColumnValue("emp_code", dom2));
siteCode = genericUtility.getColumnValue("site_code", dom1); siteCode = checkNull(genericUtility.getColumnValue("site_code", dom1));
refSer = genericUtility.getColumnValue("ref_ser", dom1); refSer = checkNull(genericUtility.getColumnValue("ref_ser", dom1));
if(empCode != null && (empCode.trim().length() > 0 )) if(empCode != null && (empCode.trim().length() > 0 ))
{ {
errCode = finCommon.isEmployee(siteCode, empCode, refSer, conn); errCode = finCommon.isEmployee(siteCode, empCode, refSer, conn);
...@@ -1536,10 +1533,10 @@ conn = getConnection(); ...@@ -1536,10 +1533,10 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("anal_code")) else if(childNodeName.equalsIgnoreCase("anal_code"))
{ {
analCode = genericUtility.getColumnValue("anal_code", dom2); analCode = checkNull(genericUtility.getColumnValue("anal_code", dom2));
acctCode = genericUtility.getColumnValue("acct_code", dom2); acctCode = checkNull(genericUtility.getColumnValue("acct_code", dom2));
cctrCode = genericUtility.getColumnValue("cctr_code", dom2); cctrCode = checkNull(genericUtility.getColumnValue("cctr_code", dom2));
refSer = genericUtility.getColumnValue("ref_ser", dom1); refSer = checkNull(genericUtility.getColumnValue("ref_ser", dom1));
if(acctCode != null && analCode != null && refSer != null && acctCode.trim().length() > 0 && analCode.trim().length() > 0 && refSer.trim().length() > 0) if(acctCode != null && analCode != null && refSer != null && acctCode.trim().length() > 0 && analCode.trim().length() > 0 && refSer.trim().length() > 0)
{ {
errCode = finCommon.isAnalysis(acctCode, analCode, refSer, conn); errCode = finCommon.isAnalysis(acctCode, analCode, refSer, conn);
...@@ -1592,10 +1589,10 @@ conn = getConnection(); ...@@ -1592,10 +1589,10 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("anal_code__1")) else if(childNodeName.equalsIgnoreCase("anal_code__1"))
{ {
analCode1 = genericUtility.getColumnValue("anal_code__1", dom2); analCode1 = checkNull(genericUtility.getColumnValue("anal_code__1", dom2));
acctCode = genericUtility.getColumnValue("acct_code", dom2); acctCode = checkNull(genericUtility.getColumnValue("acct_code", dom2));
cctrCode = genericUtility.getColumnValue("cctr_code", dom2); cctrCode = checkNull(genericUtility.getColumnValue("cctr_code", dom2));
refSer = genericUtility.getColumnValue("ref_ser", dom1); refSer = checkNull(genericUtility.getColumnValue("ref_ser", dom1));
if(acctCode != null && analCode1 != null && refSer != null && acctCode.trim().length() > 0 && analCode1.trim().length() > 0 && refSer.trim().length() > 0) if(acctCode != null && analCode1 != null && refSer != null && acctCode.trim().length() > 0 && analCode1.trim().length() > 0 && refSer.trim().length() > 0)
{ {
errCode = finCommon.isAnalysis(acctCode, analCode1, refSer, conn); errCode = finCommon.isAnalysis(acctCode, analCode1, refSer, conn);
...@@ -1648,10 +1645,10 @@ conn = getConnection(); ...@@ -1648,10 +1645,10 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("anal_code__2")) else if(childNodeName.equalsIgnoreCase("anal_code__2"))
{ {
analCode2 = genericUtility.getColumnValue("anal_code__2", dom2); analCode2 = checkNull(genericUtility.getColumnValue("anal_code__2", dom2));
acctCode = genericUtility.getColumnValue("acct_code", dom2); acctCode = checkNull(genericUtility.getColumnValue("acct_code", dom2));
cctrCode = genericUtility.getColumnValue("cctr_code", dom2); cctrCode = checkNull(genericUtility.getColumnValue("cctr_code", dom2));
refSer = genericUtility.getColumnValue("ref_ser", dom1); refSer = checkNull(genericUtility.getColumnValue("ref_ser", dom1));
if(acctCode != null && analCode2 != null && refSer != null && acctCode.trim().length() > 0 && analCode2.trim().length() > 0 && refSer.trim().length() > 0) if(acctCode != null && analCode2 != null && refSer != null && acctCode.trim().length() > 0 && analCode2.trim().length() > 0 && refSer.trim().length() > 0)
{ {
errCode = finCommon.isAnalysis(acctCode, analCode2, refSer, conn); errCode = finCommon.isAnalysis(acctCode, analCode2, refSer, conn);
...@@ -1704,15 +1701,15 @@ conn = getConnection(); ...@@ -1704,15 +1701,15 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("bill_date")) else if(childNodeName.equalsIgnoreCase("bill_date"))
{ {
billNo = genericUtility.getColumnValue("bill_no", dom2); billNo = checkNull(genericUtility.getColumnValue("bill_no", dom2));
siteCode = genericUtility.getColumnValue("site_code", dom2); siteCode = checkNull(genericUtility.getColumnValue("site_code", dom2));
if(billNo!= null && (billNo.trim().length() > 0 )) if(billNo!= null && (billNo.trim().length() > 0 ))
{ {
billDate = genericUtility.getColumnValue("bill_date", dom2); billDate = checkNull(genericUtility.getColumnValue("bill_date", dom2));
sundryTypeFor = genericUtility.getColumnValue("sundry_type__for", dom2); sundryTypeFor = checkNull(genericUtility.getColumnValue("sundry_type__for", dom2));
sundryCodeFor = genericUtility.getColumnValue("sundry_code__for", dom2); sundryCodeFor = checkNull(genericUtility.getColumnValue("sundry_code__for", dom2));
tranId = genericUtility.getColumnValue("tran_id", dom2); tranId = checkNull(genericUtility.getColumnValue("tran_id", dom2));
lineNo = genericUtility.getColumnValue("line_no", dom2); lineNo = checkNull(genericUtility.getColumnValue("line_no", dom2));
if(tranId == null) if(tranId == null)
{ {
tranId = ""; tranId = "";
...@@ -1857,7 +1854,7 @@ conn = getConnection(); ...@@ -1857,7 +1854,7 @@ conn = getConnection();
else if(childNodeName.equalsIgnoreCase("proj_code")) else if(childNodeName.equalsIgnoreCase("proj_code"))
{ {
projectCode = genericUtility.getColumnValue("proj_code", dom2); projectCode = genericUtility.getColumnValue("proj_code", dom2);
if(projectCode!= null && (projectCode.trim().length() > 0 )) if(projectCode!= null && !"null".equals(projectCode) && (projectCode.trim().length() > 0 ))
{ {
sql = "SELECT COUNT(*) FROM PROJECT WHERE PROJ_CODE = ?"; sql = "SELECT COUNT(*) FROM PROJECT WHERE PROJ_CODE = ?";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
...@@ -2124,10 +2121,7 @@ conn = getConnection(); ...@@ -2124,10 +2121,7 @@ conn = getConnection();
String bankName=""; String bankName="";
try try
{ {
//Changes and Commented By Bhushan on 06-06-2016 :START conn = connDriver.getConnectDB("DriverITM");
//conn = connDriver.getConnectDB("DriverITM");
conn = getConnection();
//Changes and Commented By Bhushan on 06-06-2016 :END
conn.setAutoCommit(false); conn.setAutoCommit(false);
connDriver = null; connDriver = null;
finCommon = new FinCommon(); finCommon = new FinCommon();
......
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