空载具出库为单载具新增
This commit is contained in:
@@ -1047,7 +1047,7 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
throw new AppFriendlyException("电梯被禁用或未配置", 500);
|
||||
}
|
||||
if(Math.Abs(ele) % 2 == 1)
|
||||
if(ele % 2 == 1)
|
||||
{
|
||||
//判断电梯组中各电梯任务数
|
||||
if (curEle == null || sGpEle.FindAll(x => Math.Abs(x.task_nums - curEle.task_nums) % 2 == 1)?.Count > 0)
|
||||
|
||||
@@ -111,8 +111,6 @@ namespace Tnb.WarehouseMgr
|
||||
if (carrys?.Count > 0)
|
||||
{
|
||||
int min = (carrys.Count > setQty.qty) ? setQty.qty : carrys.Count;
|
||||
//当出现多个载具同时出库,可能需要进入电梯时
|
||||
int ele = 2;
|
||||
for (int i = 0; i < min; i++)
|
||||
{
|
||||
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == carrys[i].location_id);
|
||||
@@ -120,7 +118,7 @@ namespace Tnb.WarehouseMgr
|
||||
bool isOk = false;
|
||||
if (sPoint != null && ePoint != null)
|
||||
{
|
||||
List<WmsPointH> points = await _wareHouseService.PathAlgorithmsEle(sPoint.id, ePoint.id ,ele);
|
||||
List<WmsPointH> points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||
if (points.Count <= 2)
|
||||
{
|
||||
throw new AppFriendlyException("该路径不存在", 500);
|
||||
@@ -168,13 +166,7 @@ namespace Tnb.WarehouseMgr
|
||||
{
|
||||
preTasks[^1].is_sign = 0; // 修改最后一个元素的是否签收值
|
||||
}
|
||||
isOk = await _wareHouseService.GenPreTask(preTasks, null!);
|
||||
//判断当前任务中 是否有电梯任务。有的话ele+1
|
||||
var eleP = preTasks.Find(x => x.area_code.Contains("ELE"));
|
||||
if (eleP != null)
|
||||
{
|
||||
ele++;
|
||||
}
|
||||
isOk = await _wareHouseService.GenPreTask(preTasks, null!);
|
||||
}
|
||||
if (isOk)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user