原材料仓内转移、出入库策略调整

This commit is contained in:
2024-07-25 17:02:43 +08:00
parent e92797e449
commit f814583a0e
6 changed files with 20 additions and 60 deletions

View File

@@ -219,15 +219,18 @@ namespace Tnb.WarehouseMgr
throw new AppFriendlyException("批号不可为空", 500);
}
//入库取终点 //出库起点
OutStockStrategyQuery inStockStrategyInput = new()
OutStockStrategyQuery outStockStrategyInput = new()
{
warehouse_id = WmsWareHouseConst.WAREHOUSE_YCL_ID,
material_id = input.material_id,
code_batch = input.code_batch,
Size = input.palletCount
Size = input.palletCount,
Region_id = WmsWareHouseConst.REGION_Purchase_ID,
PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK,
AvoidBusyPassage = true
};
List<WmsCarryH> items = await _wareHouseService.OutStockStrategyYCL(inStockStrategyInput);
List<WmsCarryH> items = await _wareHouseService.OutStockStrategy(outStockStrategyInput);
decimal qty = _db.Queryable<WmsCarryCode>().Where(r => items.Select(a => a.id).Contains(r.carry_id) && r.material_id == input.material_id && r.code_batch == input.code_batch).Sum(r => r.codeqty);
@@ -332,9 +335,10 @@ namespace Tnb.WarehouseMgr
await _db.Ado.BeginTranAsync();
//入库取终点 //出库起点
OutStockStrategyQuery inStockStrategyInput = new() { warehouse_id = WmsWareHouseConst.WAREHOUSE_YCL_ID, material_id = wmsMaterialTransferD.material_id, code_batch = input.code_batch, Size = input.palletCount };
List<WmsCarryH> items = await _wareHouseService.OutStockStrategyYCL(inStockStrategyInput);
OutStockStrategyQuery outStockStrategyInput = new() { warehouse_id = WmsWareHouseConst.WAREHOUSE_YCL_ID, material_id = wmsMaterialTransferD.material_id,
code_batch = input.code_batch, Size = input.palletCount,Region_id = WmsWareHouseConst.REGION_Purchase_ID,PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK,
AvoidBusyPassage = true};
List<WmsCarryH> items = await _wareHouseService.OutStockStrategy(outStockStrategyInput);
if (items.Count == 0)
{