This commit is contained in:
qianjiawei
2023-12-20 09:39:34 +08:00
parent 296c618bf5
commit c45c3542a3
4 changed files with 180 additions and 28 deletions

View File

@@ -117,11 +117,22 @@ namespace Tnb.WarehouseMgr
if (sPoint != null && ePoint != null)
{
List<WmsPointH> points = await _wareHouseService!.PathAlgorithms(sPoint.id, ePoint.id);
List<WmsPointH> points=new List<WmsPointH>();
try
{
points = await _wareHouseService!.PathAlgorithms(sPoint.id, ePoint.id);
}
catch (Exception)
{
points.Add(sPoint);
points.Add(ePoint);
}
//根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序)
if (points?.Count > 0)
{
if (points.Count <= 2)
if (points.Count < 2)
{
throw new AppFriendlyException("该路径不存在", 500);
}