From 4595aa3a05197f50e3e31f51ba5952fbeadf101a Mon Sep 17 00:00:00 2001 From: liguoyang Date: Wed, 2 Apr 2025 17:24:29 +0800 Subject: [PATCH] =?UTF-8?q?fix=20registry=E8=A1=A8=E5=8F=AA=E4=B8=8B?= =?UTF-8?q?=E8=BD=BD=E4=B8=80=E6=AC=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Src/Dlhis.Middle/Entities/LocalDeviceEntity.cs | 8 ++++---- .../Services/Implements/DataDownloadService.cs | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Src/Dlhis.Middle/Entities/LocalDeviceEntity.cs b/Src/Dlhis.Middle/Entities/LocalDeviceEntity.cs index e3a9f833..e1c768ad 100644 --- a/Src/Dlhis.Middle/Entities/LocalDeviceEntity.cs +++ b/Src/Dlhis.Middle/Entities/LocalDeviceEntity.cs @@ -8,11 +8,11 @@ using SqlSugar.DbConvert; namespace Dlhis.Middle.Entities { [SugarTable(TableName = "Device")] - public class LocalDeviceEntity : SugarBaseEntity , ITenantId + public class LocalDeviceEntity : SugarBaseEntity, ITenantId { public new int Id { get; set; } - - /// + + /// /// 设备code /// [SugarColumn(ColumnDescription = "设备code")] @@ -58,7 +58,7 @@ namespace Dlhis.Middle.Entities /// /// 部署方向 /// - [SugarColumn(ColumnDescription = "部署方向", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))] + [SugarColumn(IsNullable = true, ColumnDescription = "部署方向", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))] public DeviceDeployDirectionEnumType? DeployDirection { get; set; } /// diff --git a/Src/Dlhis.Middle/Services/Implements/DataDownloadService.cs b/Src/Dlhis.Middle/Services/Implements/DataDownloadService.cs index 9f1e83bd..c57bdd0a 100644 --- a/Src/Dlhis.Middle/Services/Implements/DataDownloadService.cs +++ b/Src/Dlhis.Middle/Services/Implements/DataDownloadService.cs @@ -42,7 +42,10 @@ public class DataDownloadService : IDataDownloadService } await DownloadAsync(item); - await DownloadAsync(item); + if (!await _dbContext.Queryable().AnyAsync()) + { + await DownloadAsync(item); + } await DownloadAsync(item); await DownloadAsync(item);