|
|
@@ -53,8 +53,37 @@ public interface ProductionRepository extends JpaRepository<Production, Integer>
|
|
|
+ " AND ((:numero = 0) OR (:numero = p.numero_participant)) "
|
|
|
+ " AND ((:solo = 0) OR ((:solo = 1) AND p.numero_production NOT IN (SELECT DISTINCT s.numero_production FROM vote.presentations AS s))) "
|
|
|
+ " AND ((:type IS NULL) OR (p.type = (:type)::vote.type_production)) "
|
|
|
- + "ORDER BY p.titre ASC ")
|
|
|
- List<ProductionShort> findAllWithoutArchive(@Param("numero") int numeroGestionnaire, @Param("type") String type, @Param("solo") int solo);
|
|
|
+ + "ORDER BY p.titre, p.auteurs, p.groupes ASC ")
|
|
|
+ List<ProductionShort> findAllWithoutArchiveOrderedByTitle(@Param("numero") int numeroGestionnaire, @Param("type") String type, @Param("solo") int solo);
|
|
|
+
|
|
|
+ @NativeQuery("SELECT DISTINCT "
|
|
|
+ + "TO_CHAR(p.date_creation, 'DD/MM/YYYY HH24:MI:SS') as date_creation, "
|
|
|
+ + "TO_CHAR(p.date_modification, 'DD/MM/YYYY HH24:MI:SS') as date_modification, "
|
|
|
+ + "p.numero_production, "
|
|
|
+ + "CAST(p.adresse_ip AS VARCHAR) AS adresse_ip, "
|
|
|
+ + "p.type, "
|
|
|
+ + "p.titre, "
|
|
|
+ + "p.auteurs, "
|
|
|
+ + "p.groupes, "
|
|
|
+ + "p.plateforme, "
|
|
|
+ + "p.commentaire, "
|
|
|
+ + "p.informations_privees, "
|
|
|
+ + "p.numero_participant AS numero_gestionnaire, "
|
|
|
+ + "CONCAT(g.pseudonyme, ' = ', g.nom, ' ', g.prenom) AS nom_gestionnaire, "
|
|
|
+ + "p.nom_archive, "
|
|
|
+ + "p.vignette, "
|
|
|
+ + "p.numero_version,"
|
|
|
+ + "0 AS numero_categorie, "
|
|
|
+ + "0 AS ordre_presentation, "
|
|
|
+ + "0 AS etat_media "
|
|
|
+ + "FROM vote.productions AS p "
|
|
|
+ + "INNER JOIN vote.participants AS g ON p.numero_participant = g.numero_participant "
|
|
|
+ + "WHERE p.flag_actif IS TRUE "
|
|
|
+ + " AND ((:numero = 0) OR (:numero = p.numero_participant)) "
|
|
|
+ + " AND ((:solo = 0) OR ((:solo = 1) AND p.numero_production NOT IN (SELECT DISTINCT s.numero_production FROM vote.presentations AS s))) "
|
|
|
+ + " AND ((:type IS NULL) OR (p.type = (:type)::vote.type_production)) "
|
|
|
+ + "ORDER BY p.numero_production DESC ")
|
|
|
+ List<ProductionShort> findAllWithoutArchiveOrderedByInvertedId(@Param("numero") int numeroGestionnaire, @Param("type") String type, @Param("solo") int solo);
|
|
|
|
|
|
@NativeQuery("SELECT DISTINCT "
|
|
|
+ "TO_CHAR(p.date_creation, 'DD/MM/YYYY HH24:MI:SS') as date_creation, "
|