增加出库策略

This commit is contained in:
FanLian
2023-07-31 16:34:44 +08:00
parent 61cb73711f
commit 5416aff03e
5 changed files with 7 additions and 4 deletions

View File

@@ -73,7 +73,8 @@ namespace Tnb.WarehouseMgr
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_WMSCARRYMOOUTSTK_ID, true);
await _runService.Create(templateEntity, input);
//入库取终点
//var OutStockStrategyInput = new OutStockStrategyQuery { carry_id = input.data[nameof(OutStockStrategyQuery.carry_id)].ToString(), Size = 1 };
var OutStockStrategyInput = new OutStockStrategyQuery { carry_id = input.data[nameof(OutStockStrategyQuery.carry_id)].ToString(), Size = 1 };
var outStkCarry = await _wareHouseService.OutStockStrategy(OutStockStrategyInput);
WmsPointH? sPoint = null;
WmsPointH? ePoint = null;
if (input.data.ContainsKey(nameof(WmsPointH.location_id)))
@@ -82,7 +83,7 @@ namespace Tnb.WarehouseMgr
}
if (carry != null)
{
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == carry.location_id);
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == outStkCarry[0].location_id);
}
if (sPoint != null && ePoint != null)