Commit 508ac6d9 authored by Vijay Akula's avatar Vijay Akula

FEATURE/NEW_ENHANCEMENT_MYTEAM

parent 83caefce
...@@ -60,7 +60,7 @@ public class LeaveNotificationScheduler { ...@@ -60,7 +60,7 @@ public class LeaveNotificationScheduler {
// @Scheduled(cron = "0 * * * * ?") // @Scheduled(cron = "0 * * * * ?")
@Scheduled(cron = "00 00 15 * * 1-5") @Scheduled(cron = "00 00 16 * * 1-5")
public void scheduleLeaveMailForShift1Empls() throws IOException, MessagingException, MyTeamException { public void scheduleLeaveMailForShift1Empls() throws IOException, MessagingException, MyTeamException {
//Shift 1(9:00 AM - 6:00 PM) //Shift 1(9:00 AM - 6:00 PM)
logger.info(Shifts.SHIFT1.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now())); logger.info(Shifts.SHIFT1.getShiftType() + " :: Execution Time - {}", dateTimeFormatter.format(LocalDateTime.now()));
...@@ -125,9 +125,11 @@ public class LeaveNotificationScheduler { ...@@ -125,9 +125,11 @@ public class LeaveNotificationScheduler {
if(empSubStatus==null) if(empSubStatus==null)
empSubStatus=""; empSubStatus="";
if (employee.getEmpStatus().equalsIgnoreCase(EmployeeStatus.ACTIVE.getStatus()) && ( !empSubStatus.equalsIgnoreCase(EmpSubStatus.LONG_LEAVE.getLeaveType()) && if (employee.getEmpStatus().equalsIgnoreCase(EmployeeStatus.ACTIVE.getStatus()) &&
( !empSubStatus.equalsIgnoreCase(EmpSubStatus.LONG_LEAVE.getLeaveType()) &&
!empSubStatus.equalsIgnoreCase(EmpSubStatus.MATERNITY_LEAVE.getLeaveType()) && !empSubStatus.equalsIgnoreCase(EmpSubStatus.MATERNITY_LEAVE.getLeaveType()) &&
!empSubStatus.equalsIgnoreCase(EmpSubStatus.ONSITE_TRAVEL.getLeaveType()))) { !empSubStatus.equalsIgnoreCase(EmpSubStatus.ONSITE_TRAVEL.getLeaveType())&&
!empSubStatus.equalsIgnoreCase(EmpSubStatus.AT_CLIENT_LOCATION.getLeaveType()))) {
logger.info("Mail Notification is sending to:" + absentee.getEmployeeName() + "::" + absentee.getEmailId()); logger.info("Mail Notification is sending to:" + absentee.getEmployeeName() + "::" + absentee.getEmailId());
mail.setEmpName(absentee.getEmployeeName()); mail.setEmpName(absentee.getEmployeeName());
......
...@@ -6,7 +6,8 @@ public enum EmpSubStatus { ...@@ -6,7 +6,8 @@ public enum EmpSubStatus {
LONG_LEAVE("Long Leave"), LONG_LEAVE("Long Leave"),
MATERNITY_LEAVE("Maternity Leave"), MATERNITY_LEAVE("Maternity Leave"),
ONSITE_TRAVEL("Onsite Travel"), ONSITE_TRAVEL("Onsite Travel"),
RESIGNED("Resigned"); RESIGNED("Resigned"),
AT_CLIENT_LOCATION("At Client Location");
private String leaveType; private String leaveType;
......
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