From d056acf52eded660ab3e614d6c84b10499c293ab Mon Sep 17 00:00:00 2001 From: liguoyang Date: Fri, 24 May 2024 15:01:25 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E6=B3=A8=E5=86=8C=E8=AE=BE=E5=A4=87?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Device/Services/Implements/DeviceConnectService.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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,