继续修改触发器(未完成,修改一个触发器可以添加多个变量)

This commit is contained in:
2025-09-22 22:58:51 +08:00
parent 0f869cf410
commit 042bc15288
14 changed files with 434 additions and 121 deletions

View File

@@ -42,4 +42,14 @@ opcUaService.Disconnect();
### Testing
Unit tests for the OPC UA service are included in the `DMS.Infrastructure.UnitTests` project. Run them using your preferred test runner.
Unit tests for the OPC UA service are included in the `DMS.Infrastructure.UnitTests` project. Run them using your preferred test runner.
## Trigger System
The trigger system has been updated to support associating triggers with multiple variables instead of just one. This allows for more flexible trigger configurations where a single trigger can monitor multiple variables.
### Key Changes
- Modified `TriggerDefinition` to use a list of variable IDs instead of a single variable ID
- Added a new `TriggerVariables` table to maintain the many-to-many relationship between triggers and variables
- Updated the UI to support selecting multiple variables when creating or editing triggers
- Updated all related services and repositories to handle the new many-to-many relationship