1
This commit is contained in:
@@ -88,12 +88,12 @@ namespace Tnb.WarehouseMgr
|
||||
ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == input.data[nameof(WmsPointH.location_id)].ToString());
|
||||
}
|
||||
int i = 0;
|
||||
|
||||
|
||||
|
||||
|
||||
//根据每个载具的起始库位做路径运算
|
||||
for (i = 0; i < setQty.qty; i++)
|
||||
{
|
||||
|
||||
|
||||
if (carrys?.Count > 0)
|
||||
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == carrys[i].location_id);
|
||||
var isOk = false;
|
||||
@@ -133,12 +133,12 @@ namespace Tnb.WarehouseMgr
|
||||
}).ToList();
|
||||
//更新页面
|
||||
//赋值签收状态
|
||||
if (loc.is_sign == 0)
|
||||
if (loc.is_sign == 0)
|
||||
{
|
||||
preTasks[^1].is_sign = 0; // 修改最后一个元素的是否签收值
|
||||
}
|
||||
isOk = await _wareHouseService.GenPreTask(preTasks, null);
|
||||
|
||||
|
||||
}
|
||||
if (isOk)
|
||||
{
|
||||
@@ -150,7 +150,7 @@ namespace Tnb.WarehouseMgr
|
||||
preTaskUpInput.LocationIds = points.Select(x => x.location_id).ToList();
|
||||
|
||||
//更新明细表
|
||||
WmsEmptyOutstockD wmsEmptyOutstockD = new ();
|
||||
WmsEmptyOutstockD wmsEmptyOutstockD = new();
|
||||
wmsEmptyOutstockD.id = SnowflakeIdHelper.NextId();
|
||||
wmsEmptyOutstockD.bill_id = preTaskUpInput.RquireId;
|
||||
wmsEmptyOutstockD.biz_type = WmsWareHouseConst.BIZTYPE_WMSEPTYOUTSTK_ID;
|
||||
@@ -166,11 +166,11 @@ namespace Tnb.WarehouseMgr
|
||||
//根据空载具出库Id,回更单据状态
|
||||
await _db.Updateable<WmsEmptyOutstockH>().SetColumns(it => new WmsEmptyOutstockH { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.RquireId).ExecuteCommandAsync();
|
||||
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput,
|
||||
it => new WmsCarryH { is_lock = 1},
|
||||
it => new WmsCarryH { is_lock = 1 },
|
||||
it => new BasLocation { is_lock = 1 });
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
@@ -191,9 +191,10 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
var emptyCarrys = await _db.Queryable<WmsEmptyOutstockD>().Where(it => it.bill_id == input.requireId).ToListAsync();
|
||||
// 判断所有明细是否都完成
|
||||
if (emptyCarrys.All(x=> x.status == WmsWareHouseConst.BILLSTATUS_COMPLETE_ID)) {
|
||||
await _db.Updateable<WmsEmptyOutstockH>().SetColumns(it=> new WmsEmptyOutstockH { status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID }).Where(it => it.id == input.requireId).ExecuteCommandHasChangeAsync();
|
||||
}
|
||||
if (emptyCarrys?.Count > 0 && emptyCarrys.All(x => x.status == WmsWareHouseConst.BILLSTATUS_COMPLETE_ID))
|
||||
{
|
||||
await _db.Updateable<WmsEmptyOutstockH>().SetColumns(it => new WmsEmptyOutstockH { status = WmsWareHouseConst.BILLSTATUS_COMPLETE_ID }).Where(it => it.id == input.requireId).ExecuteCommandHasChangeAsync();
|
||||
}
|
||||
if (!isOk) throw Oops.Oh(ErrorCode.COM1001);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user