Bug
This commit is contained in:
@@ -618,7 +618,7 @@ namespace Tnb.WarehouseMgr
|
||||
.ToListAsync();
|
||||
if (carryCodesPart?.Count > 0)
|
||||
{
|
||||
decimal codeQty = carryCodes.Sum(x => x.codeqty);
|
||||
decimal codeQty = carryCodesPart.Sum(x => x.codeqty);
|
||||
if (codeQty < os.pr_qty)
|
||||
{
|
||||
throw new AppFriendlyException($"需要出库[{os.pr_qty}],实际库存{codeQty},数量不足", 500);
|
||||
@@ -708,12 +708,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);
|
||||
|
||||
}
|
||||
locIds.AddRange(points.Select(x => x.location_id).ToList()!);
|
||||
//根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序)
|
||||
if (points?.Count > 0)
|
||||
{
|
||||
if (points.Count <= 2)
|
||||
if (points.Count < 2)
|
||||
{
|
||||
throw new AppFriendlyException("该路径不存在", 500);
|
||||
}
|
||||
@@ -730,6 +740,11 @@ namespace Tnb.WarehouseMgr
|
||||
startlocation_code = sPoint?.location_code ?? string.Empty,
|
||||
endlocation_id = ePoint?.location_id ?? string.Empty,
|
||||
endlocation_code = ePoint?.location_code ?? string.Empty,
|
||||
startpoint_id = sPoint.id,
|
||||
startpoint_code = sPoint.point_code,
|
||||
endpoint_id = ePoint.id,
|
||||
endpoint_code = ePoint.point_code,
|
||||
|
||||
start_floor = sPoint?.floor.ToString(),
|
||||
end_floor = ePoint?.floor.ToString(),
|
||||
bill_code = _billRullService.GetBillNumber(WmsWareHouseConst.WMS_PRETASK_H_ENCODE).GetAwaiter().GetResult(),
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user