Commit e63d7693 authored by dhirajchavan's avatar dhirajchavan

*** empty log message ***


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@100419 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 9c1b4ce2
...@@ -80,7 +80,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo ...@@ -80,7 +80,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
String valid_upto=""; String valid_upto="";
String reasCode=""; String reasCode="";
String description=""; String description="";
String dateFormat = "";
int currentFormNo = 0; int currentFormNo = 0;
int childNodeListLength; int childNodeListLength;
Connection conn = null; Connection conn = null;
...@@ -116,31 +116,52 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo ...@@ -116,31 +116,52 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
int seriCount = 0; int seriCount = 0;
siteCode = genericUtility.getColumnValue("site_code", dom); siteCode = genericUtility.getColumnValue("site_code", dom);
custcode = genericUtility.getColumnValue("cust_code", dom); custcode = genericUtility.getColumnValue("cust_code", dom);
eff_from=genericUtility.getColumnValue("eff_from", dom); eff_from=checkNull(genericUtility.getColumnValue("eff_from", dom));
valid_upto=genericUtility.getColumnValue("valid_upto", dom); valid_upto=checkNull(genericUtility.getColumnValue("valid_upto", dom));
reasCode=genericUtility.getColumnValue("reas_code", dom); reasCode=genericUtility.getColumnValue("reas_code", dom);
// effDate = Timestamp.valueOf(genericUtility.getValidDateString(eff_from, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0"); String sDateFrom = "";
// validDate = Timestamp.valueOf(genericUtility.getValidDateString(valid_upto, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0"); String sDateTo = "";
System.out.println("effDate@@@@@timestamp"+effDate+"validDate@@@@@timestamp"+validDate); String dbDateFrom = "";
String dbDateTo = "";
if(siteCode==null && custcode==null ) String dateFromString = "";
{ String dateToString = "";
errString = getErrorString(" ", "VMALLM", userId); java.sql.Timestamp dateFrom = null;
break; java.sql.Timestamp dateTo = null;
if(eff_from !=null && eff_from.trim().length()>0 )
} {
effDate = Timestamp.valueOf(genericUtility.getValidDateString(eff_from, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
if(valid_upto !=null && valid_upto.trim().length()>0 )
{
validDate = Timestamp.valueOf(genericUtility.getValidDateString(valid_upto, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
}
System.out.println("siteCode"+siteCode+"custcode"+custcode+"eff_from"+eff_from+"valid_upto"+valid_upto);
System.out.println("effDate@@@"+effDate+"validDate@@@"+validDate);
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); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat());
String Sql = "SELECT COUNT(1) AS COUNT FROM cust_bypass_crchk WHERE site_code=? AND cust_code=?"; dbDateFrom = sDateFrom;
dbDateTo = sDateTo;
sDateFrom = genericUtility.getValidDateString(eff_from, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
dbDateFrom = genericUtility.getValidDateString(valid_upto, genericUtility.getApplDateFormat(), "dd-MMM-yy");
//cpatil-25/08/14-System.out.println("sDateFrom : " + sDateFrom);
// //cpatil-25/08/14-System.out.println();
dateFrom = java.sql.Timestamp.valueOf(sDateFrom + " 00:00:00");
sDateTo = genericUtility.getValidDateString(eff_from, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat());
dbDateTo = genericUtility.getValidDateString(valid_upto, genericUtility.getApplDateFormat(), "dd-MMM-yy");
dateTo = java.sql.Timestamp.valueOf(sDateTo + " 00:00:00");
//cpatil-25/08/14-System.out.println("Db Date from :" + dbDateFrom);
//cpatil-25/08/14-System.out.println("Db Date to :" + dbDateTo);
//SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat());
dateFromString = simpleDateFormat.format(dateFrom);
dateToString = simpleDateFormat.format(dateTo);*/
String Sql = "SELECT COUNT(1) AS COUNT FROM cust_bypass_crchk WHERE site_code=? AND cust_code=? and eff_from=? and valid_upto=?";
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,effDate);
// pstmt.setString(3,eff_from); pstmt.setTimestamp(4,validDate);
//pstmt.setString(4,valid_upto);
// pstmt.setTimestamp(4,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(valid_upto,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat())));
// pstmt.setString(5,reasCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
System.out.println("Sql@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" + Sql); System.out.println("Sql@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" + Sql);
if (rs.next()) if (rs.next())
...@@ -186,7 +207,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo ...@@ -186,7 +207,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
if (cnt == 0) { if (cnt == 0) {
errCode = "VTSITENEX"; errCode = "VTSITENEX";
errString = getErrorString("site_code", errString = getErrorString("site_code",
errCode, userId); errCode, userId);
break; break;
} }
} }
...@@ -224,9 +245,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo ...@@ -224,9 +245,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
} }
} }
//VMCREFRMB null eff from
//VMVALDTNUL valid upto
else if(childNodeName.equalsIgnoreCase("eff_from")) else if(childNodeName.equalsIgnoreCase("eff_from"))
{ {
System.out.println("validation EFF_FROM executed"); System.out.println("validation EFF_FROM executed");
...@@ -254,7 +273,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo ...@@ -254,7 +273,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);
...@@ -300,6 +319,10 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo ...@@ -300,6 +319,10 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
break ; break ;
} }
} }
} }
...@@ -539,6 +562,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo ...@@ -539,6 +562,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
} }
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