Skip to content

Dev - #52

Merged
hoangtuzami merged 35 commits into
mainfrom
dev
May 7, 2026
Merged

Dev#52
hoangtuzami merged 35 commits into
mainfrom
dev

Conversation

@hoangtuzami

Copy link
Copy Markdown
Member

No description provided.

RockyDuy and others added 30 commits April 10, 2026 14:30
…w condition when staff update in maintain/inspec , add new type waiting when create asset-item and method confirm
- 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

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
…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
- 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.
hoangtuzami and others added 5 commits April 17, 2026 02:23
- 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
@hoangtuzami
hoangtuzami merged commit 969e7eb into main May 7, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants