From b0438e8db4792e95950e5d672ea6c95b6c7290e7 Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Tue, 5 Nov 2024 14:41:20 +0800 Subject: [PATCH 1/2] 1 --- WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index 243a3bd2..1432fa20 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -4415,6 +4415,8 @@ namespace Tnb.WarehouseMgr // 下发数量 decimal? qty = 0; + + bool isFilter_qcres_list = true; switch (input.biz_type) { case WmsWareHouseConst.BIZTYPE_WmsRawmatTransferoutstock_ID: @@ -4430,6 +4432,13 @@ namespace Tnb.WarehouseMgr WmsRawmatOutstockD wmsRawmatOutstockD = await _db.Queryable().Where(r => r.id == input.source_id).FirstAsync(); if (wmsRawmatOutstockD == null) throw new AppFriendlyException($"来源单据{input.source_id}不存在", 500); + + WmsRawmatOutstockH wmsRawmatOutstockH = await _db.Queryable().Where(r => r.id == wmsRawmatOutstockD.bill_id).FirstAsync(); + if (wmsRawmatOutstockD == null) + throw new AppFriendlyException($"来源单据{input.source_id}的主表不存在", 500); + if (wmsRawmatOutstockH.outstock_type == "4D-Cxx-08") + isFilter_qcres_list = false; + qty = wmsRawmatOutstockD.qty - wmsRawmatOutstockD.actual_outstock_qty; break; } @@ -4454,7 +4463,7 @@ namespace Tnb.WarehouseMgr code_batch = input.code_batch, Size = 100, PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK, - qcres_list = input.biz_type == WmsWareHouseConst.BIZTYPE_WmsRawmatOutstock_ID ? null : new List() { "vergeOk", "ok" } + qcres_list = isFilter_qcres_list ? new List() { "vergeOk", "ok" } : null; }; List items = await OutStockStrategy(outStockStrategyInput); From c3e4e9981283ef67d33f48a1d25ffcddffb12ec1 Mon Sep 17 00:00:00 2001 From: majian <780924089@qq.com> Date: Tue, 5 Nov 2024 14:42:59 +0800 Subject: [PATCH 2/2] 1 --- WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs index 1432fa20..ce716f49 100644 --- a/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs +++ b/WarehouseMgr/Tnb.WarehouseMgr/WareHouseService.cs @@ -4463,7 +4463,7 @@ namespace Tnb.WarehouseMgr code_batch = input.code_batch, Size = 100, PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK, - qcres_list = isFilter_qcres_list ? new List() { "vergeOk", "ok" } : null; + qcres_list = isFilter_qcres_list ? new List() { "vergeOk", "ok" } : null }; List items = await OutStockStrategy(outStockStrategyInput);