修复数据类型属性不统一的问题

This commit is contained in:
2025-09-02 16:45:24 +08:00
parent b770abe3f9
commit 6d7636d664
16 changed files with 88 additions and 76 deletions

View File

@@ -27,7 +27,7 @@ public class VariableDto
public double AlarmMaxValue { get; set; }
public double AlarmDeadband { get; set; }
public ProtocolType Protocol { get; set; }
public CSharpDataType CSharpDataType { get; set; }
public DataType DataType { get; set; }
public string ConversionFormula { get; set; }
public DateTime CreatedAt { get; set; }
public DateTime UpdatedAt { get; set; }

View File

@@ -12,6 +12,7 @@ public class VariableTableDto
public string Description { get; set; }
public bool IsActive { get; set; }
public int DeviceId { get; set; }
public DeviceDto Device { get; set; }
public ProtocolType Protocol { get; set; }
public List<VariableDto> Variables { get; set; } = new();
}

View File

@@ -99,6 +99,7 @@ public class DeviceAppService : IDeviceAppService
throw new InvalidOperationException($"添加设备变量表失败,设备:{device.Name},变量表:{variableTable.Name}");
}
_mapper.Map(addVariableTable,dto.VariableTable);
dto.VariableTable.Device = dto.Device;
// 假设有设备菜单
if (dto.VariableTableMenu != null)