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; + } 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 " +