Commit ba52b218 authored by sanashaikh's avatar sanashaikh

Sana S: Modified on 05/03/20

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@217550 ce508802-f39f-4f6c-b175-0d175dae99d5
parent e3952496
......@@ -103,6 +103,7 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
if(retStr == null || retStr.trim().length() == 0)
{
conn.commit();
retStr = itmDBAccessEJB.getErrorString("","VTPRCSUCC ", userId, "", conn);
}
}
......@@ -194,7 +195,7 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
System.out.println("User Id in Process:"+userId);
conn = getConnection();
//conn = getConnection();
System.out.println("::::::::::::Inside Process::::::::::::");
logWriter.setCurrentProcess("LeaveConvertProcess");//Added by Sana S on 28/11/19
......@@ -596,7 +597,7 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
pstmt = null;
}
conn.commit();
//conn.commit();
}
catch (Exception e)
{
......@@ -666,6 +667,9 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
String empCodeTo = null,lveCode=null;
String fName= null,lName= null,mName= null,balDays= null,paySite= null,temp= null,procDate = null;
Date relieveDateNew=null;
Date effDateNew=null,expDateNew=null,uptoDateNew=null;
Timestamp ldProcess=null;//Added by Sana S on 31/12/19
Map dwDataMap = null;
......@@ -840,14 +844,14 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
//Modifed by Sana S on [27/02/20] [start]
//dwDataMap.put("relieve_date", sdf.format(rs.getDate("relieve_date")));
//dwDataMap.put("relieve_date", rs.getString("relieve_date"));
if(rs.getDate("relieve_date")==null)
relieveDateNew=rs.getDate("relieve_date");
if(relieveDateNew.equals(null))
{
dwDataMap.put("relieve_date", "");
}
else
{
dwDataMap.put("relieve_date", sdf.format(rs.getDate("relieve_date")));
dwDataMap.put("relieve_date",sdf.format(relieveDateNew));
}
......@@ -855,9 +859,44 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
/*dwDataMap.put("eff_date", rs.getDate("eff_date"));
dwDataMap.put("upto_date", rs.getDate("upto_date"));
dwDataMap.put("exp_date", rs.getDate("exp_date"));*/
dwDataMap.put("eff_date", sdf.format(rs.getDate("eff_date")));
dwDataMap.put("upto_date", sdf.format(rs.getDate("upto_date")));
dwDataMap.put("exp_date", sdf.format(rs.getDate("exp_date")));
effDateNew = rs.getDate("eff_date");
uptoDateNew = rs.getDate("upto_date");
expDateNew = rs.getDate("exp_date");
// check for effective date is null
if(effDateNew.equals(null))
{
dwDataMap.put("eff_date", "");
}
else
{
dwDataMap.put("eff_date",sdf.format(effDateNew));
}
// check for upto date is null
if(uptoDateNew.equals(null))
{
dwDataMap.put("upto_date", "");
}
else
{
dwDataMap.put("upto_date",sdf.format(uptoDateNew));
}
// check for exp date is null
if(expDateNew.equals(null))
{
dwDataMap.put("exp_date", "");
}
else
{
dwDataMap.put("exp_date",sdf.format(expDateNew));
}
/*dwDataMap.put("eff_date", sdf.format(effDateNew));
dwDataMap.put("upto_date", sdf.format(uptoDateNew));
dwDataMap.put("exp_date", sdf.format(expDateNew));*/
//Modifed by Sana S on [27/02/20] [end]
dwDataMap.put("bal_days", checkNull(rs.getString("bal_days")));
......@@ -1051,8 +1090,10 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
}
if(conn != null)
{conn.close();
conn=null;}
{
conn.close();
conn=null;
}
}
catch(Exception e)
{
......@@ -1077,7 +1118,7 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
try
{
conn=getConnection();
//conn=getConnection();
sql="select code, fr_date, to_date from period where code >= ? and code <= ? order by code";
pstmt = conn.prepareStatement(sql);
......@@ -1136,7 +1177,7 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
pstmt = null;
}
} catch (RemoteException | ITMException e) {
} catch (ITMException e) {
e.printStackTrace();
throw new ITMException(e);
}
......
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