Skip to content

feat(roadsheet): migrate Kafka consumer and roadmap creation to driverUuid

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

Refactor roadmap creation methods to use driverUuid exclusively for Kafka-driven roadmap creation, ensuring consistent UUID usage across the service while maintaining backward compatibility.

Kafka Consumer Changes:

  • RoadMapCreationConsumerImpl now uses driverUuid from RoadMapCreationEvent
  • Consumer calls new ByUuid service methods for both SUBMITTED and VALIDATED roadmap types
  • Added validation to skip events with null or blank driverUuid

New DTOs for UUID-based Operations:

  • Created ExistingDriverByUuidDTO with uuid and name fields
  • Created ManualRoadMapCreationResultByUuid with UUID-based result lists:
    • createdDriverUuids (List)
    • existingDriverUuids (List)
    • unassignedDriverUuids (List)

Service Method Refactoring:

  • DriverRoadMapServiceImpl.createDriverRoadMapsByUuid:

    • Uses driverUuid exclusively (no driverId in logic)
    • Uses existsByDriverUuidAndDate for existence checks
    • Calls circuitClientService.checkDriverAssignmentByUuid
    • Sets only driverUuid on DriverRoadMap entity
    • Returns ManualRoadMapCreationResultByUuid
  • ValidatedRoadMapServiceImp.createValidatedRoadMapByUuid:

    • Uses driverUuid exclusively (no driverId in logic)
    • Uses existsByDriverUuidAndDate for existence checks
    • Calls circuitClientService.checkDriverAssignmentByUuid
    • Sets only driverUuid on ValidatedRoadMap entity
    • Returns ManualRoadMapCreationResultByUuid

This migration ensures that Kafka-driven roadmap creation uses driverUuid as the primary identifier, aligning with the overall system migration to UUID-based driver identification.

Rapports de requête de fusion