From 1499d8149575493519f2c5b04462c2302a455aa9 Mon Sep 17 00:00:00 2001 From: haorenhui <renhui.hao@capgemini.com> Date: 星期五, 27 十月 2023 15:16:24 +0800 Subject: [PATCH] Merge branch 'dev' into dev_hrh_global --- _Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl b/_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl index 03a2581..37eb082 100644 --- a/_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_DoASyncMappingOperationBOMData.qbl @@ -94,8 +94,14 @@ 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(); - this.MappingOperationBOMDataSupplyPurchase( bom.OrganCode(), bom.ComponentCode(), bom.ComponentType()); + if( boms.Size()=0){ + boms := selectset( bomList, Elements, item, item.ComponentType() = "P" and item.OrganCode() + item.AlternativeMaterialCode() = key ); + } + if( boms.Size()>0){ + bom := boms.First(); + this.MappingOperationBOMDataSupplyPurchase( bom.OrganCode(), bom.ComponentCode(), bom.ComponentType()); + } + } } -- Gitblit v1.9.3