齐套搭配方案,查询接口代码调整

This commit is contained in:
alex
2023-07-21 10:31:19 +08:00
parent 7bb60e3018
commit cba5adf5f3
6 changed files with 21 additions and 10 deletions

View File

@@ -6,6 +6,7 @@ using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;
using System.Transactions;
using Aop.Api.Domain;
using JNPF.Common.Core.Manager;
using JNPF.Common.Dtos.VisualDev;
@@ -304,7 +305,7 @@ namespace Tnb.WarehouseMgr
carrys.Add(carry);
if (carrys?.Count > 0)
{
await _db.Ado.BeginTranAsync();
await _db.Ado.BeginTranAsync();
var tasks = new List<Task<int>>();
foreach (var carryIt in carrys)
{
@@ -313,7 +314,9 @@ namespace Tnb.WarehouseMgr
var all = await Task.WhenAll(tasks);
await _db.Ado.CommitTranAsync();
if (all.All(x => x > 0))
{
isOk = all?.Length > 0;
}
}
}
if (!isOk) throw Oops.Oh(ErrorCode.COM1001);