From 0d728947dc4e717bc81f77be4810281cf7eeb15f Mon Sep 17 00:00:00 2001 From: yanweiyuan3 <yanweiyuan3@gmail.com> Date: 星期二, 26 九月 2023 21:15:29 +0800 Subject: [PATCH] Update Dosync method for organcode --- _Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl index ca35281..254be84 100644 --- a/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl +++ b/_Main/BL/Type_MacroPlan/Method_MappingOperationBOMData.qbl @@ -15,11 +15,13 @@ if( isKeyProduct ) { keyProductList := selectuniquevalues( globalOTDTable, Global_MappingProduct_MP, item, item.ProductMajorType()="鎴愬搧" or item.ProductMajorType()="鍗婃垚鍝�", item.ID() ); } + organcodelist := selectvalues( globalOTDTable, BusinessType.OrganCode, organ, businessTypes.Find( organ.BusinessType().BusinessTypeName() ) <> -1, organ.OrganCodeName() ); bomList := selectsortedset( globalOTDTable, Global_MappingOperationBOM, item, ifexpr( isnull( businessTypes ) or businessTypes.Size() = 0, true, // businessTypes.Difference( businessTypes.Difference( item.BusinessType().Tokenize( ", " ) ) ).Size() > 0 ) - businessTypes.Find( item.BusinessType() ) >= 0 ) + ( businessTypes.Find( item.BusinessType() ) >= 0 ) and + ( organcodelist.Find( item.OrganCode() ) >= 0 ) ) // and ifexpr( isKeyProduct, // keyProductList.Size() > 0 and keyProductList.Find( item.ComponentCode() ) >= 0, // true ) -- Gitblit v1.9.3