增加报错代码
This commit is contained in:
@@ -87,10 +87,10 @@ namespace Tnb.WarehouseMgr
|
||||
if (sPoint != null && ePoint != null)
|
||||
{
|
||||
var points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||
if (points.Count <= 2) throw new AppFriendlyException("该路径不存在", 500);
|
||||
//根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序)
|
||||
if (points?.Count > 0)
|
||||
else
|
||||
{
|
||||
if (points.Count <= 2) throw new AppFriendlyException("该路径不存在", 500);
|
||||
var preTasks = points.Where(it => !it.location_id.IsNullOrEmpty()).GroupBy(g => g.area_code).Select(it =>
|
||||
{
|
||||
var sPoint = it.FirstOrDefault();
|
||||
@@ -153,6 +153,10 @@ namespace Tnb.WarehouseMgr
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AppFriendlyException("起始库位不可用或无可用的目标库位",500);
|
||||
}
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user