| Line 1124... |
Line 1124... |
| 1124 |
Optional<EmployeeAttendance> employeeAttendanceOptional = employeeMorningAttendance.get(user.getId());
|
1124 |
Optional<EmployeeAttendance> employeeAttendanceOptional = employeeMorningAttendance.get(user.getId());
|
| 1125 |
if(employeeAttendanceOptional==null
|
1125 |
if(employeeAttendanceOptional==null
|
| 1126 |
|| employeeAttendanceOptional.orElseGet(null)==null
|
1126 |
|| employeeAttendanceOptional.orElseGet(null)==null
|
| 1127 |
|| employeeAttendanceOptional.get().getCreateTimestamp().isAfter(moriningTime)) {
|
1127 |
|| employeeAttendanceOptional.get().getCreateTimestamp().isAfter(moriningTime)) {
|
| 1128 |
String body = String.format("Dear %s,\n Pls note that you haven't punched your attendance by 10:45am. You have been marked absent for half the day. You may contact your manager and get it regularise.\n\nRegards\nHR Team", authUser.getFullName());
|
1128 |
String body = String.format("Dear %s,\n Pls note that you haven't punched your attendance by 10:45am. You have been marked absent for half the day. You may contact your manager and get it regularise.\n\nRegards\nHR Team", authUser.getFullName());
|
| 1129 |
Utils.sendMailWithAttachments(googleMailSender, new String[] { "amit.gupta@shop2020.in" }, new String[] { "jyoti.rawat@smartdukaan.com" }, "Attendance Alert",
|
1129 |
Utils.sendMailWithAttachments(googleMailSender, new String[] { authUser.getEmailId() }, new String[] { "jyoti.rawat@smartdukaan.com" }, "Attendance Alert",
|
| 1130 |
body);
|
1130 |
body);
|
| 1131 |
break;
|
1131 |
break;
|
| 1132 |
}
|
1132 |
}
|
| 1133 |
}
|
1133 |
}
|
| 1134 |
|
1134 |
|
| Line 1155... |
Line 1155... |
| 1155 |
Optional<EmployeeAttendance> employeeAttendanceOptional = employeeEveningAttendanceMap.get(user.getId());
|
1155 |
Optional<EmployeeAttendance> employeeAttendanceOptional = employeeEveningAttendanceMap.get(user.getId());
|
| 1156 |
if(employeeAttendanceOptional!=null
|
1156 |
if(employeeAttendanceOptional!=null
|
| 1157 |
&& employeeAttendanceOptional.orElseGet(null)!=null
|
1157 |
&& employeeAttendanceOptional.orElseGet(null)!=null
|
| 1158 |
&& employeeAttendanceOptional.get().getCreateTimestamp().isBefore(eveningTime)) {
|
1158 |
&& employeeAttendanceOptional.get().getCreateTimestamp().isBefore(eveningTime)) {
|
| 1159 |
String body = String.format("Dear %s,\n Pls note that you have punched your attendance before 6pm. You have been marked absent for half the day. You may contact your manager and get it regularise.\n\nRegards\nHR Team", authUser.getFullName());
|
1159 |
String body = String.format("Dear %s,\n Pls note that you have punched your attendance before 6pm. You have been marked absent for half the day. You may contact your manager and get it regularise.\n\nRegards\nHR Team", authUser.getFullName());
|
| 1160 |
Utils.sendMailWithAttachments(googleMailSender, new String[] { "amit.gupta@shop2020.in" }, new String[] { "jyoti.rawat@smartdukaan.com" }, "Attendance Alert",
|
1160 |
Utils.sendMailWithAttachments(googleMailSender, new String[] { authUser.getEmailId() }, new String[] { "jyoti.rawat@smartdukaan.com" }, "Attendance Alert",
|
| 1161 |
body);
|
1161 |
body);
|
| 1162 |
break;
|
- |
|
| 1163 |
}
|
1162 |
}
|
| 1164 |
}
|
1163 |
}
|
| 1165 |
|
1164 |
|
| 1166 |
}
|
1165 |
}
|
| 1167 |
|
1166 |
|