fix 注册设备默认信息

This commit is contained in:
2024-05-24 15:01:25 +08:00
parent 9cc880253c
commit d056acf52e

View File

@@ -135,11 +135,13 @@ public class DeviceConnectService : IDeviceConnectService
{
if (device == null)
{
var templateCode = await _dbContext.Queryable<DeviceTemplateEntity>().Where(x => x.Name == "其他").Select(x => x.Code).FirstAsync();
device = new DeviceEntity
{
Code = Guid.NewGuid(),
ConnectionInfo = string.Empty,
TemplateCode = null,
ConnectionInfo = "{}",
TemplateCode = templateCode,
UniqueNo = uniqueNo,
TenantId = tenantId,
Supplier = string.Empty,