补漏,调整
This commit is contained in:
@@ -270,10 +270,19 @@ namespace Tnb.WarehouseMgr
|
||||
//入库申请条码明细表
|
||||
List<WmsInstockCode> instockcodes = input.instockcodes.Adapt<List<WmsInstockCode>>();
|
||||
|
||||
var loc = await _db.Queryable<BasLocation>().FirstAsync(it => it.location_code == input.instock.location_code && it.is_type != EnumLocationType.存储库位.ToString());
|
||||
//入库取终点 //出库起点
|
||||
var inStockStrategyInput = new InStockStrategyQuery { warehouse_id = instock?.warehouse_id!, Size = 1 };
|
||||
var endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);
|
||||
WmsPointH sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == instock.location_id);
|
||||
WmsPointH ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == endLocations[0].id);
|
||||
|
||||
var carry = await _db.Queryable<WmsCarryH>().SingleAsync(it => it.carry_code == input.instock.carry_code);
|
||||
var loc = await _db.Queryable<BasLocation>().FirstAsync(it => it.id == endLocations[0].id);
|
||||
var isMatch = await IsCarryAndLocationMatchByCarryStd(carry, loc);
|
||||
if (!isMatch) throw new AppFriendlyException("库位与载具规格不匹配", 500);
|
||||
|
||||
loc = await _db.Queryable<BasLocation>().FirstAsync(it => it.location_code == input.instock.location_code && it.is_type != EnumLocationType.存储库位.ToString());
|
||||
|
||||
//如果数据不全或有误,
|
||||
if (carry.IsNull() || loc.IsNull() || instockds?.Count < 1 || instockcodes?.Count < 1)
|
||||
{
|
||||
@@ -329,13 +338,7 @@ namespace Tnb.WarehouseMgr
|
||||
await _db.Insertable(instockCOdes).CallEntityMethod(it => it.Create(orgId)).ExecuteCommandAsync();
|
||||
|
||||
//生成预任务申请
|
||||
//入库取终点 //出库起点
|
||||
var inStockStrategyInput = new InStockStrategyQuery { warehouse_id = instock?.warehouse_id!, Size = 1 };
|
||||
var endLocations = await _wareHouseService.InStockStrategy(inStockStrategyInput);
|
||||
WmsPointH sPoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == instock.location_id);
|
||||
WmsPointH ePoint = await _db.Queryable<WmsPointH>().FirstAsync(it => it.location_id == endLocations[0].id);
|
||||
|
||||
|
||||
|
||||
if (sPoint != null && ePoint != null)
|
||||
{
|
||||
var points = await _wareHouseService.PathAlgorithms(sPoint.id, ePoint.id);
|
||||
|
||||
Reference in New Issue
Block a user