Fixed issue for evaluation expiration
This commit is contained in:
@@ -59,7 +59,7 @@ public interface ApplicationAmendmentRequestRepository extends JpaRepository<App
|
||||
|
||||
@Query("SELECT a FROM ApplicationAmendmentRequestEntity a " +
|
||||
"WHERE a.isDeleted = false " +
|
||||
"AND a.status <> 'CLOSE' " +
|
||||
"AND a.status NOT IN('CLOSE','EXPIRED') " +
|
||||
"AND a.endDate < :currentTime")
|
||||
List<ApplicationAmendmentRequestEntity> findAmendmentsDueForExpiration(LocalDateTime currentTime);
|
||||
|
||||
@@ -72,7 +72,7 @@ public interface ApplicationAmendmentRequestRepository extends JpaRepository<App
|
||||
"AND NOT EXISTS ( " +
|
||||
" SELECT 1 FROM ApplicationAmendmentRequestEntity activeAmendment" +
|
||||
" WHERE activeAmendment.applicationEvaluationEntity.id = a.applicationEvaluationEntity.id " +
|
||||
" AND activeAmendment.status <> 'CLOSE' " +
|
||||
" AND activeAmendment.status NOT IN('CLOSE','EXPIRED') " +
|
||||
" AND activeAmendment.isDeleted = false) ")
|
||||
Set<ApplicationEvaluationEntity> findEvaluationsWithoutActiveAmendmentsByIds(@Param("applicationEvaluationIds") Set<Long> applicationEvaluationIds);
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ public interface ApplicationEvaluationRepository extends JpaRepository<Applicati
|
||||
"WHERE aar.id = :evaluationId AND aar.isDeleted = false)")
|
||||
ApplicationEntity findApplicationByEvaluationId(Long evaluationId);
|
||||
|
||||
@Query("SELECT a FROM ApplicationEvaluationEntity a WHERE a.isDeleted = false AND a.endDate < :currentDate")
|
||||
@Query("SELECT a FROM ApplicationEvaluationEntity a WHERE a.isDeleted = false AND a.status = 'OPEN' AND a.endDate < :currentDate")
|
||||
List<ApplicationEvaluationEntity> findAllByIsDeletedFalseAndEndDateBefore(@Param("currentDate") LocalDateTime currentDate);
|
||||
|
||||
@Query("SELECT a FROM ApplicationEvaluationEntity a " +
|
||||
|
||||
Reference in New Issue
Block a user