fix registry表只下载一次
This commit is contained in:
@@ -8,7 +8,7 @@ using SqlSugar.DbConvert;
|
|||||||
namespace Dlhis.Middle.Entities
|
namespace Dlhis.Middle.Entities
|
||||||
{
|
{
|
||||||
[SugarTable(TableName = "Device")]
|
[SugarTable(TableName = "Device")]
|
||||||
public class LocalDeviceEntity : SugarBaseEntity , ITenantId
|
public class LocalDeviceEntity : SugarBaseEntity, ITenantId
|
||||||
{
|
{
|
||||||
public new int Id { get; set; }
|
public new int Id { get; set; }
|
||||||
|
|
||||||
@@ -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>
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user