Skip to content

feat(absence): support per-day passenger absences in circuit service

yassine sabir a demandé de fusionner feature/VSN-2339 vers develop

Passenger absences: circuit now fully supports the new per-day “Outbound / Return” choices from the absence tool, and automatically updates/deactivates the right trips and driver assignments on the corresponding dates while keeping the old full-period behaviour for existing absences.

**Updates Summary : **

Passenger absence event support

  • Consume dailyTrips from PassengerAbsenceEvent and derive effective concernedTrip when per-day data is present.
  • Build AbsencePeriod with dailyTrips + concernedTrip and attach it to passenger TripPoints (idempotent replace by start/end).

Per-day vs full-period application

  • For each trip, only TripDays whose date + sens are present in dailyTrips are affected; otherwise full-period concernedTrip is used.
  • Single-passenger trips delete only the affected TripDays and emit trip-deleted for those dates; multi-passenger trips stay active but get recalculated.

Recalculation and absence evaluation

  • TripPointUtils now exposes helpers to evaluate absences per (date, sens) and across a date range.
  • TripShortestPathRecalculationServiceImpl uses these helpers to exclude absent passengers when recalculating and in preview mode.
  • GenerateTripsServiceImpl uses the same logic to trigger recalculation on generation only when the passenger is absent for that trip sens on the given date.

Driver assignments & search

  • TripDriverAssignmentServiceImpl uses per-day/sens-aware absence when splitting single-passenger assignments and when showing overlapping absences in lists.
  • DriverSearchServiceImpl computes used seats excluding passengers absent for that trip sens on the given date.
Modification effectuée par yassine sabir

Rapports de requête de fusion