Dev - #52
Merged
Merged
Conversation
…w condition when staff update in maintain/inspec , add new type waiting when create asset-item and method confirm
…e-asset-tag Create asset tag
- Introduced `PowerCutJob` entity, repository, and scheduler for managing power cut operations. - Added Kafka listener `ContractEventListeners` to handle `PowerCutConfirmedEvent` and create jobs. - Implemented `sendPowerCutCommand` in `IotProvisioningService` for IoT device interactions. - Enabled job execution through `executePendingPowerCuts` in `PowerCutScheduler` with periodic scheduling. - Extended IoT service with power cut command capabilities.
…re/create-iot-device Add power cut scheduling and job handling features
…e-asset-tag Create asset tag
…e-asset-tag modify method batch and upload assetImage
- Added `AreaPowerController` with endpoints to toggle and retrieve area power states. - Implemented `AreaPowerService` and its `AreaPowerServiceImpl` to manage power control logic. - Integrated AWS IoT Data Plane SDK for sending MQTT commands to IoT devices. - Introduced `AreaPowerState` entity and `AreaPowerStateRepository` for tracking power states and historical changes. - Updated `PowerCutScheduler` to mark all areas as payment restricted during scheduled cuts. - Added exception handling for custom HTTP response codes in `GlobalExceptionHandler`.
…re/create-iot-device Introduce Area Power Control feature with IoT integration
- Introduced `syncNodeCapabilitiesIfEmpty` in `IotProvisioningService` to handle capability updates only if unset. - Updated `provisionNode` method to accept and persist node capabilities during provisioning. - Added `SyncCapabilitiesRequest` DTO and corresponding controller endpoint for syncing capabilities. - Adjusted `ProvisionNodeRequest` to include capabilities parameter.
…re/create-iot-device Add node capabilities sync and update during provisioning
…ion` in `IotProvisioningServiceImpl`
…re/create-iot-device Replace `jakarta.ws.rs.NotFoundException` with custom `NotFoundExcept…
- Renamed `InternalIotController` base path to `/api/assets/internal/iot` for consistency. - Adjusted public endpoint in `SecurityConfig` to reflect the updated IoT API path. - Commented out role-based access control in `AreaPowerController` for power endpoints. - Updated `IoTDevice` entity to fix join column name inconsistency.
…re/create-iot-device Update IoT APIs and security configurations
- Corrected `MQTT_CMD_POWER_ON` and `MQTT_CMD_POWER_OFF` constants in `AreaPowerServiceImpl`. - Updated join column name in `IoTDevice` entity for consistency with database schema.
…re/create-iot-device Fix MQTT command constants and IoT device join column mapping
…e-asset-tag add method upload assetEventImage and modify batch
… in `AssetEventDto` - Added `findPreviousEvent` query to `AssetEventRepository` to retrieve earlier events for an asset. - Updated `getEventsByJob` in `AssetEventServiceImpl` to include mapping of old images from previous events. - Adjusted `AssetMapper` to ignore unmapped fields in `AssetCategory` and `AssetImage`. - Introduced `oldImages` field in `AssetEventDto` to hold historical event images.
…re/handle-inspection Add support for fetching previous asset events and mapping old images…
- Implemented unit tests for `AreaPowerServiceImpl` to verify power toggle and retrieval logic. - Added tests for `AssetCategoryServiceImpl` covering create, update, retrieve, and delete operations. - Introduced `AssetTagServiceImplTest` to validate tag attachment, transfer, and logging. - Developed `AssetConditionEventListenerTest` to handle Kafka events and error scenarios. - Included `AssetEventServiceImplTest` to test event creation, status updates, and image mapping.
…re/handle-inspection Add unit tests for service implementations and critical listeners
…ith @ResponseStatus
- Introduced `MessageSource` to support internationalized messages across controllers and services. - Replaced hardcoded response messages with message keys fetched from `MessageSource`. - Updated exception handling in `GlobalExceptionHandler` to leverage localized messages. - Added helper methods (`msg`, `msgOrRaw`) for simplified message retrieval with fallback handling. - Enhanced IoT, asset, and tag controllers with message key integration for responses.
- Added `.editorconfig` for consistent code style and formatting. - Introduced `I18nConfig` for internationalized message handling with default and supported locales (Vietnamese, English, Japanese). - Created `ForecastTriggerResultDto` for encapsulating IoT forecast trigger results. - Developed `IotForecastAdminController` with a secured endpoint to trigger forecasts for all houses. - Added message resources in three languages (`messages.properties`, `messages_en.properties`, `messages_ja.properties`) for localization.
…re/handle-inspection Feature/handle inspection
…tegrate with AssetItem creation and update
…ory, and initial migration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.