Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PAGOPA-1732] chore: introduced aca and standin flags to PaStazionePa #49

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading