bug
This commit is contained in:
@@ -71,8 +71,13 @@ namespace Tnb.WarehouseMgr
|
||||
carryOutPut.carryMats = await _db.Queryable<WmsCarryMat>().Where(it => it.carry_id == carryId).ToListAsync();
|
||||
return carryOutPut;
|
||||
}
|
||||
|
||||
|
||||
[HttpGet]
|
||||
public async Task<dynamic> GetCarryInfoByCode([FromRoute] string carrycode)
|
||||
{
|
||||
var carryOutPut = await _db.Queryable<WmsCarryH>().Where(it => it.carry_code == carrycode).FirstAsync();
|
||||
|
||||
return carryOutPut;
|
||||
}
|
||||
/// <summary>
|
||||
/// 更换载具
|
||||
/// </summary>
|
||||
|
||||
@@ -88,16 +88,22 @@ namespace Tnb.WarehouseMgr
|
||||
|
||||
if (sPoint != null && ePoint != null)
|
||||
{
|
||||
List<WmsPointH> points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||
//根据获取的路径点生成预任务,生成顺序必须预路径算法返回的起终点的顺序一致(预任务顺序)
|
||||
if (points?.Count > 0)
|
||||
List<WmsPointH> points = new List<WmsPointH>();
|
||||
if (sPoint.area_code != ePoint.area_code)
|
||||
{
|
||||
points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||
if (points.Count <= 2)
|
||||
{
|
||||
throw new AppFriendlyException("该路径不存在", 500);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
points.Add(sPoint);
|
||||
points.Add(ePoint);
|
||||
}
|
||||
|
||||
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 =>
|
||||
{
|
||||
WmsPointH? sPoint = it.FirstOrDefault();
|
||||
WmsPointH? ePoint = it.LastOrDefault();
|
||||
@@ -167,8 +173,6 @@ namespace Tnb.WarehouseMgr
|
||||
//((int)EnumCarryStatus.寄存).ToString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await _db.Ado.CommitTranAsync();
|
||||
}
|
||||
catch (Exception)
|
||||
|
||||
@@ -63,7 +63,7 @@ public class Startup : AppStartup
|
||||
services.AddSingleton<BackgroundService, TimedTaskBackgroundService>(sp => new TimedTaskBackgroundService());
|
||||
//var bgSvc = App.GetRequiredService<BackgroundService>();
|
||||
//bgSvc.StartAsync(CancellationToken.None);
|
||||
services.AddHostedService<RedisBackGround>();
|
||||
// services.AddHostedService<RedisBackGround>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user