This commit is contained in:
2024-11-05 14:41:20 +08:00
parent b04096c816
commit b0438e8db4

View File

@@ -4415,6 +4415,8 @@ namespace Tnb.WarehouseMgr
// 下发数量 // 下发数量
decimal? qty = 0; decimal? qty = 0;
bool isFilter_qcres_list = true;
switch (input.biz_type) switch (input.biz_type)
{ {
case WmsWareHouseConst.BIZTYPE_WmsRawmatTransferoutstock_ID: case WmsWareHouseConst.BIZTYPE_WmsRawmatTransferoutstock_ID:
@@ -4430,6 +4432,13 @@ namespace Tnb.WarehouseMgr
WmsRawmatOutstockD wmsRawmatOutstockD = await _db.Queryable<WmsRawmatOutstockD>().Where(r => r.id == input.source_id).FirstAsync(); WmsRawmatOutstockD wmsRawmatOutstockD = await _db.Queryable<WmsRawmatOutstockD>().Where(r => r.id == input.source_id).FirstAsync();
if (wmsRawmatOutstockD == null) if (wmsRawmatOutstockD == null)
throw new AppFriendlyException($"来源单据{input.source_id}不存在", 500); throw new AppFriendlyException($"来源单据{input.source_id}不存在", 500);
WmsRawmatOutstockH wmsRawmatOutstockH = await _db.Queryable<WmsRawmatOutstockH>().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; qty = wmsRawmatOutstockD.qty - wmsRawmatOutstockD.actual_outstock_qty;
break; break;
} }
@@ -4454,7 +4463,7 @@ namespace Tnb.WarehouseMgr
code_batch = input.code_batch, code_batch = input.code_batch,
Size = 100, Size = 100,
PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK, PolicyCode = WmsWareHouseConst.POLICY_YCLOUTSTOCK,
qcres_list = input.biz_type == WmsWareHouseConst.BIZTYPE_WmsRawmatOutstock_ID ? null : new List<string>() { "vergeOk", "ok" } qcres_list = isFilter_qcres_list ? new List<string>() { "vergeOk", "ok" } : null;
}; };
List<WmsCarryH> items = await OutStockStrategy(outStockStrategyInput); List<WmsCarryH> items = await OutStockStrategy(outStockStrategyInput);