Commit 228a8914 authored by dhirajchavan's avatar dhirajchavan

removed eff and valid upto from condition and sql


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100412 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 1e1d624a
...@@ -119,7 +119,11 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo ...@@ -119,7 +119,11 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
eff_from=genericUtility.getColumnValue("eff_from", dom); eff_from=genericUtility.getColumnValue("eff_from", dom);
valid_upto=genericUtility.getColumnValue("valid_upto", dom); valid_upto=genericUtility.getColumnValue("valid_upto", dom);
reasCode=genericUtility.getColumnValue("reas_code", dom); reasCode=genericUtility.getColumnValue("reas_code", dom);
if(siteCode==null && custcode==null && eff_from==null && valid_upto==null ) // effDate = Timestamp.valueOf(genericUtility.getValidDateString(eff_from, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
// validDate = Timestamp.valueOf(genericUtility.getValidDateString(valid_upto, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("effDate@@@@@timestamp"+effDate+"validDate@@@@@timestamp"+validDate);
if(siteCode==null && custcode==null )
{ {
errString = getErrorString(" ", "VMALLM", userId); errString = getErrorString(" ", "VMALLM", userId);
break; break;
...@@ -128,17 +132,17 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo ...@@ -128,17 +132,17 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
System.out.println("siteCode"+siteCode+"custcode"+custcode+"eff_from"+eff_from+"valid_upto"+valid_upto); System.out.println("siteCode"+siteCode+"custcode"+custcode+"eff_from"+eff_from+"valid_upto"+valid_upto);
//String col2 = genericUtility.getColumnValue("tax_chap",dom); //String col2 = genericUtility.getColumnValue("tax_chap",dom);
String Sql = "SELECT COUNT(1) AS COUNT FROM cust_bypass_crchk WHERE site_code=? AND cust_code=? AND eff_from=? AND valid_upto=?"; String Sql = "SELECT COUNT(1) AS COUNT FROM cust_bypass_crchk WHERE site_code=? AND cust_code=?";
pstmt = conn.prepareStatement(Sql); pstmt = conn.prepareStatement(Sql);
pstmt.setString(1,siteCode); pstmt.setString(1,siteCode);
pstmt.setString(2,custcode); pstmt.setString(2,custcode);
//pstmt.setTimestamp(3,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(eff_from,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()))); //pstmt.setTimestamp(3,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(eff_from,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat())));
pstmt.setString(3,eff_from); // pstmt.setString(3,eff_from);
pstmt.setString(4,valid_upto); //pstmt.setString(4,valid_upto);
// pstmt.setTimestamp(4,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(valid_upto,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()))); // pstmt.setTimestamp(4,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(valid_upto,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat())));
// pstmt.setString(5,reasCode); // pstmt.setString(5,reasCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
System.out.println("Sql@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@by dhiraj@@@@@@@@" + Sql); System.out.println("Sql@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" + Sql);
if (rs.next()) if (rs.next())
{ {
seriCount = rs.getInt("COUNT"); seriCount = rs.getInt("COUNT");
...@@ -250,6 +254,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo ...@@ -250,6 +254,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
{ {
System.out.println("eff_from"+eff_from); System.out.println("eff_from"+eff_from);
System.out.println("valid_upto"+validDate); System.out.println("valid_upto"+validDate);
// genericUtility.getApplDateTimeFormat(eff_from.)
effDate = Timestamp.valueOf(genericUtility.getValidDateString(eff_from, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0"); effDate = Timestamp.valueOf(genericUtility.getValidDateString(eff_from, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
validDate = Timestamp.valueOf(genericUtility.getValidDateString(valid_upto, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0"); validDate = Timestamp.valueOf(genericUtility.getValidDateString(valid_upto, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("effDate"+effDate); System.out.println("effDate"+effDate);
......
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