fix registry表只下载一次
This commit is contained in:
@@ -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; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
/// <summary>
|
||||
/// 设备code
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "设备code")]
|
||||
@@ -58,7 +58,7 @@ namespace Dlhis.Middle.Entities
|
||||
/// <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; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -42,7 +42,10 @@ public class DataDownloadService : IDataDownloadService
|
||||
}
|
||||
|
||||
await DownloadAsync<LocalDeviceEntity>(item);
|
||||
await DownloadAsync<LocalDeviceRegistryEntity>(item);
|
||||
if (!await _dbContext.Queryable<LocalDeviceRegistryEntity>().AnyAsync())
|
||||
{
|
||||
await DownloadAsync<LocalDeviceRegistryEntity>(item);
|
||||
}
|
||||
|
||||
await DownloadAsync<LocalBusinessPlaceEntity>(item);
|
||||
await DownloadAsync<LocalBusinessShiftEntity>(item);
|
||||
|
||||
Reference in New Issue
Block a user