任务完成时电梯任务数量减少,预任务生成时电梯任务数量增加
This commit is contained in:
@@ -125,12 +125,6 @@ namespace Tnb.WarehouseMgr
|
||||
return preTask;
|
||||
}).ToList();
|
||||
var isOk = await _wareHouseService.GenPreTask(preTasks, null!);
|
||||
//更新电梯任务数量
|
||||
var eleP = points.Find(x => x.area_code.Contains("ELE"));
|
||||
if (eleP != null)
|
||||
{
|
||||
await _db.Updateable<WmsElevatorH>().SetColumns(it => it.task_nums == it.task_nums + 1).Where(it => it.area_code == eleP.area_code).ExecuteCommandAsync();
|
||||
}
|
||||
if (isOk)
|
||||
{
|
||||
var preTaskUpInput = new GenPreTaskUpInput();
|
||||
@@ -162,6 +156,10 @@ namespace Tnb.WarehouseMgr
|
||||
it => new WmsCarryH { is_lock = 1, location_id = preTaskUpInput.CarryStartLocationId, location_code = preTaskUpInput.CarryStartLocationCode },
|
||||
it => new BasLocation { is_lock = 1 });
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AppFriendlyException("预任务生成失败,路径或者设备相关配置错误", 500);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user