Skip to content

feat: Enhance driver road map feature with unified endpoints and code cleanup

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

feat: Enhance driver road map feature with unified endpoints and code cleanup

This commit implements comprehensive improvements to the driver road map feature for mobile app integration and code quality compliance.

New Features:

  • Add unified endpoint GET /api/roadMap/drivers/{driverId}/all-roadsheets to retrieve current, submitted, and pending road sheets in a single call
  • Add road sheet submission validation endpoint GET /api/roadMap/submittedRoadMaps/{id}/validate-submission
  • Add road sheet submission endpoint POST /api/roadMap/submittedRoadMaps/{id}/submit
  • Enhance worked day creation/update with comprehensive validations (non-submitted check, future date prevention, month consistency)
  • Add plannedDaysDates to road map details for calendar display

Bug Fixes:

  • Fix missing unsubmitted road sheets from previous months in all-roadsheets endpoint
  • Fix null pointer exceptions in WorkedDayMapper with null-safe checks
  • Fix lazy loading issues by ensuring proper entity relationships

DTOs Added:

  • AllRoadSheetsResponseDTO: Unified response for all road sheet types
  • RoadSheetSummaryDTO: Summary DTO with calculated metrics (kilometers, worked days)
  • RoadSheetSubmissionValidationDTO: Validation response for submission

Files Modified:

  • Controllers: DriverRoadMapController, WorkedDayController, RoadmapStatisticsController
  • Services: DriverRoadMapServiceImpl, WorkedDayServiceImpl, PlanningRequestServiceImpl, RoadmapStatisticsServiceImpl
  • Clients: DriverClientService, PlanningClientService, CircuitClientService, AdminClientService
  • Mappers: WorkedDayMapper, SubmittedRoadMapMapper
  • Schedulers: CreateDriverRoadMapJob, CreateValidatedRoadMapJob
  • Interfaces: DriverRoadMapService, RoadmapStatisticsService
Modification effectuée par yassine sabir

Rapports de requête de fusion