Done ticket

This commit is contained in:
nisha
2024-11-12 18:11:15 +05:30
parent 256fa6c49e
commit 50c1f0b800
18 changed files with 411 additions and 36 deletions

View File

@@ -41,8 +41,8 @@ public class NotificationScheduler {
ApplicationAmendmentRequestEntity amendmentRequest = getAmendmentRequestForApplication(application, amendmentRequestList);
if (amendmentRequest != null) {
LocalDateTime requestDate = amendmentRequest.getCreatedDate();
if (requestDate.plusDays(amendmentRequest.getResponseDays()).isAfter(today)) {
LocalDateTime requestDate = amendmentRequest.getStartDate();
if (requestDate.plusDays(amendmentRequest.getResponseDays()).isBefore(today)) {
// Update the application status to REJECTED
application.setStatus("REJECTED");
applicationRepository.save(application);
@@ -56,6 +56,6 @@ public class NotificationScheduler {
private ApplicationAmendmentRequestEntity getAmendmentRequestForApplication(ApplicationEntity application, List<ApplicationAmendmentRequestEntity> amendmentRequestList) {
return amendmentRequestList.stream().filter(request -> request.getId().equals(application.getId())).findFirst().orElse(null);
return amendmentRequestList.stream().filter(request -> request.getApplicationId().equals(application.getId())).findFirst().orElse(null);
}
}