Commit graph

382 commits

Author SHA1 Message Date
Jan
ced60b74d2 Refactor model structure and optimize repository queries
Removed redundant calculation job-related models, simplifying the codebase. Replaced usage of aggregate references with primitive IDs in CalculationJob for better performance. Improved repository methods for efficient node retrieval and updated schema.sql to restructure node references.
2025-05-04 22:44:25 +02:00
Jan
fd6e4ea435 Remove RoutingService2 and implement premise creation logic
Deleted the unused `RoutingService2` class to simplify the codebase. Added the logic for creating and duplicating premises in `PremiseCreationService`, including filtering and handling combinations of material and supplier IDs.
2025-05-02 12:17:14 +02:00
Jan
a468e3d187 Refactor terminology and add new RoutingService.
Updated repository classes to replace "node" with "chain" for clarity, aligning with domain terminology. Introduced `RoutingService2` to handle route calculation logic, supporting recursive chain resolution and optimized route determination.
2025-04-27 12:13:54 +02:00
Jan
e4ab851d7f Remove unused service classes and refactor mappings
Deleted `DestinationService` and `ValidityPeriodService` as they were obsolete. Refactored several classes, including `PremisesService` and `MatrixRateExcelMapper`, to improve package alignment and streamline dependencies. Enhanced `PremiseRepository` with cleaner query construction, better parameter handling, and support for resolving chains of predecessors in `NodeRepository`.
2025-04-20 21:22:09 +02:00
Jan
11bdf3b948 Remove unused DTOs and entities in Premise handling.
Deleted unused classes and entities like `AllUpdateDTO`, `MasterDataUpdateDTO`, and `PremissRoute`. Updated `PremisesService` and repository structure for improved functionality and maintainability, including refactoring queries and adding mappers.
2025-04-18 22:09:00 +02:00
Jan
c0fc174510 Add Excel sheet extraction logic to mappers and services
Implemented methods to extract and map data from Excel sheets for various entities such as rates, nodes, and packaging. Enhanced header validation and added support for parsing Excel inputs in the `BulkFileProcessingService`.
2025-04-16 15:58:32 +02:00
Jan
1a57d7dc3d Refactor hidden sheet creation logic in export services
Consolidated hidden sheet creation logic into a unified structure to improve code maintainability and reduce duplication. Adjusted mappers to ensure bulk file-specific hidden sheets are created, styled, and protected consistently. Added support for a configurable sheet password and introduced a new method in BulkExportService for enhanced period handling.
2025-04-16 11:25:55 +02:00
Jan
af76f6821b Refactor bulk services and enhance database schema.
Replaced `TemplateGenerationService` with `TemplateExportService` and introduced `ExcelMapper` classes for enhanced sheet handling. Updated the database schema to refine node predecessor handling and added new utility methods in repositories. These changes aim to improve bulk operations and data consistency.
2025-04-15 22:09:47 +02:00
Jan
2f58b0b3ba Refactor rates and validity period handling structure
Removed CountryMatrixRate and integrated improved validity period management, including new repositories and services. Introduced ValidityPeriodService, updated route mappings in RateController, and replaced PropertySetState with ValidityPeriodState. Adjusted related classes for consistency and clarity.
2025-04-13 11:55:59 +02:00
Jan
298504384f Remove packaging-related DTOs and services, add user node functionality
The commit eliminates packaging-related DTOs, services, and transformers that are no longer in use. It introduces functionality to support user node management, including repository methods, new DTOs, and a GeoApiService placeholder. Adjustments were also made to schema constraints and node transformations.
2025-04-12 16:22:02 +02:00
Jan
7eb5667d32 Remove obsolete packaging and property-related code.
Eliminates unused controllers, services, DTOs, and models for packaging and property types from the codebase. Streamlines the repository by renaming and refactoring existing classes to improve module organization.
2025-04-11 17:48:26 +02:00
Jan
2c0707717e Refactor country-related modules for clarity and extensibility
Renamed classes and methods to improve naming consistency and enhance readability. Introduced overloaded `listCountries` methods handling both paginated and full data retrieval. Adjusted query logic and added documentation for improved maintainability.
2025-04-11 13:55:04 +02:00
Jan
16ee413ce0 Refactor repositories and services for user and group management
Added full CRUD functionality for users and groups with JDBC templates, including pagination and group membership management. Refactored service layers to streamline DTO transformations and repository interactions.
2025-04-11 13:52:24 +02:00
Jan
8608fe349b Remove obsolete controllers and repositories.
This commit deletes unused controllers like PremiseController and repos such as NodeRepository. It also introduces new DTOs, services, and updates existing ones for improved modularity and functionality. These changes streamline the codebase and enhance maintainability.
2025-04-10 15:51:26 +02:00
Jan
dd830e0097 Rename "sink" references to "destination" in schema
Updated column names, table names, indexes, and foreign key references to replace "sink" with "destination" for consistency and clarity. Added new cost-related fields to the "premiss_destination" table to better represent associated expenses.
2025-04-08 12:54:58 +02:00
Jan
851c7823e0 Remove unused DTOs and services.
Unused DTOs and transformation services were removed to clean up the codebase and reduce clutter. Added new utility exceptions and DTOs, including `NotFoundException`, `ReferencedException`, and `LocationDTO`, to improve error handling and code organization.
2025-03-30 21:17:52 +02:00
Jan
b55aca0ddf Add DTOs, repositories, and logic for properties management.
Introduced new DTOs for handling properties at the packaging and country levels, alongside corresponding repositories and property validation. Enhanced CountryService and PackagingService with update and retrieval logic for property values. Updated database schema to support unique constraints and property mapping.
2025-03-29 21:14:03 +01:00
Jan
c5096b129b Remove outdated DTOs and refactor material-related services
Removed legacy DTOs (`PackagingDTO`, `PackagingListEntry`, etc.) that were no longer in use. Introduced modular, type-specific DTOs (`MaterialGetDTO`, `MaterialPostDTO`, etc.) and improved service layer responsibilities with a new `MaterialTransformerService`. This enhances maintainability and prepares for future feature extensions.
2025-03-28 21:35:55 +01:00
Jan
631a5c2f53 Refactor packaging and material models for improved clarity
Introduced dedicated classes (`PackagingMaterial`, `MaterialPackaging`, `PackagingSupplier`, `MaterialSupplier`) to better encapsulate packaging and material-related data. Updated repository methods and model references to ensure proper use of the new classes, improving maintainability and reducing ambiguity in the domain model.
2025-03-26 21:37:27 +01:00
Jan
2b0ee0d417 Refactor packaging-related classes and add new repository/service/controller.
Replaced `SearchQueryResult` utility class with a more robust `SearchQueryResult` under a new pagination package. Introduced `PackagingRepository` and `PackagingController` to manage packaging entities. Enhanced data models with new entities (`NodeType`, `PackagingDimension`), and updated existing ones (`Packaging`, `PackagingListEntry`) to improve modularity and support handling units.
2025-03-25 21:20:22 +01:00
Jan
6467a17cf8 Make CREATE TABLE statements idempotent with IF NOT EXISTS
Updated all CREATE TABLE statements to include the "IF NOT EXISTS" clause, ensuring schema initialization does not fail if tables already exist. Additionally, reorganized and split some table definitions for better modularity and maintainability.
2025-03-25 21:18:18 +01:00
Jan
e09983953a Refactor MaterialController to use MaterialService
Replaced direct MaterialRepository usage in MaterialController with MaterialService to encapsulate business logic. Introduced MaterialService, centralizing operations like create, update, and delete while adding normalization for part numbers. Updated MaterialRepository with a new `create` method and adjusted `getById` for clarity.
2025-03-25 10:54:54 +01:00
Jan
a1c8ef6b1b Add models, DTOs, repository, and controller for materials
Integrated Material domain entities with DTOs, repository, and controller, enabling CRUD functionality, pagination, and validation. Added utility classes like `UnitConverter`, and exception handling via global handlers. New classes include models for packaging, countries, and error handling structures.
2025-03-23 20:36:28 +01:00
Jan
332fd96eee Add user reference field in SysUserNode
Introduced a `user` field with `AggregateReference` to link SysUserNode to SysUser. This ensures better relational mapping and enforces non-null constraints with `@NotNull` and proper column mapping.
2025-03-21 21:15:00 +01:00
Jan
71639aac57 Add repository interfaces for core domain models
Introduce CrudRepository interfaces for managing core entities such as Premiss, SysUser, Material, and others. These additions enable basic CRUD operations for database interactions, streamlining persistence functionality in the application.
2025-03-21 21:14:23 +01:00
Jan
c4d3933061 Add entities for calculations, countries, rates, and nodes
Introduced several domain model classes for the application including `CalculationJob` and its related entities, `Country`, `RegionCode`, `ContainerRate`, and `DistanceMatrix`. These classes provide comprehensive data structures for logistics calculations, geographical mappings, and rate management.
2025-03-21 16:19:09 +01:00
Jan
d06bf1d881 Merge branch 'main' of git.avatic.de:avatic/lcc_tool 2025-03-20 19:10:09 +01:00
Jan
3e45368b3a Add comprehensive API documentation for LCC backend
This commit introduces a detailed README file outlining the LCC Backend API, including endpoint descriptions, request/response formats, and authentication methods. It covers various domains such as system configuration, transport rates, user management, calculations, and reporting. This documentation aims to assist developers in understanding and utilizing the API effectively.
2025-03-20 19:07:33 +01:00
Jan
b7866ad584 readme.md aktualisiert
Added link to database documentation
2025-03-18 11:22:29 +00:00
Jan
812441a9e0 Add comprehensive API documentation for LCC backend
This commit introduces a detailed README file outlining the LCC Backend API, including endpoint descriptions, request/response formats, and authentication methods. It covers various domains such as system configuration, transport rates, user management, calculations, and reporting. This documentation aims to assist developers in understanding and utilizing the API effectively.
2025-03-18 10:56:55 +01:00
Jan
19d8d236fa Add database schema and configuration properties
Introduced MySQL configuration and properties setup in `application.properties`. Added a comprehensive database schema covering users, logistics, packaging, and calculations. Updated `.gitignore` to exclude the `env.properties` file.
2025-02-25 18:31:47 +01:00
Jan
0f91ad44e8 first commit 2025-02-23 13:10:49 +01:00