VSN-1988 : Backend , Prepared passengers data exportation bash emplementd and necessary feature exposition files Introduced.
Merge Request – Prepared Passenger Exportation Module and Data Utilities
Overview
This Merge Request introduces the foundation and full workflow required to export prepared passenger data. It includes the creation of export-specific DTOs, CSV preparation logic, batch initialization, domain utilities for label and reference mapping, and the introduction of paged data retrieval. The MR also removes unused project files to streamline the codebase and prevent conflicts with the newly introduced export layer.
The primary objectives are:
- Enable export of prepared passenger data in a structured and meaningful format.
- Provide a dedicated DTO model tailored for export needs.
- Introduce domain utilities to convert identifiers into readable values.
- Establish batch and paging mechanisms to handle potentially large datasets efficiently.
- Ensure data clarity, consistency, and usability in exported outputs.
Scope of Changes
1. refactor(files): Removing unused files
Removes unused default files such as unused controllers and services.
Details:
- Deleted redundant default scaffolding files.
- Eliminates unused components prior to introducing the export feature.
- Prevents namespace clutter and possible confusion during development.
Outcome:
- Cleaner codebase and better project maintainability.
2. feat(exportation): Defining necessary files
Introduces the file structure required to support the exportation process.
Details:
- Created new exportation-related components and classes.
- Sets the foundation for the export workflow architecture.
Outcome:
- Establishes the core structure needed for export functionality.
3. feat(exportation): Defining necessary DTOs
Defines PassengerExportDTO as the dedicated data model for export.
Details:
- Introduced a DTO tailored to export needs rather than reusing internal entities.
- Ensures exported content is clean, structured, and export-specific.
Outcome:
- Separation of internal models from export-facing output.
4. feat(exportation): Prepared passenger export data
Defines the set of fields and values considered relevant for export.
Details:
- Selected export-focused properties from prepared passenger data.
- Establishes criteria for what information is included.
Outcome:
- Clear, consistent export scope.
5. feat(exportation): Defining to CSV function
Implements the transformation from export data to CSV-ready line format.
Details:
- Introduced logic to produce a row representation for each exported passenger.
- Ensures compatibility with spreadsheet and reporting tools.
Outcome:
- Export data can be materialized into CSV output.
6. feat(exportation): Initializing export batch
Creates the batch execution setup for passenger export operations.
Details:
- Defined required beans for batch processing.
- Prepared infrastructure for external data retrieval where necessary.
Outcome:
- Export process becomes scalable and execution-ready.
Domain Utilities
A series of utility methods are introduced to translate internal identifiers into meaningful values for export.
7. feat(utility): Establishment utility
Fetches establishment names from identifiers.
8. feat(utility): Department utility
Resolves department names from department identifiers.
9. feat(utility): Representative address utility
Retrieves representative address information.
10. feat(utility): Representative circuit utility
Provides circuit codes associated with representatives.
11. feat(utility): Prepared phones utility
Retrieves prepared passenger phone numbers or related contact values.
12. feat(utility): Label Mapper Utils
Maps raw properties into human-readable values for export.
Outcome across utilities:
- Ensures exported data is understandable and presentation-ready.
- Reduces the presence of cryptic identifiers in exported files.
13. feat(exportation): Passenger Export DTO building
Adds builder logic for constructing export DTO instances.
Details:
- Centralizes DTO construction into a dedicated builder method.
- Temporarily sets POM to local snapshot during development.
Outcome:
- Provides predictable DTO creation and easier extension.
14. feat(exportation): Paged data fetching
Implements paging logic for large datasets.
Details:
- Introduced
fetchPagedDatato retrieve prepared passengers in pages. - Prevents memory overload during large exports.
Outcome:
- Supports scalable and performant export operations.
15. feat(exportation): Defining sheet data header
Introduces a method to define the export header row.
Details:
-
getHeaderdefines the column titles of the exported sheet. - Ensures consistent ordering and labeling across exports.
Outcome:
- Exported sheets become structured, readable, and self-descriptive.
16. feat(exportation): Collectif mapping to export DTO
Adds mapping logic for collectivized or grouped export data.
Details:
- Maps collective-related information into the export DTO.
Outcome:
- Enables exporting aggregated or group-based values alongside individual records.
Impacts
Functional
- Prepared passenger data can now be exported in a readable, structured format.
- Identifier-based values are translated into meaningful labels.
- Large dataset exports are now feasible through paging and batching.
Technical
- New DTOs, utilities, and batch components are introduced.
- Existing unused components removed to reduce noise.
- Export workflow now has clearly defined entry points and data structures.
Backward Compatibility
- No breaking changes to existing business logic.
- Exportation layer is additive and isolated.
- Future export formats (Excel, PDF, etc.) can be layered on top.
Recommendations
- Integrate UI triggers for export actions.
- Add test coverage for DTO mapping and utility methods.
- Consider multi-format export support.
Conclusion
This MR establishes a complete export-ready foundation for prepared passenger data, supported by domain utilities and scalable data retrieval. It enhances data clarity, readability, and operational efficiency while keeping the codebase clean and extensible.
Closes VSN-1988