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
String valid_upto="";
String reasCode="";
String description="";
String dateFormat = "";
int currentFormNo = 0;
int childNodeListLength;
Connection conn = null;
......@@ -116,31 +116,52 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
int seriCount = 0;
siteCode = genericUtility.getColumnValue("site_code", dom);
custcode = genericUtility.getColumnValue("cust_code", dom);
eff_from=genericUtility.getColumnValue("eff_from", dom);
valid_upto=genericUtility.getColumnValue("valid_upto", dom);
eff_from=checkNull(genericUtility.getColumnValue("eff_from", dom));
valid_upto=checkNull(genericUtility.getColumnValue("valid_upto", dom));
reasCode=genericUtility.getColumnValue("reas_code", dom);
// 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);
break;
}
String sDateFrom = "";
String sDateTo = "";
String dbDateFrom = "";
String dbDateTo = "";
String dateFromString = "";
String dateToString = "";
java.sql.Timestamp dateFrom = null;
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 Sql = "SELECT COUNT(1) AS COUNT FROM cust_bypass_crchk WHERE site_code=? AND cust_code=?";
/* //String col2 = genericUtility.getColumnValue("tax_chap",dom);
SimpleDateFormat simpleDateFormat = new SimpleDateFormat(genericUtility.getDBDateFormat());
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.setString(1,siteCode);
pstmt.setString(2,custcode);
//pstmt.setTimestamp(3,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(eff_from,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat())));
// pstmt.setString(3,eff_from);
//pstmt.setString(4,valid_upto);
// pstmt.setTimestamp(4,java.sql.Timestamp.valueOf(genericUtility.getValidDateTimeString(valid_upto,genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat())));
// pstmt.setString(5,reasCode);
pstmt.setTimestamp(3,effDate);
pstmt.setTimestamp(4,validDate);
rs = pstmt.executeQuery();
System.out.println("Sql@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@" + Sql);
if (rs.next())
......@@ -186,7 +207,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
if (cnt == 0) {
errCode = "VTSITENEX";
errString = getErrorString("site_code",
errCode, userId);
errCode, userId);
break;
}
}
......@@ -224,9 +245,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
}
}
//VMCREFRMB null eff from
//VMVALDTNUL valid upto
else if(childNodeName.equalsIgnoreCase("eff_from"))
{
System.out.println("validation EFF_FROM executed");
......@@ -254,7 +273,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
{
System.out.println("eff_from"+eff_from);
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");
validDate = Timestamp.valueOf(genericUtility.getValidDateString(valid_upto, genericUtility.getApplDateFormat(),genericUtility.getDBDateFormat()) + " 00:00:00.0");
System.out.println("effDate"+effDate);
......@@ -300,6 +319,10 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
break ;
}
}
}
......@@ -539,6 +562,7 @@ public class CustCreditByPass extends ValidatorEJB implements CustCreditByPassLo
}
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