refactor:删除了DeviceDto,VariableDto,VariableTableDto,改为使用DMS.Core中的实体

This commit is contained in:
2025-10-07 17:51:24 +08:00
parent 94ad940e03
commit b753e5ea73
52 changed files with 291 additions and 463 deletions

View File

@@ -2,6 +2,7 @@ using DMS.Application.DTOs;
using DMS.Application.Events;
using DMS.Application.Interfaces;
using DMS.Core.Enums;
using DMS.Core.Models;
using DMS.Infrastructure.Interfaces.Services;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
@@ -113,7 +114,7 @@ namespace DMS.Infrastructure.Services.OpcUa
var variables = device.VariableTables?
.SelectMany(vt => vt.Variables)
.Where(v => v.IsActive && v.Protocol == ProtocolType.OpcUa)
.ToList() ?? new List<VariableDto>();
.ToList() ?? new List<Variable>();
_opcUaServiceManager.UpdateVariables(device.Id, variables);
}