Commit de9b78b0 authored by sanashaikh's avatar sanashaikh

Sana S: Modified on 07/01/2020

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@214699 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 02bc0b45
......@@ -505,12 +505,23 @@ public class HolChangeIC extends ValidatorEJB implements HolChangeICRemote, HolC
holDateFor = checkNull(genericUtility.getColumnValue("hol_date_for", dom));
holDateTo=checkNull(genericUtility.getColumnValue("hol_date_to", dom));
//
Timestamp holdatefor = Timestamp.valueOf(genericUtility.getValidDateTimeString(holDateFor,
genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()));
Timestamp holdateto = Timestamp.valueOf(genericUtility.getValidDateTimeString(holDateTo,
genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()));
//
sql="select count(1) as cnt from change_holiday where emp_code= ? and hol_date_for=? and hol_date_to = ? and hol_type= ?";
pstmt = connectionObject.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setString(2, holDateFor);
pstmt.setString(3, holDateTo);
//Modified by Sana S on 07/01/2020 [start]
// pstmt.setString(2, holDateFor);
//pstmt.setString(3, holDateTo);
pstmt.setTimestamp(2, holdatefor);
pstmt.setTimestamp(3, holdateto);
//Modified by Sana S on 07/01/2020 [end]
pstmt.setString(4, holType);
//pstmt.setString(5, effDateStr);
resultSet = pstmt.executeQuery();
......@@ -547,7 +558,9 @@ public class HolChangeIC extends ValidatorEJB implements HolChangeICRemote, HolC
System.out.println("line --509");
empCode =checkNull(genericUtility.getColumnValue("emp_code", dom));
holDateFor = checkNull(genericUtility.getColumnValue("hol_date_for", dom));
dateFor = Timestamp.valueOf(genericUtility.getValidDateString(holDateFor, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");////Modified by Sana S on 19/11/19
// dateFor = Timestamp.valueOf(genericUtility.getValidDateString(holDateFor, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()) + " 00:00:00.0");////Modified by Sana S on 19/11/19
dateFor = Timestamp.valueOf(genericUtility.getValidDateTimeString(holDateFor, genericUtility.getApplDateFormat(), genericUtility.getDBDateFormat()));////Modified by Sana S on 07/01/2020
System.out.println("holDateFor::::"+holDateFor);
......@@ -575,8 +588,8 @@ public class HolChangeIC extends ValidatorEJB implements HolChangeICRemote, HolC
sql = "select count(1) as cnt from holiday where hol_date = ? and hol_tblno = ? ";
pstmt = connectionObject.prepareStatement(sql);
//pstmt.setTimestamp(1, dateFor);
pstmt.setString(1, holDateFor);//Modified on 19/11/19
pstmt.setTimestamp(1, dateFor);//Modified on 07/01/20
//pstmt.setString(1, holDateFor);//Modified on 19/11/19
pstmt.setString(2, hol);
resultSet = pstmt.executeQuery();
......@@ -616,8 +629,8 @@ public class HolChangeIC extends ValidatorEJB implements HolChangeICRemote, HolC
sql = "select fn_get_holtblno(?,?) as ls_hol from dual";
pstmt = connectionObject.prepareStatement(sql);
pstmt.setString(1, empCode);
//pstmt.setTimestamp(2, dateFor);
pstmt.setString(2, holDateFor);////Modified on 19/11/19
pstmt.setTimestamp(2, dateFor);//Modified on 07/01/2020
//pstmt.setString(2, holDateFor);////Modified on 19/11/19
resultSet = pstmt.executeQuery();
if(resultSet.next())
......@@ -637,8 +650,8 @@ public class HolChangeIC extends ValidatorEJB implements HolChangeICRemote, HolC
sql = "select count(*) as cnt from holiday where hol_date = ? and hol_tblno = ?";
pstmt = connectionObject.prepareStatement(sql);
//pstmt.setTimestamp(1, dateTo);
pstmt.setString(1, holDateTo);
pstmt.setTimestamp(1, dateTo);//Modified by Sana S on 07/01/2020
//pstmt.setString(1, holDateTo);
pstmt.setString(2, hol);
resultSet = pstmt.executeQuery();
......@@ -652,8 +665,8 @@ public class HolChangeIC extends ValidatorEJB implements HolChangeICRemote, HolC
pstmt = connectionObject.prepareStatement(sql);
pstmt.setString(1, empCode);
pstmt.setString(2, hol);
//pstmt.setTimestamp(3, dateTo);
pstmt.setString(3, holDateTo);//Modified by Sana S on 19/11/19
pstmt.setTimestamp(3, dateTo);//Modified by Sana S on 07/01/2020
//pstmt.setString(3, holDateTo);//Modified by Sana S on 19/11/19
pstmt.setString(4, "Y");
resultSet = pstmt.executeQuery();
......@@ -702,8 +715,8 @@ public class HolChangeIC extends ValidatorEJB implements HolChangeICRemote, HolC
sql = "select hol_type as ls_hol_type from holiday where hol_date = ? and hol_tblno = ? and hol_type = ?";
pstmt = connectionObject.prepareStatement(sql);
//pstmt.setTimestamp(1, dateFor);
pstmt.setString(1, holDateFor);//Modified by Sana S on 19/11/19
pstmt.setTimestamp(1, dateFor);//Modified by Sana S on 07/01/2020
//pstmt.setString(1, holDateFor);//Modified by Sana S on 19/11/19
pstmt.setString(2, hol);
pstmt.setString(3, holType);
resultSet = pstmt.executeQuery();
......
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