Commit 69230947 authored by sanashaikh's avatar sanashaikh

Sana S: Modifed on 13/03/20

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@217834 ce508802-f39f-4f6c-b175-0d175dae99d5
parent a61740da
...@@ -393,27 +393,39 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal, ...@@ -393,27 +393,39 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
pstmt.setTimestamp(12, ldProcess); pstmt.setTimestamp(12, ldProcess);
//Modified by Sana S on 31/12/19 [end] //Modified by Sana S on 31/12/19 [end]
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
Date expDateDb=null;
while(rs.next()) while(rs.next())
{ {
rowCnt++; rowCnt++;
dwDataMap = new HashMap<>(); dwDataMap = new HashMap<>();
dwDataMap.put("emp_code", checkNull(rs.getString("emp_code"))); dwDataMap.put("emp_code", checkNull(rs.getString("emp_code")));
dwDataMap.put("lve_code", checkNull(rs.getString("lve_code"))); dwDataMap.put("lve_code", checkNull(rs.getString("lve_code")));
dwDataMap.put("exp_date", rs.getDate("exp_date")); // dwDataMap.put("exp_date", rs.getDate("exp_date"));
dwDataMap.put("eff_date",rs.getDate("eff_date")); dwDataMap.put("eff_date",rs.getDate("eff_date"));
dwDataMap.put("upto_date",rs.getDate("upto_date")); dwDataMap.put("upto_date",rs.getDate("upto_date"));
dwDataMap.put("bal_days", checkNull(rs.getString("bal_days"))); dwDataMap.put("bal_days", checkNull(rs.getString("bal_days")));
//expDate=rs.getDate("exp_date");// Commented by Sana S on 31/12/19 //expDate=rs.getDate("exp_date");// Commented by Sana S on 31/12/19
expDate=sdf.format(rs.getDate("exp_date")); // Modified by Sana S on 13/03/20 [start] to avoid null pointer exception while formating date.
expDateDb=rs.getDate("exp_date");
if(expDateDb == null)
{
expDate="";
}
else
{
expDate=sdf.format(expDateDb);
}
dwDataMap.put("exp_date", expDate);
//expDate=sdf.format(rs.getDate("exp_date"));
// Modified by Sana S on 13/03/20 [end] to avoid null pointer exception while formating date.
System.out.println("expDate>>>>"+expDate); System.out.println("expDate>>>>"+expDate);
//nextEff=utilMethod.dateTime(utilMethod.RelativeDate(utilMethod.date(Date.valueOf(expDate)), 1));// Commented by Sana S on 02/01/2020 //nextEff=utilMethod.dateTime(utilMethod.RelativeDate(utilMethod.date(Date.valueOf(expDate)), 1));// Commented by Sana S on 02/01/2020
dwDataMap.put("work_site", checkNull(rs.getString("work_site"))); dwDataMap.put("work_site", checkNull(rs.getString("work_site")));
//nextEff1=utilMethod.dateTime(utilMethod.RelativeDate(utilMethod.date(nextEff), 365));// Commented by Sana S on 02/01/2020 //nextEff1=utilMethod.dateTime(utilMethod.RelativeDate(utilMethod.date(nextEff), 365));// Commented by Sana S on 02/01/2020 because never used in process
//Modified by Sana S on 02/01/2020 [start] //Modified by Sana S on 02/01/2020 [start]
// chg_time=utilMethod.dateTime(utilMethod.today(), utilMethod.now()); // chg_time=utilMethod.dateTime(utilMethod.today(), utilMethod.now());
chg_time=sdf.format(utilMethod.dateTime(utilMethod.today(), utilMethod.now())); chg_time=sdf.format(utilMethod.dateTime(utilMethod.today(), utilMethod.now()));
...@@ -446,7 +458,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal, ...@@ -446,7 +458,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
workSite = (String) rowMap.get("work_site"); workSite = (String) rowMap.get("work_site");
lveCode = (String) rowMap.get("lve_code"); lveCode = (String) rowMap.get("lve_code");
balDays = (String) rowMap.get("bal_days"); balDays = (String) rowMap.get("bal_days");
expDate= (String) rowMap.get("exp_date");// Added by Sana S on 13/03/20
System.out.println("lcPrevBal = "+lcPrevBal+"\nlsEmpCode = "+lsEmpCode+"\nlsLveCode = "+workSite); System.out.println("lcPrevBal = "+lcPrevBal+"\nlsEmpCode = "+lsEmpCode+"\nlsLveCode = "+workSite);
xmlValues = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>"; xmlValues = "<?xml version=\"1.0\" encoding=\"utf-8\"?><Root>";
...@@ -845,7 +858,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal, ...@@ -845,7 +858,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
//dwDataMap.put("relieve_date", sdf.format(rs.getDate("relieve_date"))); //dwDataMap.put("relieve_date", sdf.format(rs.getDate("relieve_date")));
//dwDataMap.put("relieve_date", rs.getString("relieve_date")); //dwDataMap.put("relieve_date", rs.getString("relieve_date"));
relieveDateNew=rs.getDate("relieve_date"); relieveDateNew=rs.getDate("relieve_date");
if(relieveDateNew.equals(null)) // if(relieveDateNew.equals(null))// Modified by Sana S on 13/03/20
if(relieveDateNew == null)
{ {
dwDataMap.put("relieve_date", ""); dwDataMap.put("relieve_date", "");
} }
...@@ -854,7 +868,6 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal, ...@@ -854,7 +868,6 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
dwDataMap.put("relieve_date",sdf.format(relieveDateNew)); dwDataMap.put("relieve_date",sdf.format(relieveDateNew));
} }
System.out.print("Relieve Date:"+rs.getString("relieve_date")); System.out.print("Relieve Date:"+rs.getString("relieve_date"));
/*dwDataMap.put("eff_date", rs.getDate("eff_date")); /*dwDataMap.put("eff_date", rs.getDate("eff_date"));
dwDataMap.put("upto_date", rs.getDate("upto_date")); dwDataMap.put("upto_date", rs.getDate("upto_date"));
...@@ -865,7 +878,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal, ...@@ -865,7 +878,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
expDateNew = rs.getDate("exp_date"); expDateNew = rs.getDate("exp_date");
// check for effective date is null // check for effective date is null
if(effDateNew.equals(null)) //if(effDateNew.equals(null))// Modified by Sana S on 13/03/20
if(effDateNew == null)
{ {
dwDataMap.put("eff_date", ""); dwDataMap.put("eff_date", "");
} }
...@@ -875,7 +889,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal, ...@@ -875,7 +889,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
} }
// check for upto date is null // check for upto date is null
if(uptoDateNew.equals(null)) // if(uptoDateNew.equals(null))// Modified by Sana S on 13/03/20
if(uptoDateNew == null)
{ {
dwDataMap.put("upto_date", ""); dwDataMap.put("upto_date", "");
} }
...@@ -885,7 +900,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal, ...@@ -885,7 +900,8 @@ public class LeaveConvertPrc extends ProcessEJB implements LeaveConvertPrcLocal,
} }
// check for exp date is null // check for exp date is null
if(expDateNew.equals(null)) //if(expDateNew.equals(null))// Modified by Sana S on 13/03/20
if(expDateNew == null)
{ {
dwDataMap.put("exp_date", ""); dwDataMap.put("exp_date", "");
} }
......
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