齐套搭配方案,查询接口代码调整
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user