1
This commit is contained in:
@@ -26,7 +26,7 @@ using Tnb.WarehouseMgr.Interfaces;
|
|||||||
namespace Tnb.WarehouseMgr
|
namespace Tnb.WarehouseMgr
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 载具移入
|
/// 载具移出
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[OverideVisualDev(ModuleConsts.MODULE_WMSCARRYMOOUTSTK_ID)]
|
[OverideVisualDev(ModuleConsts.MODULE_WMSCARRYMOOUTSTK_ID)]
|
||||||
[ServiceModule(BizTypeId)]
|
[ServiceModule(BizTypeId)]
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 空载具入库
|
/// 空载具出库
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[OverideVisualDev(ModuleConsts.MODULE_WMSEMPTYINSTOCK_ID)]
|
[OverideVisualDev(ModuleConsts.MODULE_WMSEMPTYINSTOCK_ID)]
|
||||||
[ServiceModule(BizTypeId)]
|
[ServiceModule(BizTypeId)]
|
||||||
@@ -65,23 +65,33 @@ namespace Tnb.WarehouseMgr
|
|||||||
{
|
{
|
||||||
await _db.Ado.BeginTranAsync();
|
await _db.Ado.BeginTranAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_WMSEMPTYINSTOCK_ID, true);
|
VisualDevEntity? templateEntity = await _visualDevService.GetInfoById(ModuleConsts.MODULE_WMSEMPTYINSTOCK_ID, true);
|
||||||
await _runService.Create(templateEntity, input);
|
await _runService.Create(templateEntity, input);
|
||||||
////入库取终点
|
|
||||||
//var inStockStrategyInput = new InStockStrategyQuery { warehouse_id = input.data[nameof(InStockStrategyQuery.warehouse_id)].ToString(), Size = 1 };
|
/*//入库取终点
|
||||||
//var endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);
|
var inStockStrategyInput = new InStockStrategyQuery { warehouse_id = input.data[nameof(InStockStrategyQuery.warehouse_id)].ToString(), Size = 1 };
|
||||||
//出库取起点
|
var endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);*/
|
||||||
var carryStds = await _db.Queryable<WmsCarrystd>().Where(it => it.id == input.data[nameof(WmsEmptyOutstockH.carrystd_id)].ToString()).ToListAsync();
|
|
||||||
|
//出库取起点,获取所有符合输入的载具规格的载具
|
||||||
|
var setQty = await _db.Queryable<WmsEmptyOutstockH>().FirstAsync(it => it.bill_code == input.data[nameof(WmsEmptyOutstockH.bill_code)]);
|
||||||
|
var carrys = await _db.Queryable<WmsCarryH>().LeftJoin<BasLocation>((a, b) => a.location_id == b.id)
|
||||||
|
.Where(a => a.carrystd_id == input.data[nameof(WmsEmptyOutstockH.carrystd_id)].ToString())
|
||||||
|
.ToListAsync();
|
||||||
|
carrys.Where()
|
||||||
WmsPointH sPoint = null;
|
WmsPointH sPoint = null;
|
||||||
WmsPointH ePoint = null;
|
WmsPointH ePoint = null;
|
||||||
if (input.data.ContainsKey(nameof(WmsPointH.location_id)))
|
if (input.data.ContainsKey(nameof(WmsPointH.location_id)))
|
||||||
{
|
{
|
||||||
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == input.data[nameof(WmsPointH.location_id)].ToString());
|
ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == input.data[nameof(WmsPointH.location_id)].ToString());
|
||||||
}
|
}
|
||||||
if (endLocations?.Count > 0)
|
//根据每个载具的起始库位做路径运算
|
||||||
|
for(int i =0; i< setQty.qty ;i++)
|
||||||
{
|
{
|
||||||
ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == endLocations[0].id);
|
sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == carrys[i].location_id);
|
||||||
}
|
|
||||||
|
|
||||||
if (sPoint != null && ePoint != null)
|
if (sPoint != null && ePoint != null)
|
||||||
{
|
{
|
||||||
@@ -130,7 +140,7 @@ namespace Tnb.WarehouseMgr
|
|||||||
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
|
await _wareHouseService.GenTaskHandleAfter(preTaskUpInput);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
await _db.Ado.CommitTranAsync();
|
await _db.Ado.CommitTranAsync();
|
||||||
|
|||||||
Reference in New Issue
Block a user