From 8e865155be4de28164bcfdb6e67c9f930c275f1c Mon Sep 17 00:00:00 2001 From: Alessio Cialini Date: Fri, 19 Jul 2024 10:27:21 +0200 Subject: [PATCH 1/2] [PAGOPA-1732] chore: introduced aca and standin flags to PaStazionePa --- .../gov/pagopa/apiconfig/starter/entity/PaStazionePa.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/it/gov/pagopa/apiconfig/starter/entity/PaStazionePa.java b/src/main/java/it/gov/pagopa/apiconfig/starter/entity/PaStazionePa.java index 502a9ac..46cd197 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/starter/entity/PaStazionePa.java +++ b/src/main/java/it/gov/pagopa/apiconfig/starter/entity/PaStazionePa.java @@ -77,4 +77,11 @@ public class PaStazionePa { @Convert(converter = YesNoConverter.class) @Column(name = "PAGAMENTO_SPONTANEO", nullable = false) private Boolean pagamentoSpontaneo = false; + + @Column(name = "ACA", nullable = false) + private Boolean aca = true; + + @Column(name = "STANDIN", nullable = false) + private Boolean standin = true; + } From fb5bccf6310cd31bbf04f18ab3377cf15e7a0f02 Mon Sep 17 00:00:00 2001 From: giomella Date: Tue, 23 Jul 2024 17:48:04 +0200 Subject: [PATCH 2/2] update find all maintenance query --- .../repository/StationMaintenanceRepository.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/main/java/it/gov/pagopa/apiconfig/starter/repository/StationMaintenanceRepository.java b/src/main/java/it/gov/pagopa/apiconfig/starter/repository/StationMaintenanceRepository.java index 1f20f4a..33d7fc8 100644 --- a/src/main/java/it/gov/pagopa/apiconfig/starter/repository/StationMaintenanceRepository.java +++ b/src/main/java/it/gov/pagopa/apiconfig/starter/repository/StationMaintenanceRepository.java @@ -16,6 +16,17 @@ public interface StationMaintenanceRepository extends JpaRepository { @Query(value = + "SELECT m " + + "FROM StationMaintenance m JOIN FETCH m.station s JOIN FETCH s.intermediarioPa ipa " + + "WHERE m.fkStation = s.objId " + + "AND s.fkIntermediarioPa = ipa.objId " + + "AND ipa.idIntermediarioPa = :brokerCode " + + "AND (:stationCode IS NULL OR UPPER(s.idStazione) LIKE CONCAT('%', UPPER(:stationCode), '%')) " + + "AND (:startDateTimeBefore IS NULL OR m.startDateTime < :startDateTimeBefore) " + + "AND (:startDateTimeAfter IS NULL OR m.startDateTime > :startDateTimeAfter) " + + "AND (:endDateTimeBefore IS NULL OR m.endDateTime < :endDateTimeBefore) " + + "AND (:endDateTimeAfter IS NULL OR m.endDateTime > :endDateTimeAfter)", + countQuery = "SELECT m " + "FROM StationMaintenance m JOIN Stazioni s ON m.fkStation = s.objId JOIN IntermediariPa ipa ON s.fkIntermediarioPa = ipa.objId " + "WHERE ipa.idIntermediarioPa = :brokerCode " +