Commit a4ab8db2 authored by dpingle's avatar dpingle

* updated component on [15/10/19]

EmpLeaveConf.java
ItRetAdjProcIC.java
ItRetAdjProcPrc.java


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@209655 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0f8cc7f0
...@@ -379,7 +379,7 @@ public class ItRetAdjProcIC extends ValidatorEJB implements ItRetAdjProcLocal, I ...@@ -379,7 +379,7 @@ public class ItRetAdjProcIC extends ValidatorEJB implements ItRetAdjProcLocal, I
String descr = ""; String descr = "";
String toDateDescr = ""; String toDateDescr = "";
String frDateDescr = ""; String frDateDescr = "";
String loginSite = = ""; String loginSite = "";
int qtrNo = 0; int qtrNo = 0;
int cnt = 0; int cnt = 0;
......
...@@ -50,6 +50,7 @@ public class ItRetAdjProcPrc extends ProcessEJB implements ItRetAdjProcPrcLoca ...@@ -50,6 +50,7 @@ public class ItRetAdjProcPrc extends ProcessEJB implements ItRetAdjProcPrcLoca
String loginSite = ""; String loginSite = "";
String jobId = ""; String jobId = "";
String objName = ""; String objName = "";
String errString = "";
String loginEmpCode = ""; // 10/10/2019 String loginEmpCode = ""; // 10/10/2019
Connection logConn = null; Connection logConn = null;
Connection conn = null; Connection conn = null;
......
package ibase.webitm.ejb.adm.adv; package ibase.webitm.ejb.adm.adv;
//Changes done by Varsha V on 03-09-19 as per suggested by Sir import ibase.system.config.AppConnectParm;//Added by Anjali Rawankar on[21/08/2017][For ITMDBACCESS]
//import ibase.system.config.AppConnectParm;//Added by Anjali Rawankar on[21/08/2017][For ITMDBACCESS]
import ibase.system.config.*;
import ibase.utility.CommonConstants; import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility; import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.ActionHandlerEJB; import ibase.webitm.ejb.ActionHandlerEJB;
...@@ -42,6 +40,21 @@ import org.w3c.dom.Node; ...@@ -42,6 +40,21 @@ import org.w3c.dom.Node;
import org.w3c.dom.NodeList; import org.w3c.dom.NodeList;
//import org.drools.lang.DRLParser.normal_lhs_block_return; //import org.drools.lang.DRLParser.normal_lhs_block_return;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.webitm.bean.sys.ProteusDataSource;
import ibase.webitm.ejb.ActionHandlerEJB;
import ibase.webitm.ejb.ITMDBAccessEJB;//Added by sarita on[20/07/2018][For ITMDBACCESS]
//import ibase.webitm.ejb.ITMDBAccessLocal;//Added by Anjali Rawankar on[21/08/2017][For ITMDBACCESS]
import ibase.webitm.ejb.adm.AdmCommon;
import ibase.webitm.ejb.adm.AttdProcess;
import ibase.webitm.ejb.adm.LeaveEncase;
import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.ejb.hrp.leave.EmpLeaveIC;
import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.utility.DB2XMLGenerator;
import ibase.webitm.utility.ITMException;
@Stateless @Stateless
public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,EmpLeaveConfRemote public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,EmpLeaveConfRemote
...@@ -188,7 +201,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -188,7 +201,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
//retString = postLogic(tranId, tranId, 2, xtraParams, conn); commented and added by Varsha V on 24-Jul-18 //retString = postLogic(tranId, tranId, 2, xtraParams, conn); commented and added by Varsha V on 24-Jul-18
retString = postLogic(tranId, tranId, commitFlag, xtraParams, conn); retString = postLogic(tranId, tranId, commitFlag, xtraParams, conn);
System.out.println("retString--["+retString+"]"); System.out.println("retString--["+retString+"]");
System.out.println("return Error List of Post Logic ::["+this.errList+"]===this.fldList["+this.fldList+"]"); System.out.println("return Error List of Post Logic :: "+this.errList);
//Modified by Anjali R. on [03/06/2019][Start] //Modified by Anjali R. on [03/06/2019][Start]
if (retString != null && retString.trim().length() > 0) if (retString != null && retString.trim().length() > 0)
{ {
...@@ -212,10 +225,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -212,10 +225,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
for (cnt = 0; cnt < this.errList.size(); cnt++ ) for (cnt = 0; cnt < this.errList.size(); cnt++ )
{ {
errCode = (String)this.errList.get(cnt); errCode = (String)this.errList.get(cnt);
if(this.fldList.size() > 0)
{
errFldName = (String)this.fldList.get(cnt); errFldName = (String)this.fldList.get(cnt);
}
System.out.println("errCode .........."+errCode); System.out.println("errCode .........."+errCode);
/*Modified by Anjali Rawankar on[22/08/2017][Start] /*Modified by Anjali Rawankar on[22/08/2017][Start]
...@@ -239,7 +249,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -239,7 +249,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
this.errList = null; this.errList = null;
this.fldList.clear(); this.fldList.clear();
this.fldList = null; this.fldList = null;
} }
if (errString == null || errString.trim().length() == 0) if (errString == null || errString.trim().length() == 0)
{ {
...@@ -824,7 +833,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -824,7 +833,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
*/ */
//Modified by Anjali R. on [03/06/2019][Start] //Modified by Anjali R. on [03/06/2019][Start]
//returnValue = boEmpleave.checkNegAdvLveRules(leaveDom, allowAdvleave, workSite,cadre,grade,lveTable, "C",this.lveRuleList, conn); //returnValue = boEmpleave.checkNegAdvLveRules(leaveDom, allowAdvleave, workSite,cadre,grade,lveTable, "C",this.lveRuleList, conn);
returnValue = boEmpleave.checkNegAdvLveRules(allowAdvleave, workSite,cadre,grade,lveTable, "C",this.lveRuleList, conn); returnValue = boEmpleave.checkNegAdvLveRules(leaveDom, allowAdvleave, workSite,cadre,grade,lveTable, "C",this.lveRuleList, conn);
//Modified by Anjali R. on [03/06/2019][End] //Modified by Anjali R. on [03/06/2019][End]
HashMap retHMap = boEmpleave.getClassVariables(); HashMap retHMap = boEmpleave.getClassVariables();
if( returnValue == -9 ) if( returnValue == -9 )
...@@ -1435,9 +1444,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -1435,9 +1444,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
noRows = 0; noRows = 0;
sql ="sELECT COUNT(*) AS COUNT FROM EMPLEAVE WHERE EMP_CODE = ? AND LVE_DATE_FR >= ? "+ sql ="sELECT COUNT(*) AS COUNT FROM EMPLEAVE WHERE EMP_CODE = ? AND LVE_DATE_FR >= ? "+
" AND LVE_DATE_TO <= ? AND LVE_CODE = ? AND STATUS = 'A' "+ " AND LVE_DATE_TO <= ? AND LVE_CODE = ? AND STATUS = 'A' "+
//Commented and changed by Varsha V as per suggested by Piyush Sir on 03-09-2019 " AND USE_FLAG = 'C' AND TRAN_ID <> NVL(?,' ')";
//" AND USE_FLAG = 'C' AND TRAN_ID <> NVL(?,' ')";
" AND USE_FLAG = 'C' AND TRAN_ID <> ?";
pstmt = connectionObject.prepareStatement(sql); pstmt = connectionObject.prepareStatement(sql);
pstmt.setString(1,memp); pstmt.setString(1,memp);
pstmt.setTimestamp(2,lveFrDt); pstmt.setTimestamp(2,lveFrDt);
...@@ -1916,12 +1923,8 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -1916,12 +1923,8 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
System.out.println("holType---["+holType+"]"); System.out.println("holType---["+holType+"]");
if(holType != null && holType.trim().length() > 0) if(holType != null && holType.trim().length() > 0)
{ {
//Modified by Anjali R. on[25/03/2019][Start] System.out.println("utilMethod.pos(holType, \"HW\")--["+utilMethod.pos(holType, "HW")+"]");
/*System.out.println("utilMethod.pos(holType, \"HW\")--["+utilMethod.pos(holType, "HW")+"]"); if(utilMethod.pos(holType, "HW") == 0 )
if(utilMethod.pos(holType, "HW") == 0 )*/
System.out.println("utilMethod.pos(holType, \"HW\")--["+utilMethod.pos("HW",holType)+"]");
if(utilMethod.pos ("HW",holType) == 0 )
//Modified by Anjali R. on[25/03/2019][End]
{ {
errCode = holType; errCode = holType;
return errCode; return errCode;
...@@ -1963,10 +1966,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -1963,10 +1966,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
lve = checkNull(rs.getString("lve_code")); lve = checkNull(rs.getString("lve_code"));
nextLveStart = checkNull(rs.getString("leave_ends")); nextLveStart = checkNull(rs.getString("leave_ends"));
//Modified by sarita on 04-10-2019 [START] pstmt.setString(1, lve);
//pstmt.setString(1, lve);
pstmt1.setString(1, lve);
//Modified by sarita on 04-10-2019 [END]
rs1 = pstmt1.executeQuery(); rs1 = pstmt1.executeQuery();
while(rs1.next()) while(rs1.next())
{ {
...@@ -2065,10 +2065,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -2065,10 +2065,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
System.out.println("holType--["+holType+"]"); System.out.println("holType--["+holType+"]");
if(holType != null && holType.trim().length() > 0) if(holType != null && holType.trim().length() > 0)
{ {
//Modified by Anjali R. on[25/03/2019][Start] if(utilMethod.pos(holType , "HW") == 0)
//if(utilMethod.pos(holType , "HW") == 0)
if(utilMethod.pos("HW",holType) == 0)
//Modified by Anjali R. on[25/03/2019][End]
{ {
errCode = holType; errCode = holType;
} }
...@@ -2103,10 +2100,8 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -2103,10 +2100,8 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
lve = checkNull(rs.getString("lve_code")); lve = checkNull(rs.getString("lve_code"));
nextLveStart = checkNull(rs.getString("leave_starts")); nextLveStart = checkNull(rs.getString("leave_starts"));
//Modified by sarita on 04-10-2019 [START]
//pstmt.setString(1, lve); pstmt.setString(1, lve);
pstmt1.setString(1, lve);
//Modified by sarita on 04-10-2019 [END]
rs1 = pstmt1.executeQuery(); rs1 = pstmt1.executeQuery();
while(rs1.next()) while(rs1.next())
{ {
...@@ -3498,7 +3493,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -3498,7 +3493,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
boolean isError = false; boolean isError = false;
java.sql.Timestamp toDate = null,tempDate = null; java.sql.Timestamp toDate = null,tempDate = null;
String sql = ""; String sql = "";
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet resultSet = null; ResultSet resultSet = null;
...@@ -3508,7 +3502,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -3508,7 +3502,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
days = noDays; days = noDays;
do do
{ {
sql = "SELECT CODE,FR_DATE,TO_DATE FROM PERIOD WHERE FR_DATE <= ? AND TO_DATE >= ?"; sql = "SELECT CODE,FR_DATE,TO_DATE FROM PERIOD WHERE FR_DATE <= ? AND TO_DATE >= ?";
pstmt = connectionObject.prepareStatement(sql); pstmt = connectionObject.prepareStatement(sql);
pstmt.setTimestamp(1 ,tempDate); pstmt.setTimestamp(1 ,tempDate);
...@@ -3516,13 +3509,10 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -3516,13 +3509,10 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
resultSet = pstmt.executeQuery(); resultSet = pstmt.executeQuery();
while(resultSet.next()) while(resultSet.next())
{ {
//Modified by Anjali R. on [18/07/2019][Start]
//period = resultSet.getString("");
period = resultSet.getString("CODE"); period = resultSet.getString("CODE");
//Modified by Anjali R. on [18/07/2019][End]
toDate = resultSet.getTimestamp("TO_DATE"); toDate = resultSet.getTimestamp("TO_DATE");
} }
if(resultSet != null) if(resultSet != null)
{ {
resultSet.close(); resultSet.close();
...@@ -3533,8 +3523,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -3533,8 +3523,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
if(toDate.after(lvedtTo)) if(toDate.after(lvedtTo))
{ {
toDate = lvedtTo; toDate = lvedtTo;
...@@ -3558,6 +3546,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -3558,6 +3546,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
{ {
noDays1 = resultSet.getDouble("NO_DAYS"); noDays1 = resultSet.getDouble("NO_DAYS");
} }
if(resultSet != null) if(resultSet != null)
{ {
resultSet.close(); resultSet.close();
...@@ -3614,7 +3603,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -3614,7 +3603,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
} }
catch (Exception fe) catch (Exception fe)
{ {
...@@ -3678,10 +3666,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -3678,10 +3666,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
EmpLeaveIC empLeave = null; EmpLeaveIC empLeave = null;
// Modified by Piyush on 12/01/2018 [To update no of days considering weekly off/holidays as perleave rules. Sun CCF No: IT2016-073 - Request ID: A16ISUN003].End // Modified by Piyush on 12/01/2018 [To update no of days considering weekly off/holidays as perleave rules. Sun CCF No: IT2016-073 - Request ID: A16ISUN003].End
// Modified by Anjali R. on 11/06/2019 [To track no of days adjusted in summary and balance days to be adjusted as some time weekly offs get changed afterwords][Start]
double lcLveSumTotdays = 0.0;
// Modified by Anjali R. on 11/06/2019 [To track no of days adjusted in summary and balance days to be adjusted as some time weekly offs get changed afterwords][End]
try try
{ {
empLeave = new EmpLeaveIC(); empLeave = new EmpLeaveIC();
...@@ -3720,6 +3704,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -3720,6 +3704,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
lveStart = checkNull(resultSet.getString("LEAVE_STARTS")); lveStart = checkNull(resultSet.getString("LEAVE_STARTS"));
lveEnd = checkNull(resultSet.getString("LEAVE_ENDS")); lveEnd = checkNull(resultSet.getString("LEAVE_ENDS"));
} }
if(resultSet != null) if(resultSet != null)
{ {
resultSet.close(); resultSet.close();
...@@ -3839,10 +3824,8 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -3839,10 +3824,8 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
break; break;
} }
} }
System.out.println("========errCd=====["+errCd+"]");
noRows = 0; noRows = 0;
if(errCd !=null && errCd.trim().length() > 0) if(errCd.trim().length() > 0)
{ {
errCode = "VTDATE5"; errCode = "VTDATE5";
this.errList.add(errCode); this.errList.add(errCode);
...@@ -4344,7 +4327,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -4344,7 +4327,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
} }
else else
{ {
System.out.println("Inside ==[4318]");
errCode = "VTEMPLVE4"; errCode = "VTEMPLVE4";
this.errList.add(errCode); this.errList.add(errCode);
this.fldList.add(""); this.fldList.add("");
...@@ -4354,7 +4336,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -4354,7 +4336,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
} }
else else
{ {
System.out.println("Inside ==[4328]");
errCode = "VTEMPLVE4"; errCode = "VTEMPLVE4";
this.errList.add(errCode); this.errList.add(errCode);
this.fldList.add(""); this.fldList.add("");
...@@ -4414,6 +4395,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -4414,6 +4395,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
/*[Purpose : Used date method of UtilMethod.java] /*[Purpose : Used date method of UtilMethod.java]
*Modified by Anjali Rawankar on [20/09/2017][End] *Modified by Anjali Rawankar on [20/09/2017][End]
*/ */
{ {
noDays = noDays - 0.5; noDays = noDays - 0.5;
} }
...@@ -4443,7 +4425,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -4443,7 +4425,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
{ {
lsendtemp = "E"; lsendtemp = "E";
} }
lihwdays = Double.parseDouble( empLeave.gbfGetHwDay(mEmp, mDate, tempToDt, mLveCode, lsstarttemp, lsendtemp, mDate1, mDate2, connectionObject)); lihwdays = empLeave.gbfGetHwDay(mEmp, mDate, tempToDt, mLveCode, lsstarttemp, lsendtemp, mDate1, mDate2, connectionObject);
System.out.println("lihwdays===["+lihwdays+"]"); System.out.println("lihwdays===["+lihwdays+"]");
if(lihwdays < 0) if(lihwdays < 0)
{ {
...@@ -4465,6 +4447,8 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -4465,6 +4447,8 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
mDate2 = mDate1; mDate2 = mDate1;
noDays = mDays; noDays = mDays;
} }
noRows = 0; noRows = 0;
System.out.println("tranId: ["+tranId+"]"+"mEmp: ["+mEmp+"] mLveCode: ["+mLveCode+"] noDays: [" System.out.println("tranId: ["+tranId+"]"+"mEmp: ["+mEmp+"] mLveCode: ["+mLveCode+"] noDays: ["
+noDays+"] period: ["+period+"] mDate1: ["+mDate1+"] mDate2: ["+mDate2+"] museFlag: ["+museFlag+"]"); +noDays+"] period: ["+period+"] mDate1: ["+mDate1+"] mDate2: ["+mDate2+"] museFlag: ["+museFlag+"]");
...@@ -4498,10 +4482,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -4498,10 +4482,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
isError = true; isError = true;
break; break;
} }
//Modified by Anjali R. on [28/06/2019][To track no of days adjusted in summary and balance days to be adjusted as some time weekly offs get changed afterwords][Start]
lcLveSumTotdays = lcLveSumTotdays + noDays;
//Modified by Anjali R. on [28/06/2019][To track no of days adjusted in summary and balance days to be adjusted as some time weekly offs get changed afterwords][End]
if (utilMethod.pos("ELVA" , museFlag) > 0) if (utilMethod.pos("ELVA" , museFlag) > 0)
{ {
break; break;
...@@ -4520,62 +4500,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -4520,62 +4500,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
{ {
break; break;
} }
//Modified by Anjali R. on [28/06/2019][To track no of days adjusted in summary and balance days to be adjusted as some time weekly offs get changed afterwords][Start] if(museFlag.equals("V"))
if( utilMethod.pos("ELVA" , museFlag) == 0)
{
if (lcLveSumTotdays < mDays)
{
lcLveSumTotdays = mDays - lcLveSumTotdays;
period = "";
sql = "select max(prd_code) as max_period from empleave_summary where tran_id = ? and emp_code = ? and lve_code = ?";
pstmt = connectionObject.prepareStatement(sql);
pstmt.setString(1, tranId);
pstmt.setString(2, mEmp);
pstmt.setString(3, mLveCode);
resultSet = pstmt.executeQuery();
if(resultSet.next())
{
period = checkNull(resultSet.getString("max_period"));
}
if(resultSet != null)
{
resultSet.close();
resultSet = null;
}
if(pstmt != null)
{
pstmt.close();
pstmt = null;
}
if(period == null || period.trim().length() == 0)
{
errCode = "DS000";
this.errList.add(errCode);
this.fldList.add("");
isError = true;
break;
}
sql = "update empleave_summary set no_days = no_days + ? where tran_id = ? and emp_code = ? and prd_code = ? and lve_code = ?";
pstmt = connectionObject.prepareStatement(sql);
pstmt.setDouble(1, noDays);
pstmt.setString(2, tranId);
pstmt.setString(3, mEmp);
pstmt.setString(4, period);
pstmt.setString(5, mLveCode);
int cnt = pstmt.executeUpdate();
if(cnt != 1)
{
errCode = "DS000NR";
this.errList.add(errCode);
this.fldList.add("");
isError = true;
break;
}
}
}
//Modified by Anjali R. on [28/06/2019][To track no of days adjusted in summary and balance days to be adjusted as some time weekly offs get changed afterwords][End]
if(museFlag.equalsIgnoreCase("V"))
{ {
sql = ""; sql = "";
sql = "SELECT LVE_CODE__CONVERT FROM LEAVES WHERE LVE_CODE = ?"; sql = "SELECT LVE_CODE__CONVERT FROM LEAVES WHERE LVE_CODE = ?";
...@@ -5041,7 +4966,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -5041,7 +4966,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
{ {
fe.printStackTrace(); fe.printStackTrace();
} }
} }
return errCode; return errCode;
...@@ -5124,6 +5048,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -5124,6 +5048,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
cadre = resultSet.getString("CADRE"); cadre = resultSet.getString("CADRE");
grade = resultSet.getString("GRADE"); grade = resultSet.getString("GRADE");
} }
if(resultSet != null) if(resultSet != null)
{ {
resultSet.close(); resultSet.close();
...@@ -5336,12 +5261,12 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -5336,12 +5261,12 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
availFrom = dateJoin; availFrom = dateJoin;
process = "Y"; process = "Y";
} }
else else
{ {
availFrom = dateJoin; availFrom = dateJoin;
process = "Y"; process = "Y";
} }
if (availAterMonths == 0) if (availAterMonths == 0)
{ {
availAterMonths = 0; availAterMonths = 0;
...@@ -5381,14 +5306,13 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -5381,14 +5306,13 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
pstmt.close(); pstmt.close();
pstmt = null; pstmt = null;
} }
} }
lveFrDt1 = utilMethod.dateTime(lveFrDate1); lveFrDt1 = utilMethod.dateTime(lveFrDate1);
lveToDt1 = utilMethod.dateTime(lveToDate1); lveToDt1 = utilMethod.dateTime(lveToDate1);
// Modified by Anjali R on 02/02/2019 [To restrict expiry date till '2034' because of no of months can be more then this].Start // Modified by Piyush on 02/02/2019 [To restrict expiry date till '2034' because of no of months can be more then this].Start
int litempyear = 0; int litempyear = 0;
litempyear = utilMethod.year(utilMethod.date(lveToDt1)); litempyear = utilMethod.year(utilMethod.date(lveToDt1));
if (litempyear < 100) if (litempyear < 100)
...@@ -5400,7 +5324,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -5400,7 +5324,7 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
{ {
accumulateMonths = 24408 - litempyear; accumulateMonths = 24408 - litempyear;
} }
// Modified by Anjali R on 02/02/2019 [To restrict expiry date till '2036' because of no of months can be more then this].End // Modified by Piyush on 02/02/2019 [To restrict expiry date till '2036' because of no of months can be more then this].End
if("Y".equalsIgnoreCase(accumulate)) if("Y".equalsIgnoreCase(accumulate))
{ {
...@@ -5413,8 +5337,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -5413,8 +5337,6 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
expDate = lveToDt1; expDate = lveToDt1;
} }
} }
if(lveFrDate1.before(newEffDate)) if(lveFrDate1.before(newEffDate))
{ {
effDate = newEffDate; effDate = newEffDate;
...@@ -5461,16 +5383,10 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal, ...@@ -5461,16 +5383,10 @@ public class EmpLeaveConf extends ActionHandlerEJB implements EmpLeaveConfLocal,
break; break;
} }
noRows = 0; noRows = 0;
//Modified by Anjali R. on[18/07/2019][Start]
/*sql = "INSERT INTO LEAVEBAL"+
"(EMP_CODE,LVE_CODE,EFF_DATE,UPTO_DATE,EXP_DATE,EDIT_FLAG,AVAIL_DAYS, CONS_DAYS,"+
"ENCH_DAYS,BAL_DAYS,PREV_BAL,ENCASHABLE,ACCT_PRD,CHG_DATE,CHG_USER,CHG_TERM,CONV_DAYS)"+
"VALUES(?,?,?,?,?,'A',0,0,0,0,0,?,?,SYSDATE,?,?,0)";*/
sql = "INSERT INTO LEAVEBAL"+ sql = "INSERT INTO LEAVEBAL"+
"(EMP_CODE,LVE_CODE,EFF_DATE,UPTO_DATE,EXP_DATE,EDIT_FLAG,AVAIL_DAYS, CONS_DAYS,"+ "(EMP_CODE,LVE_CODE,EFF_DATE,UPTO_DATE,EXP_DATE,EDIT_FLAG,AVAIL_DAYS, CONS_DAYS,"+
"ENCH_DAYS,BAL_DAYS,PREV_BAL,ENCASHABLE,ACCT_PRD,CHG_DATE,CHG_USER,CHG_TERM,CONV_DAYS)"+ "ENCH_DAYS,BAL_DAYS,PREV_BAL,ENCASHABLE,ACCT_PRD,CHG_DATE,CHG_USER,CHG_TERM,CONV_DAYS)"+
"VALUES(?,?,?,?,?,'P',0,0,0,0,0,?,?,SYSDATE,?,?,0)"; "VALUES(?,?,?,?,?,'P',0,0,0,0,0,?,?,SYSDATE,?,?,0)";
//Modified by Anjali R. on[18/07/2019][End]
pstmt = connectionObject.prepareStatement(sql); pstmt = connectionObject.prepareStatement(sql);
pstmt.setString(1,empCode); pstmt.setString(1,empCode);
pstmt.setString(2,lveCode); pstmt.setString(2,lveCode);
......
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