Skip to content

Commit

Permalink
Merge pull request #49 from pagopa/PAGOPA-1732_chore_add_standin_aca_…
Browse files Browse the repository at this point in the history
…flags_to_pa_stazione_pa

[PAGOPA-1732] chore: introduced aca and standin flags to PaStazionePa
  • Loading branch information
jacopocarlini authored Jul 25, 2024
2 parents 82cb1f6 + fb5bccf commit 147d5c2
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@
public interface StationMaintenanceRepository extends JpaRepository<StationMaintenance, Long> {

@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 " +
Expand Down

0 comments on commit 147d5c2

Please sign in to comment.