From 133f1a1dc59bbf13a35dc3d64e2ddaf6b37a335f Mon Sep 17 00:00:00 2001 From: lazhen <17772815105@139.com> Date: 星期一, 14 十月 2024 18:19:02 +0800 Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev-zlg --- _Main/BL/Type_LocalCell_DemandComparison/StaticMethod_Compared.qbl | 24 +++++++++++++++++++++++- 1 files changed, 23 insertions(+), 1 deletions(-) diff --git a/_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_Compared.qbl b/_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_Compared.qbl index 6d6bf49..f774c24 100644 --- a/_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_Compared.qbl +++ b/_Main/BL/Type_LocalCell_DemandComparison/StaticMethod_Compared.qbl @@ -2,6 +2,7 @@ #parent: #root StaticMethod Compared ( RecycleBin recycleBin, + const MacroPlan mactoPlan, String baseVersionPath, String compareVersionPath, String baseVersionName, @@ -12,6 +13,17 @@ [* // rislai Jun-20-2024 (created) localTable := recycleBin.LocalTable( relnew,Name := baseVersionName + "__" + compareVersionName ); + + products := selectset( mactoPlan,Product_MP,product,not product.IsSystem() and product.IsUsed() ); + productIndexTree := NamedValueTree::Create(); + try{ + for( i := 0; i < products.Size(); i++){ + product := products.Element( i ); + productHandle := productIndexTree.GetHandle( product.Notes() ); + productIndexTree.Root().AddChild( productHandle,i ) + } + }onerror{} + baseVersionFile := OSFile::Construct(); compareVersionFile := OSFile::Construct(); @@ -88,7 +100,17 @@ CompareVersionValue := ifexpr( isnull( compareVersionCell ),"绌�",compareVersionCell.Value())); column.IsAttrbuteColumn( true ); if( columnName = "鍙戝姩鏈洪浂浠跺彿" ){ - row.ProductID( ifexpr( isnull( baseVersionCell ), ifexpr( isnull( compareVersionCell ),"绌�",compareVersionCell.Value()), baseVersionCell.Value()) ); + productID := ifexpr( isnull( baseVersionCell ), ifexpr( isnull( compareVersionCell ),"绌�",compareVersionCell.Value()), baseVersionCell.Value()); + + productHanlde := productIndexTree.GetHandle( productID ); + productIndex := guard( productIndexTree.Root().Child( productHanlde ), null( NamedValue )); + if( not isnull( productIndex )){ + product := products.Element( productIndex.GetValueAsNumber() ); + productID := product.ID(); + } + + row.ProductID( productID ); + } if( columnName = "杞﹀瀷" ){ row.CustomName( " > " + ifexpr( isnull( baseVersionCell ), ifexpr( isnull( compareVersionCell ),"绌�",compareVersionCell.Value()), baseVersionCell.Value()) ); -- Gitblit v1.9.3