Skip to content

Commit

Permalink
Merge pull request #123 from abes-esr/ITEM-453-le-batch-prend-la-dema…
Browse files Browse the repository at this point in the history
…nde-la-plus-recente

FIX : Prise en compte demande la plus ancienne lors de la sélection d…
  • Loading branch information
EryneKL authored Jan 20, 2025
2 parents d9a8b5d + 3175dc4 commit e0a9255
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
@Repository
@ItemConfiguration
public interface IDemandeExempDao extends JpaRepository<DemandeExemp, Integer> {
@Query("select d from DemandeExemp d join d.ligneFichierExemps l where d.etatDemande.numEtat = 5 group by d having count(l) > :limite order by d.dateModification")
@Query("select d from DemandeExemp d join d.ligneFichierExemps l where d.etatDemande.numEtat = 5 group by d having count(l) > :limite order by d.dateModification desc")
List<DemandeExemp> getDemandesEnAttenteGrosVolume(@Param("limite") int limite);

@Query("select d from DemandeExemp d join d.ligneFichierExemps l where d.etatDemande.numEtat = 5 group by d having count(l) <= :limite order by d.dateModification")
@Query("select d from DemandeExemp d join d.ligneFichierExemps l where d.etatDemande.numEtat = 5 group by d having count(l) <= :limite order by d.dateModification desc")
List<DemandeExemp> getDemandesEnAttentePetitVolume(@Param("limite") int limite);

@Query("select d from DemandeExemp d join d.ligneFichierExemps l where d.etatDemande.numEtat = 5 and d.indexRecherche.code != 'DAT' group by d having count(l) > :limite order by d.dateModification asc")
@Query("select d from DemandeExemp d join d.ligneFichierExemps l where d.etatDemande.numEtat = 5 and d.indexRecherche.code != 'DAT' group by d having count(l) > :limite order by d.dateModification desc")
List<DemandeExemp> getDemandesToProceedWithoutDATGrosVolume(@Param("limite") int limite);

@Query("select d from DemandeExemp d join d.ligneFichierExemps l where d.etatDemande.numEtat = 5 and d.indexRecherche.code != 'DAT' group by d having count(l) <= :limite order by d.dateModification asc")
@Query("select d from DemandeExemp d join d.ligneFichierExemps l where d.etatDemande.numEtat = 5 and d.indexRecherche.code != 'DAT' group by d having count(l) <= :limite order by d.dateModification desc")
List<DemandeExemp> getDemandesToProceedWithoutDATPetitVolume(@Param("limite") int limite);

@Query("select e from TypeExemp e where e.numTypeExemp in (select d.typeExemp.numTypeExemp from DemandeExemp d where d.numDemande = :numDemande)")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ public interface IDemandeModifDao extends JpaRepository<DemandeModif, Integer> {
@Query("select new fr.abes.item.core.dto.DemandeDto(d, COUNT(l)) from DemandeModif d LEFT JOIN d.ligneFichierModifs l where d.etatDemande.numEtat = 9 GROUP BY d")
List<DemandeDto> getAllArchivedDemandesModifExtended();

@Query("select d from DemandeModif d join d.ligneFichierModifs l where d.etatDemande.numEtat = 5 group by d having count(l) > :limite order by d.dateModification")
@Query("select d from DemandeModif d join d.ligneFichierModifs l where d.etatDemande.numEtat = 5 group by d having count(l) > :limite order by d.dateModification desc")
List<DemandeModif> getDemandesEnAttenteGrosVolume(@Param("limite") int limite);

@Query("select d from DemandeModif d join d.ligneFichierModifs l where d.etatDemande.numEtat = 5 group by d having count(l) <= :limite order by d.dateModification")
@Query("select d from DemandeModif d join d.ligneFichierModifs l where d.etatDemande.numEtat = 5 group by d having count(l) <= :limite order by d.dateModification desc")
List<DemandeModif> getDemandesEnAttentePetitVolume(@Param("limite") int limite);

@Query("select d from DemandeModif d where d.etatDemande.numEtat = 10 order by d.dateModification asc")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
@ItemConfiguration
public interface IDemandeRecouvDao extends JpaRepository<DemandeRecouv, Integer> {

@Query("select d from DemandeRecouv d join d.ligneFichierRecouvs l where d.etatDemande.numEtat = 5 group by d having count(l) > :limite order by d.dateModification")
@Query("select d from DemandeRecouv d join d.ligneFichierRecouvs l where d.etatDemande.numEtat = 5 group by d having count(l) > :limite order by d.dateModification desc")
List<DemandeRecouv> getDemandesEnAttenteGrosVolume(@Param("limite") int limite);

@Query("select d from DemandeRecouv d join d.ligneFichierRecouvs l where d.etatDemande.numEtat = 5 group by d having count(l) <= :limite order by d.dateModification")
@Query("select d from DemandeRecouv d join d.ligneFichierRecouvs l where d.etatDemande.numEtat = 5 group by d having count(l) <= :limite order by d.dateModification desc")
List<DemandeRecouv> getDemandesEnAttentePetitVolume(@Param("limite") int limite);

@Query("select d from DemandeRecouv d join d.ligneFichierRecouvs l where d.etatDemande.numEtat = 5 and d.indexRecherche.code != 'DAT' group by d having count(l) > :limite order by d.dateModification asc")
@Query("select d from DemandeRecouv d join d.ligneFichierRecouvs l where d.etatDemande.numEtat = 5 and d.indexRecherche.code != 'DAT' group by d having count(l) > :limite order by d.dateModification desc")
List<DemandeRecouv> getDemandesToProceedWithoutDATGrosVolume(@Param("limite") int limite);

@Query("select d from DemandeRecouv d join d.ligneFichierRecouvs l where d.etatDemande.numEtat = 5 and d.indexRecherche.code != 'DAT' group by d having count(l) <= :limite order by d.dateModification asc")
@Query("select d from DemandeRecouv d join d.ligneFichierRecouvs l where d.etatDemande.numEtat = 5 and d.indexRecherche.code != 'DAT' group by d having count(l) <= :limite order by d.dateModification desc")
List<DemandeRecouv> getDemandesToProceedWithoutDATPetitVolume(@Param("limite") int limite);

@Query("select d from DemandeRecouv d where d.etatDemande.numEtat = 10 order by d.dateModification asc")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ public interface IDemandeSuppDao extends JpaRepository<DemandeSupp, Integer> {
@Query("select new fr.abes.item.core.dto.DemandeDto(d, COUNT(l)) FROM DemandeSupp d LEFT JOIN d.ligneFichierSupps l where d.etatDemande.numEtat = 9 GROUP BY d")
List<DemandeDto> getAllArchivedDemandesSuppExtended();

@Query("select d from DemandeSupp d join d.ligneFichierSupps l where d.etatDemande.numEtat = 5 group by d having count(l) > :limite order by d.dateModification")
@Query("select d from DemandeSupp d join d.ligneFichierSupps l where d.etatDemande.numEtat = 5 group by d having count(l) > :limite order by d.dateModification desc")
List<DemandeSupp> getDemandesEnAttenteGrosVolume(@Param("limite") int limite);

@Query("select d from DemandeSupp d join d.ligneFichierSupps l where d.etatDemande.numEtat = 5 group by d having count(l) <= :limite order by d.dateModification")
@Query("select d from DemandeSupp d join d.ligneFichierSupps l where d.etatDemande.numEtat = 5 group by d having count(l) <= :limite order by d.dateModification desc")
List<DemandeSupp> getDemandesEnAttentePetitVolume(@Param("limite") int limite);

@Query("select d from DemandeSupp d where d.etatDemande.numEtat = 7 and (day(current_date) - day(d.dateModification)) > 90 order by d.dateModification asc")
Expand Down

0 comments on commit e0a9255

Please # to comment.