From ed726fd8e11571e29bb43e2f5cd62bbafee7e29c Mon Sep 17 00:00:00 2001
From: renhao <renhui.hao@capgemini.com>
Date: 星期三, 25 十月 2023 17:47:10 +0800
Subject: [PATCH] 替代料供应原材料供应路径
---
_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl b/_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl
index c7fe0d5..03a2581 100644
--- a/_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl
+++ b/_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl
@@ -76,14 +76,22 @@
}
if( createPurchaseSupplyMaterial ) {
toCreateBomList := construct( Strings );
+ alterCodes := construct( Strings );
+
if( isKeyProduct){
toCreateBomList := selectuniquevalues( bomList, Elements, item,
item.ComponentType() = "P" and keyProductList.Find( item.ComponentCode())>=0, item.OrganCode() + item.ComponentCode());
+
+ alterCodes := selectuniquevalues( bomList, Elements, item,
+ not item.AlternativeMaterialCode() = "" and item.AlternativeMaterialType() = "P" and keyProductList.Find( item.ComponentCode())>=0, item.OrganCode() + item.AlternativeMaterialCode());
}else{
toCreateBomList := selectuniquevalues( bomList, Elements, item,
item.ComponentType() = "P" , item.OrganCode() + item.ComponentCode());
- }
+ alterCodes := selectuniquevalues( bomList, Elements, item,
+ not item.AlternativeMaterialCode() = "" and item.AlternativeMaterialType() = "P", item.OrganCode() + item.AlternativeMaterialCode());
+ }
+ toCreateBomList := toCreateBomList.Union( alterCodes);
traverse( toCreateBomList, Elements, key ) {
boms := selectset( bomList, Elements, item, item.ComponentType() = "P" and item.OrganCode() + item.ComponentCode() = key );
bom := boms.First();
--
Gitblit v1.9.3