屏蔽锁库存的功能
This commit is contained in:
@ -695,15 +695,15 @@ namespace WCS.BLL.HardWare
|
||||
}
|
||||
|
||||
var currentOutStoreMatSns = CurrentOutStoreMatSNs.ToList();
|
||||
Task.Run(() =>
|
||||
{
|
||||
var matDetails = DbHelp.db.Queryable<InventoryDetail>()
|
||||
.Where(t => currentOutStoreMatSns.Contains(t.MatSN))
|
||||
.Where(t => t.IsLocked)
|
||||
.ToList();
|
||||
matDetails.ForEach(t => t.IsLocked = false);
|
||||
DbHelp.db.Updateable(matDetails).ExecuteCommand();
|
||||
});
|
||||
//Task.Run(() =>
|
||||
//{
|
||||
// var matDetails = DbHelp.db.Queryable<InventoryDetail>()
|
||||
// .Where(t => currentOutStoreMatSns.Contains(t.MatSN))
|
||||
// .Where(t => t.IsLocked)
|
||||
// .ToList();
|
||||
// matDetails.ForEach(t => t.IsLocked = false);
|
||||
// DbHelp.db.Updateable(matDetails).ExecuteCommand();
|
||||
//});
|
||||
|
||||
|
||||
CurrentOutStoreMatSNs.Clear();
|
||||
|
@ -198,11 +198,11 @@ namespace WCS.BLL.Services.Service
|
||||
#region 保存数据
|
||||
|
||||
//锁库存
|
||||
inventoryDetails.ForEach(t =>
|
||||
{
|
||||
t.IsLocked = true;
|
||||
});
|
||||
var lockTask = DbHelp.db.Updateable(inventoryDetails).ExecuteCommandAsync();
|
||||
//inventoryDetails.ForEach(t =>
|
||||
//{
|
||||
// t.IsLocked = true;
|
||||
//});
|
||||
//var lockTask = DbHelp.db.Updateable(inventoryDetails).ExecuteCommandAsync();
|
||||
|
||||
//保存数据
|
||||
var order = new OutOrder()
|
||||
@ -239,7 +239,7 @@ namespace WCS.BLL.Services.Service
|
||||
await DbHelp.db.Insertable(orderMatDetail).ExecuteCommandAsync();
|
||||
}).ToList();
|
||||
|
||||
await lockTask;
|
||||
//await lockTask;
|
||||
await Task.WhenAll(matDetailTasks);
|
||||
|
||||
await DbHelp.db.CommitTranAsync();
|
||||
@ -1071,7 +1071,7 @@ namespace WCS.BLL.Services.Service
|
||||
});
|
||||
outOrderDetail.ReqQty = 0;
|
||||
|
||||
matInventoryDetails[i].IsLocked = true;
|
||||
//matInventoryDetails[i].IsLocked = true;
|
||||
DbHelp.db.Updateable(matInventoryDetails[i]).ExecuteCommand();
|
||||
}
|
||||
else
|
||||
@ -1098,7 +1098,7 @@ namespace WCS.BLL.Services.Service
|
||||
CreateUser = createUser,
|
||||
});
|
||||
|
||||
matInventoryDetails[i].IsLocked = true;
|
||||
//matInventoryDetails[i].IsLocked = true;
|
||||
DbHelp.db.Updateable(matInventoryDetails[i]).ExecuteCommand();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user