This commit is contained in:
2024-09-06 16:55:58 +08:00
parent 0ae9737a8b
commit 893e2fd7e0
3 changed files with 13 additions and 4 deletions

View File

@@ -89,7 +89,13 @@ namespace Tnb.WarehouseMgr
}
if (input.data.ContainsKey(nameof(WmsDelivery.endlocation_id)))
{
endLocationId = input.data[nameof(WmsDelivery.endlocation_id)]?.ToString()!;
BasLocation endLocation = await _db.Queryable<BasLocation>().Where(x=>x.location_code==input.data[nameof(WmsDelivery.endlocation_id)].ToString()).FirstAsync();
if (endLocation == null)
{
throw Oops.Bah("未找到目标库位");
}
endLocationId = endLocation.id;
}
string[] locIds = new[] { startLocationId, endLocationId };
List<BasLocation> locs = await _basLocationService?.GetLocationInfobyIds(locIds)!;

View File

@@ -346,6 +346,7 @@ namespace Tnb.WarehouseMgr
// BasWarehouse scWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==wmsPrdInstockD.scwarehouse_id);
// BasWarehouse kcWarehouse = await _db.Queryable<BasWarehouse>().SingleAsync(x=>x.id==wmsPrdInstockD.warehouse_id);
PrdReport prdReport = await _db.Queryable<PrdReport>().SingleAsync(x => x.id == instock.prd_report_id);
if (prdReport == null) return;
PrdMoTask prdMoTask = await _db.Queryable<PrdMoTask>().SingleAsync(x => x.id == prdReport.mo_task_id);
PrdMo prdMo = await _db.Queryable<PrdMo>().SingleAsync(x => x.id == prdMoTask.mo_id);
//来源erp才产成品入库