bug
This commit is contained in:
@@ -93,10 +93,19 @@ namespace Tnb.WarehouseMgr
|
|||||||
|
|
||||||
if (sPoint != null && ePoint != null)
|
if (sPoint != null && ePoint != null)
|
||||||
{
|
{
|
||||||
List<WmsPointH> points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
List<WmsPointH> points = new List<WmsPointH>();
|
||||||
if (points.Count <= 2)
|
if (sPoint.area_code != ePoint.area_code)
|
||||||
{
|
{
|
||||||
throw new AppFriendlyException("该路径不存在", 500);
|
points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||||
|
if (points.Count <= 2)
|
||||||
|
{
|
||||||
|
throw new AppFriendlyException("该路径不存在", 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
points.Add(sPoint);
|
||||||
|
points.Add(ePoint);
|
||||||
}
|
}
|
||||||
//根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序)
|
//根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序)
|
||||||
if (points?.Count > 0)
|
if (points?.Count > 0)
|
||||||
|
|||||||
@@ -198,7 +198,8 @@ namespace Tnb.WarehouseMgr
|
|||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
return await Task.FromResult(false);
|
await _db.Ado.RollbackTranAsync();
|
||||||
|
throw;
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -98,11 +98,19 @@ namespace Tnb.WarehouseMgr
|
|||||||
|
|
||||||
if (sPoint != null && ePoint != null)
|
if (sPoint != null && ePoint != null)
|
||||||
{
|
{
|
||||||
List<WmsPointH>? points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
List<WmsPointH> points = new List<WmsPointH>();
|
||||||
//根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序)
|
if (sPoint.area_code != ePoint.area_code)
|
||||||
if (points?.Count <= 2)
|
|
||||||
{
|
{
|
||||||
throw new AppFriendlyException("该路径不存在", 500);
|
points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||||
|
if (points.Count <= 2)
|
||||||
|
{
|
||||||
|
throw new AppFriendlyException("该路径不存在", 500);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
points.Add(sPoint);
|
||||||
|
points.Add(ePoint);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (points?.Count > 0)
|
if (points?.Count > 0)
|
||||||
|
|||||||
@@ -79,14 +79,24 @@ namespace Tnb.WarehouseMgr
|
|||||||
|
|
||||||
if (sPoint != null && ePoint != null)
|
if (sPoint != null && ePoint != null)
|
||||||
{
|
{
|
||||||
List<WmsPointH> points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
List<WmsPointH> points = new List<WmsPointH>();
|
||||||
//根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序)
|
if (sPoint.area_code != ePoint.area_code)
|
||||||
if (points?.Count > 0)
|
|
||||||
{
|
{
|
||||||
|
points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||||
if (points.Count <= 2)
|
if (points.Count <= 2)
|
||||||
{
|
{
|
||||||
throw new AppFriendlyException("该路径不存在", 500);
|
throw new AppFriendlyException("该路径不存在", 500);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
points.Add(sPoint);
|
||||||
|
points.Add(ePoint);
|
||||||
|
}
|
||||||
|
//根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序)
|
||||||
|
if (points?.Count > 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
List<WmsPretaskH> preTasks = points.Where(it => !it.location_id.IsNullOrEmpty()).GroupBy(g => g.area_code).Select(it =>
|
List<WmsPretaskH> preTasks = points.Where(it => !it.location_id.IsNullOrEmpty()).GroupBy(g => g.area_code).Select(it =>
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user