fix registry表只下载一次

This commit is contained in:
2025-04-02 17:24:29 +08:00
parent f227665aed
commit 4595aa3a05
2 changed files with 8 additions and 5 deletions

View File

@@ -58,7 +58,7 @@ namespace Dlhis.Middle.Entities
/// <summary> /// <summary>
/// 部署方向 /// 部署方向
/// </summary> /// </summary>
[SugarColumn(ColumnDescription = "部署方向", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))] [SugarColumn(IsNullable = true, ColumnDescription = "部署方向", ColumnDataType = "varchar(50)", SqlParameterDbType = typeof(EnumToStringConvert))]
public DeviceDeployDirectionEnumType? DeployDirection { get; set; } public DeviceDeployDirectionEnumType? DeployDirection { get; set; }
/// <summary> /// <summary>

View File

@@ -42,7 +42,10 @@ public class DataDownloadService : IDataDownloadService
} }
await DownloadAsync<LocalDeviceEntity>(item); await DownloadAsync<LocalDeviceEntity>(item);
if (!await _dbContext.Queryable<LocalDeviceRegistryEntity>().AnyAsync())
{
await DownloadAsync<LocalDeviceRegistryEntity>(item); await DownloadAsync<LocalDeviceRegistryEntity>(item);
}
await DownloadAsync<LocalBusinessPlaceEntity>(item); await DownloadAsync<LocalBusinessPlaceEntity>(item);
await DownloadAsync<LocalBusinessShiftEntity>(item); await DownloadAsync<LocalBusinessShiftEntity>(item);