Skip to content

VSN-2078: Add mileage anomaly history detail endpoint with filtering

yassine.chhirou a demandé de fusionner feature/VSN-2078 vers develop

This MR adds the ability to view detailed information about a mileage anomaly detection history by UUID. Users can now double-click on a history row to see all detected anomalies with their details.

Backend changes:

  • Add GET /mileage-history/{uuid} endpoint to fetch history details
  • Add POST /detect-mileage-range endpoint to detect anomalies for a date range
  • Support filtering anomalies by:
    • driverName: filter by driver first/last name
    • carRegistration: filter by vehicle registration
    • tripDate: filter by trip date
    • anomalyType: filter by anomaly type (NIGHT_TRIP, WEEKEND_TRIP, DRIVER_NOT_ASSIGNED, MILEAGE_DISCREPANCY)
  • Create DTOs: MileageAnomalyDetailResponse, MileageDetectionHistoryDetailResponse
  • Add filterAnomalyDetails() specification in MileageAnomalySpecification
  • Add MileageAnomalyHistoryRepository for querying anomaly details
  • Add new communication with circuit service to get the theorical mileage for each driver to compare it with the reel mileage

Closes VSN-2078

Rapports de requête de fusion