diff --git a/Src/Dlhis.Basic/Device/Services/Implements/DeviceConnectService.cs b/Src/Dlhis.Basic/Device/Services/Implements/DeviceConnectService.cs index 223cede3..a322c77c 100644 --- a/Src/Dlhis.Basic/Device/Services/Implements/DeviceConnectService.cs +++ b/Src/Dlhis.Basic/Device/Services/Implements/DeviceConnectService.cs @@ -135,11 +135,13 @@ public class DeviceConnectService : IDeviceConnectService { if (device == null) { + var templateCode = await _dbContext.Queryable().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,