Commit e9872038 authored by vvengurlekar's avatar vvengurlekar

EmpLeaveConf.java - commit statement written outside confirm method

EmpLvePrkBalTrfCanc.java
EmpLvePrkBalTrfConf.java - changes done for emp lve and prk transfer
EmpLvePrkBalTrfIC.java - 


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@188700 ce508802-f39f-4f6c-b175-0d175dae99d5
parent b3ec1f5f
......@@ -3,7 +3,6 @@ package ibase.webitm.ejb.adm;
import ibase.system.config.AppConnectParm;
import ibase.system.config.ConnDriver;
import ibase.utility.E12GenericUtility;//Modified By Hemlata on[20/11/2014] [As per changes in framework to use genericUtility ]
import ibase.webitm.ejb.ITMDBAccessEJB;
import ibase.webitm.ejb.ITMDBAccessLocal;
import ibase.webitm.ejb.ValidatorEJB;
import ibase.webitm.utility.ITMException;
......@@ -534,6 +533,7 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC
String siteCodeFrom = "";
String siteCodeTo = "";
java.util.Date joinDate = null ;
Date currentDate = new Date();
String tranMode = "", joinDateStr="", retString = "";
E12GenericUtility genericUtility = new E12GenericUtility();
......@@ -694,7 +694,16 @@ public class EmpLvePrkBalTrfIC extends ValidatorEJB implements EmpLvePrkBalTrfIC
retString = itmDBAccess.getErrorString( "", "VTELPTRF05", userId, "", conn );
return retString;
}
//Added by Varsha V on 16-07-18 for adding condition of relieving date should less than current date
currentDate = new java.util.Date();
System.out.println("currentDate:::["+currentDate+"] relieveDate:::["+relieveDate+"]");
if(relieveDate.after(currentDate))
{
System.out.println("relieveDate is not greater than currentDate ::::");
retString = itmDBAccess.getErrorString( "", "VTELPTRF22", userId, "", conn );
return retString;
}
//Ended by Varsha V on 16-07-18 for adding condition of relieving date should less than current date
sql = "SELECT USR_LEV FROM USERS WHERE CODE = ? ";
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, loginCode );
......
......@@ -98,6 +98,16 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
try
{
retString = confirm( tranId, xtraParams, forcedFlag, 2, conn);
//Added by varsha V on 03-08-18 for Commit statement
if(retString.contains("VTSUCC1"))
{
conn.commit();
}
else
{
conn.rollback();
}
//Ended by varsha V on 03-08-18 for Commit statement
}
catch(Exception e)
{
......@@ -214,7 +224,8 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
}
if (errString == null || errString.trim().length() == 0)
{
conn.commit();
//commented commit statement by varsha V on 03-08-18
//conn.commit();
/*Modified by Anjali Rawankar on[22/08/2017][Start]
*[Added for itmDbAccess]*/
//errString = getErrorString( "", "VTSUCC1" , this.userId );
......@@ -225,10 +236,11 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
/*[Added for itmDbAccess]
*Modified by Anjali Rawankar on[22/08/2017][End]*/
}
else
//commented rollback statement by varsha V on 03-08-18
/*else
{
conn.rollback();
}
}*/
}
catch(Exception e)
{
......
......@@ -138,11 +138,14 @@ public class EmpLvePrkBalTrfCanc extends ActionHandlerEJB implements EmpLvePrkBa
}
else
{
sql=" UPDATE EMP_LVEPRKBAL_TRFHDR SET STATUS = ?, STATUS_DATE = ? WHERE TRAN_ID= ? ";
sql=" UPDATE EMP_LVEPRKBAL_TRFHDR SET STATUS = ?, STATUS_DATE = ?, EMP_CODE__CONF = ? WHERE TRAN_ID= ? ";
pstmt = conn.prepareStatement( sql );
pstmt.setString( 1, "X" );
pstmt.setTimestamp( 2, new java.sql.Timestamp( System.currentTimeMillis() ) );
pstmt.setString( 3, tranId );
// Added by Varsha V on 16/07/18 for updating EMP_CODE__CONF also
pstmt.setString( 3, userId );
// Ended by Varsha V on 16/07/18 for updating EMP_CODE__CONF also
pstmt.setString( 4, tranId );
pstmt.executeUpdate();
updCnt = pstmt.executeUpdate();
if( updCnt > 0 )
......
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