Subversion Repositories SmartDukaan

Rev

Rev 28769 | Rev 28775 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 28769 Rev 28773
Line 1121... Line 1121...
1121
			User user = userMap.get(authUser.getEmailId());
1121
			User user = userMap.get(authUser.getEmailId());
1122
			Optional<EmployeeAttendance> employeeAttendanceOptional = employeeMorningAttendance.get(user.getId());
1122
			Optional<EmployeeAttendance> employeeAttendanceOptional = employeeMorningAttendance.get(user.getId());
1123
			if(employeeAttendanceOptional==null 
1123
			if(employeeAttendanceOptional==null 
1124
					|| employeeAttendanceOptional.orElseGet(null)==null 
1124
					|| employeeAttendanceOptional.orElseGet(null)==null 
1125
					|| employeeAttendanceOptional.get().getCreateTimestamp().isAfter(moriningTime)) {
1125
					|| employeeAttendanceOptional.get().getCreateTimestamp().isAfter(moriningTime)) {
1126
				String body = String.format("Dear %s , Pls note that you haven't punched your attendance ONSITE by 10:45am. You have been marked absent for half the day. You may contact your manager and get it regularise.\n\tRegards\n\tHR Team", authUser.getFullName());
1126
				String body = String.format("Dear %s\n, Pls note that you haven't punched your attendance ONSITE by 10:45am. You have been marked absent for half the day. You may contact your manager and get it regularise.\nRegards\nHR Team", authUser.getFullName());
1127
				Utils.sendMailWithAttachments(googleMailSender, new String[] { "amit.gupta@shop2020.in" }, new String[] { "jyoti.rawat@smartdukaan.com" }, "Attendance Alert", 
1127
				Utils.sendMailWithAttachments(googleMailSender, new String[] { "amit.gupta@shop2020.in" }, new String[] { "jyoti.rawat@smartdukaan.com" }, "Attendance Alert", 
1128
						body);
1128
						body);
1129
				break;
1129
				break;
1130
			}
1130
			}
1131
		}
1131
		}