Skip to content

feat(planning): migrate driver identification from driverId to driverUuid

kawtar.bouarif a demandé de fusionner feature/vsn-2078 vers develop

Refactor planning service to use driverUuid as the primary identifier for driver operations while maintaining backward compatibility with driverId-based methods.

Changes:

  • Add new service methods accepting driverUuid directly:

    • affectTripsToDriver(String driverUuid, ...)
    • getDailyTripsForDriversByUuid(DailyTripsRequestByUuid)
    • getMonthlyPlanningByDriverUuid(String driverUuid, ...)
    • getKmvideByDriverUuid(String driverUuid, ...)
  • Refactor Kafka consumer (CircuitTripConsumerServiceImpl):

    • Remove driverId parsing from driverUuid (UUID string)
    • Use driverUuid directly in affectTripsToDriver calls
    • Update consumeTripRecalculated to use driverUuid-based methods
  • Update service implementation (PlanningServiceImpl):

    • Add private methods: assignTrip(String driverUuid, ...), reAssignTrip(String driverUuid, ...)
    • Add helper methods: createDailyPlanningWithMonthlyByUuid, createMonthlyPlanningForDriverByUuid
    • Update unAssignTrip to also set driverUuid to null
    • Use repository methods with driverUuid: findDailyPlanningByMPDriverUuidANDDate, findByDriverUuidAndMonth, etc.
  • Update Kafka producer (DriverAssignmentProducerService):

    • Method signature now accepts only driverUuid
  • Maintain backward compatibility:

    • Keep existing methods with driverId for legacy support
    • Old methods still accept both driverId and driverUuid

This migration ensures consistent use of UUID across the planning module and aligns with the overall system migration to driverUuid.

Rapports de requête de fusion