This commit is contained in:
FanLian
2023-07-20 17:59:52 +08:00
parent 70b78d9756
commit f4134375f6
3 changed files with 6 additions and 2 deletions

View File

@@ -304,12 +304,14 @@ namespace Tnb.WarehouseMgr
carrys.Add(carry);
if (carrys?.Count > 0)
{
await _db.Ado.BeginTranAsync();
var tasks = new List<Task<int>>();
foreach (var carryIt in carrys)
{
tasks.Add(_carryService.UpdateNullCarry(carryIt));
}
var all = await Task.WhenAll(tasks);
await _db.Ado.CommitTranAsync();
if (all.All(x => x > 0))
isOk = all?.Length > 0;
}