1、新增预任务生成帮助类

2、齐套配送接口参数调整
This commit is contained in:
yang.lee
2023-11-23 14:13:03 +08:00
parent 242ec34a9a
commit 71c4dbd254
8 changed files with 217 additions and 37 deletions

View File

@@ -1041,16 +1041,23 @@ namespace Tnb.WarehouseMgr
{
if (points.FindAll(x => x.location_code != null && x.location_code.Contains("dt", StringComparison.OrdinalIgnoreCase))?.Count > 0)
{
Logger.Information("获取当前电梯点");
//查询当前电梯点
List<WmsElevatorD> curEleDs = await _db.Queryable<WmsElevatorD>().Where(it => points.Select(x => x.id).Contains(it.point_id)).ToListAsync();
Logger.Information($"当前电梯点:{string.Join(",",curEleDs.Select(x=>x.point_code))}");
//如果有电梯点,则会进行电梯的均匀分配
if (curEleDs?.Count > 0)
{
//当前电梯
WmsElevatorH curEle = await _db.Queryable<WmsElevatorH>().SingleAsync(it => it.id == curEleDs.First().bill_id && it.enabled == 1);
Logger.Debug($"档期电梯信息:{JsonConvert.SerializeObject(curEle)}");
//同电梯组电梯
List<WmsElevatorH> sGpEle = await _db.Queryable<WmsElevatorH>().Where(it => it.elevator_group == curEle.elevator_group && it.id != curEle.id && it.enabled == 1).ToListAsync();
Logger.Debug($"同电梯组电梯:{JsonConvert.SerializeObject(sGpEle)}");
if (curEle == null && sGpEle?.Count > 0)
{
throw new AppFriendlyException("电梯被禁用或未配置", 500);