1
This commit is contained in:
@@ -36,12 +36,14 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected async Task DoUpdate(WareHouseUpInput input)
|
||||
{
|
||||
if (_serviceMap.ContainsKey(input.bizTypeId))
|
||||
{
|
||||
await _serviceMap[input.bizTypeId].ModifyAsync(input);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual Task ModifyAsync(WareHouseUpInput input)
|
||||
|
||||
@@ -228,26 +228,30 @@ namespace Tnb.WarehouseMgr
|
||||
//任务链属性处理内部函数
|
||||
async Task _taskChainAttrHandle(List<WmsDistaskH> items, List<WmsPretaskH> areaPreTasks, int moveNum)
|
||||
{
|
||||
if (moveNum == 1 || (moveNum > areaPreTasks.Count && areaPreTasks.Count == 1))
|
||||
{
|
||||
items.ForEach(x =>
|
||||
{
|
||||
x.is_chain = 0;
|
||||
await Task.Run(() =>
|
||||
{
|
||||
if (moveNum == 1 || (moveNum > areaPreTasks.Count && areaPreTasks.Count == 1))
|
||||
{
|
||||
items.ForEach(x =>
|
||||
{
|
||||
x.is_chain = 0;
|
||||
|
||||
x.chain_type = "0";
|
||||
});
|
||||
}
|
||||
else if ((moveNum > areaPreTasks.Count && areaPreTasks.Count > 1) || moveNum < areaPreTasks.Count)
|
||||
{
|
||||
items.ForEach(x => x.is_chain = 1);
|
||||
items[0].chain_type = "1";
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
if (i == 0 || i == items.Count - 1) continue;
|
||||
items[i].chain_type = "2";
|
||||
}
|
||||
items[items.Count - 1].chain_type = "3";
|
||||
}
|
||||
});
|
||||
|
||||
x.chain_type = "0";
|
||||
});
|
||||
}
|
||||
else if ((moveNum > areaPreTasks.Count && areaPreTasks.Count > 1) || moveNum < areaPreTasks.Count)
|
||||
{
|
||||
items.ForEach(x => x.is_chain = 1);
|
||||
items[0].chain_type = "1";
|
||||
for (int i = 0; i < items.Count; i++)
|
||||
{
|
||||
if (i == 0 || i == items.Count - 1) continue;
|
||||
items[i].chain_type = "2";
|
||||
}
|
||||
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)
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user