wms通用函数,更新载具时同时更新库位编码
This commit is contained in:
@@ -433,10 +433,10 @@ namespace Tnb.WarehouseMgr
|
||||
//更新载具,锁定状态为未锁定,更新载具的库位当前任务的目标库位
|
||||
if (disTasks?.Count > 0)
|
||||
{
|
||||
var multiList = disTasks.Select(it => (it.carry_id, it.endlocation_id)).ToList();
|
||||
var multiList = disTasks.Select(it => (it.carry_id, it.endlocation_id, it.endlocation_code)).ToList();
|
||||
for (int i = 0; i < multiList.Count; i++)
|
||||
{
|
||||
await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { is_lock = 0, location_id = multiList[i].endlocation_id }).Where(it => it.id == multiList[i].carry_id).ExecuteCommandAsync();
|
||||
await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { is_lock = 0, location_id = multiList[i].endlocation_id, location_code = multiList[i].endlocation_code }).Where(it => it.id == multiList[i].carry_id).ExecuteCommandAsync();
|
||||
}
|
||||
}
|
||||
//更新库位信息,使用状态为 使用,锁定状态为未锁定
|
||||
@@ -459,7 +459,7 @@ namespace Tnb.WarehouseMgr
|
||||
foreach (var dt in disTasks)
|
||||
{
|
||||
var disTaskCodes = await _db.Queryable<WmsDistaskCode>().Where(it => it.bill_id == dt.id).ToListAsync();
|
||||
var upInput = new WareHouseUpInput { bizTypeId = dt.biz_type, requireId = dt.require_id, distaskCodes = disTaskCodes , carryIds = disTasks.Select(x=>x.carry_id).ToList()};
|
||||
var upInput = new WareHouseUpInput { bizTypeId = dt.biz_type, requireId = dt.require_id, distaskCodes = disTaskCodes, carryIds = disTasks.Select(x => x.carry_id).ToList() };
|
||||
upInput.loginType = !_userManager.LoginType.IsNullOrEmpty() ? "app" : "web";
|
||||
if (dt.is_sign == 1) //区分出入库操作
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user