Fixed application amendment issue

This commit is contained in:
nisha
2025-03-04 15:45:09 +05:30
parent a9166ae3fe
commit cb6189baff

View File

@@ -1047,7 +1047,7 @@ public class ApplicationAmendmentRequestDao {
List<ApplicationAmendmentRequestEntity> amendmentRequests = applicationAmendmentRequestRepository.findAllByApplicationEvaluationIdAndIsDeletedFalse( List<ApplicationAmendmentRequestEntity> amendmentRequests = applicationAmendmentRequestRepository.findAllByApplicationEvaluationIdAndIsDeletedFalse(
existingApplicationAmendment.getApplicationEvaluationEntity().getId()); existingApplicationAmendment.getApplicationEvaluationEntity().getId());
Boolean allClosed = amendmentRequests.stream().allMatch(amendment -> amendment.getStatus().equals(ApplicationAmendmentRequestEnum.CLOSE.getValue())); Boolean allClosed = amendmentRequests.stream().allMatch(amendment -> (amendment.getStatus().equals(ApplicationAmendmentRequestEnum.CLOSE.getValue()) || amendment.getStatus().equals(ApplicationAmendmentRequestEnum.EXPIRED.getValue())));
ApplicationEntity application = applicationService.validateApplication(existingApplicationAmendment.getApplicationId()); ApplicationEntity application = applicationService.validateApplication(existingApplicationAmendment.getApplicationId());
ApplicationEntity oldApplicationEntityData = Utils.getClonedEntityForData(application); ApplicationEntity oldApplicationEntityData = Utils.getClonedEntityForData(application);
if (Boolean.TRUE.equals(allClosed)) { if (Boolean.TRUE.equals(allClosed)) {