Fixed application status issue
This commit is contained in:
@@ -380,6 +380,15 @@ public class ApplicationAmendmentRequestDao {
|
|||||||
//Set stop date time in the entity becuase amendment has started
|
//Set stop date time in the entity becuase amendment has started
|
||||||
applicationEvaluationEntity.setStopDateTime(DateTimeUtil.DateServerToUTC(LocalDateTime.now()));
|
applicationEvaluationEntity.setStopDateTime(DateTimeUtil.DateServerToUTC(LocalDateTime.now()));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
boolean noneClosedOrExpired = amendmentRequest.stream()
|
||||||
|
.noneMatch(amendment ->
|
||||||
|
amendment.getStatus().equals(ApplicationAmendmentRequestEnum.CLOSE.getValue()) ||
|
||||||
|
amendment.getStatus().equals(ApplicationAmendmentRequestEnum.EXPIRED.getValue())
|
||||||
|
);
|
||||||
|
|
||||||
|
if(Boolean.TRUE.equals(noneClosedOrExpired)){
|
||||||
applicationEntity.setPreviousStatus(oldApplicationEntity.getStatus());
|
applicationEntity.setPreviousStatus(oldApplicationEntity.getStatus());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -73,6 +73,7 @@ public interface ApplicationAmendmentRequestRepository extends JpaRepository<App
|
|||||||
" SELECT 1 FROM ApplicationAmendmentRequestEntity activeAmendment" +
|
" SELECT 1 FROM ApplicationAmendmentRequestEntity activeAmendment" +
|
||||||
" WHERE activeAmendment.applicationEvaluationEntity.id = a.applicationEvaluationEntity.id " +
|
" WHERE activeAmendment.applicationEvaluationEntity.id = a.applicationEvaluationEntity.id " +
|
||||||
" AND activeAmendment.status NOT IN('CLOSE','EXPIRED') " +
|
" AND activeAmendment.status NOT IN('CLOSE','EXPIRED') " +
|
||||||
|
" AND activeAmendment.type NOT IN('SPECIAL') " +
|
||||||
" AND activeAmendment.isDeleted = false) ")
|
" AND activeAmendment.isDeleted = false) ")
|
||||||
Set<ApplicationEvaluationEntity> findEvaluationsWithoutActiveAmendmentsByIds(@Param("applicationEvaluationIds") Set<Long> applicationEvaluationIds);
|
Set<ApplicationEvaluationEntity> findEvaluationsWithoutActiveAmendmentsByIds(@Param("applicationEvaluationIds") Set<Long> applicationEvaluationIds);
|
||||||
|
|
||||||
@@ -154,4 +155,5 @@ public interface ApplicationAmendmentRequestRepository extends JpaRepository<App
|
|||||||
ApplicationAmendmentRequestEntity findByIdAndIsDeletedFalseAndStatus(Long id,String status);
|
ApplicationAmendmentRequestEntity findByIdAndIsDeletedFalseAndStatus(Long id,String status);
|
||||||
|
|
||||||
ApplicationAmendmentRequestEntity findByIdAndIsDeletedFalseAndStatusIn(Long id, List<String> statusList);
|
ApplicationAmendmentRequestEntity findByIdAndIsDeletedFalseAndStatusIn(Long id, List<String> statusList);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user