优化
This commit is contained in:
@@ -75,9 +75,9 @@ namespace Tnb.WarehouseMgr
|
||||
foreach (var ko in kittingOuts)
|
||||
{
|
||||
var carrys = await _db.Queryable<WmsCarryH>()
|
||||
.InnerJoin<WmsCollocationSchemeH>((a,b) => a.collocation_scheme_id == b.id)
|
||||
.InnerJoin<WmsCollocationSchemeH>((a, b) => a.collocation_scheme_id == b.id)
|
||||
.Where(a => a.collocation_scheme_id == ko.collocation_scheme_id && a.is_lock == 0)
|
||||
.OrderBy((a,b)=>b.seq)
|
||||
.OrderBy((a, b) => b.seq)
|
||||
.ToListAsync();
|
||||
if (carrys?.Count > 0)
|
||||
{
|
||||
@@ -158,7 +158,7 @@ namespace Tnb.WarehouseMgr
|
||||
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == ko.carry_id);
|
||||
if (carry != null)
|
||||
{
|
||||
|
||||
|
||||
WmsPointH sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == carry.location_id);
|
||||
WmsPointH ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == ko.location_id);
|
||||
if (sPoint != null && ePoint != null)
|
||||
@@ -237,7 +237,6 @@ namespace Tnb.WarehouseMgr
|
||||
var carryId = input.carryIds[^input.carryIds.Count];
|
||||
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.id == carryId);
|
||||
var kods = await _db.Queryable<WmsKittingoutD>().Where(it => it.bill_id == input.requireId).ToListAsync();
|
||||
|
||||
//载具为料架时,取所有料箱的条码
|
||||
List<string> carryMIds = new();
|
||||
if (carry.carrystd_id == WmsWareHouseConst.CARRY_LJSTD_ID)
|
||||
@@ -293,7 +292,7 @@ namespace Tnb.WarehouseMgr
|
||||
//判断当前载具是否为料架,如果是料架 清空所有料架/料箱数据,
|
||||
if (carry.carrystd_id == WmsWareHouseConst.CARRY_LJSTD_ID)
|
||||
{
|
||||
var carrys = await _db.Queryable<WmsCarryH>().Where(it => carryMIds.Contains(it.id)).ToListAsync();
|
||||
var carrys = await _db.Queryable<WmsCarryH>().Where(it => carryMIds.Contains(it.id)).ToListAsync();
|
||||
carrys.Add(carry);
|
||||
if (carrys?.Count > 0)
|
||||
{
|
||||
@@ -329,7 +328,7 @@ namespace Tnb.WarehouseMgr
|
||||
if (input.IsNull()) throw new ArgumentNullException("input");
|
||||
try
|
||||
{
|
||||
|
||||
|
||||
await _db.Ado.BeginTranAsync();
|
||||
List<WmsKittingoutD> kittingOutDs = new();
|
||||
var kittingOuts = input.Adapt<List<WmsKittingoutH>>();
|
||||
|
||||
Reference in New Issue
Block a user