This commit is contained in:
FanLian
2023-06-16 09:20:49 +08:00
4 changed files with 38 additions and 32 deletions

View File

@@ -36,6 +36,8 @@ namespace Tnb.WarehouseMgr
}
}
protected async Task DoUpdate(WareHouseUpInput input)
{
if (_serviceMap.ContainsKey(input.bizTypeId))

View File

@@ -227,6 +227,8 @@ namespace Tnb.WarehouseMgr
{
//任务链属性处理内部函数
async Task _taskChainAttrHandle(List<WmsDistaskH> items, List<WmsPretaskH> areaPreTasks, int moveNum)
{
await Task.Run(() =>
{
if (moveNum == 1 || (moveNum > areaPreTasks.Count && areaPreTasks.Count == 1))
{
@@ -248,6 +250,8 @@ namespace Tnb.WarehouseMgr
}
items[items.Count - 1].chain_type = "3";
}
});
}
//获取所有未下发的预任务申请
@@ -485,16 +489,16 @@ namespace Tnb.WarehouseMgr
await _db.Insertable(input.PreTaskHandleCodes).ExecuteCommandAsync();
}
//根据载具ID更新是否锁定和赋值起始库位
if (!input.IsCheck.HasValue)
{
await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { is_lock = 1, location_id = input.CarryStartLocationId, location_code = input.CarryStartLocationCode }).Where(it => it.id == input.CarryId).ExecuteCommandAsync();
}
else
{
await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { is_check = input.IsCheck.Value, is_lock = 1, location_id = input.CarryStartLocationId, location_code = input.CarryStartLocationCode }).Where(it => it.id == input.CarryId).ExecuteCommandAsync();
}
//根据所有库位更新库位的锁定状态为“锁定”
await _db.Updateable<BasLocation>().SetColumns(it => new BasLocation { is_lock = 1 }).Where(it => input.LocationIds.Contains(it.id)).ExecuteCommandAsync();
//if (!input.IsCheck.HasValue)
//{
// await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { is_lock = 1, location_id = input.CarryStartLocationId, location_code = input.CarryStartLocationCode }).Where(it => it.id == input.CarryId).ExecuteCommandAsync();
//}
//else
//{
// await _db.Updateable<WmsCarryH>().SetColumns(it => new WmsCarryH { is_check = input.IsCheck.Value, is_lock = 1, location_id = input.CarryStartLocationId, location_code = input.CarryStartLocationCode }).Where(it => it.id == input.CarryId).ExecuteCommandAsync();
//}
////根据所有库位更新库位的锁定状态为“锁定”
//await _db.Updateable<BasLocation>().SetColumns(it => new BasLocation { is_lock = 1 }).Where(it => input.LocationIds.Contains(it.id)).ExecuteCommandAsync();
await _db.Ado.CommitTranAsync();
}
catch (Exception)

View File

@@ -140,7 +140,7 @@ namespace Tnb.WarehouseMgr
handleH.create_time = DateTime.Now;
preTaskUpInput.PreTaskRecord = handleH;
//根据空载具入库Id回更单据状态
await _db.Updateable<WmsEmptyInstock>().SetColumns(it => new WmsEmptyInstock { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.PreTaskId).ExecuteCommandAsync();
await _db.Updateable<WmsEmptyInstock>().SetColumns(it => new WmsEmptyInstock { status = WmsWareHouseConst.BILLSTATUS_ON_ID }).Where(it => it.id == preTaskUpInput.RquireId).ExecuteCommandAsync();
await _wareHouseService.GenInStockTaskHandleAfter(preTaskUpInput);
}

View File

@@ -151,7 +151,7 @@ namespace Tnb.WarehouseMgr
var materialId = jo.Value<string>(nameof(WmsHandleCode.material_id));
WmsHandleCode handleCode = new();
handleCode.bill_id = operBillId;
handleCode.material_id = jo.Value<string>(nameof(WmsHandleCode.material_id));
handleCode.material_id = materialId;
handleCode.material_code = jo.Value<string>(nameof(WmsHandleCode.material_code));
handleCode.barcode = jo.Value<string>(nameof(WmsHandleCode.barcode));
handleCode.code_batch = jo.Value<string>(nameof(WmsHandleCode.code_batch));