修复bug

This commit is contained in:
18942506660
2023-12-21 11:13:02 +08:00
parent c51ce14345
commit f698909f9e
2 changed files with 12 additions and 11 deletions

View File

@@ -150,17 +150,18 @@ namespace WMS.Web.Domain.Services
/// <returns></returns>
public Task<Result> Sync(OperateRequest dto)
{
var list = _takeStockRepositories.GetEntityList(dto.Ids).GetAwaiter().GetResult();
list = list.Where(w => w.SuccessSync == SyncStatus.Fail || w.SuccessSync == SyncStatus.SyncIng).ToList();
foreach (var entity in list)
Task.Run(async () =>
{
Task.Run(async () =>
var list = _takeStockRepositories.GetEntityList(dto.Ids).GetAwaiter().GetResult();
list = list.Where(w => w.SuccessSync == SyncStatus.Fail || w.SuccessSync == SyncStatus.SyncIng).ToList();
foreach (var entity in list)
{
var res = await Loss_Profit(entity);
if (!res.IsSuccess)
_logger.LogError($"盘点同步失败:{res.Message}");
});
}
}
});
return Task.FromResult(Result.ReSuccess());
}