From 46f580350af9ee2bbccfa88fea8532b129564ce0 Mon Sep 17 00:00:00 2001 From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com> Date: 星期一, 30 九月 2024 17:28:12 +0800 Subject: [PATCH] 修复一些bug --- _Main/BL/Type_OfflinePlanTable/Method_Comparison.qbl | 41 +++++++++++++++++++++++++++++++++++++++-- 1 files changed, 39 insertions(+), 2 deletions(-) diff --git a/_Main/BL/Type_OfflinePlanTable/Method_Comparison.qbl b/_Main/BL/Type_OfflinePlanTable/Method_Comparison.qbl index 6c22eaa..d187c45 100644 --- a/_Main/BL/Type_OfflinePlanTable/Method_Comparison.qbl +++ b/_Main/BL/Type_OfflinePlanTable/Method_Comparison.qbl @@ -9,7 +9,7 @@ [* // rislai Jul-17-2024 (created) macroPlan := this.MacroPlan(); - table := recycleBin.LocalTable( relnew,Name := "浜ч噺瀵规瘮鎶ヨ〃"); + table := recycleBin.LocalTable( relnew,Name := LocalCell_ProductionComparison::GetTableName()); actualDailyProductionDatas := selectset( archive,ActualDailyProductionData,data,true ); actualDailyProductionDataIndexTree := NamedValueTree::Create(); @@ -31,7 +31,7 @@ traverse( this,OfflinePlanRow,row,row.Type() = "1" ){ productID := row.ProductID(); - productLine := row.ProductionLine(); + // productLine := row.ProductionLine(); localRow := table.LocalRow( relnew,Index := table.GetRowIndexCache(),CustomName := productID ); traverse( row,OfflinePlanCell,cell,cell.OfflinePlanColumn().ColumnDate() >= macroPlan.StartOfPlanning().Date() ){ localColumnHandle := localColumnIndexTree.GetHandle( cell.OfflinePlanColumn().ColumnDate().AsQUILL() ); @@ -57,6 +57,43 @@ column.Delete(); } } + // maxCellCount := table.LocalRow( relsize ); + + //traverse( table,LocalColumn,column ){ + // cellIndexTree := NamedValueTree::Create(); + // columnKey := column.CustomDate().AsQUILL(); + // count := 0; + // traverse( column,LocalCell,cell ){ + // rowKey := cell.LocalRow().CustomName(); + // cellHandle := cellIndexTree.GetHandle( rowKey + columnKey ); + // cellIndexTree.Root().AddChild( cellHandle,count ); + // count++; + // } + // traverse( table,LocalRow,row ){ + // rowKey := row.CustomName(); + // cellHandle := cellIndexTree.GetHandle( rowKey + columnKey ); + // cellCount := guard( cellIndexTree.Root().Child( cellHandle ),null( NamedValue )); + // if( isnull( cellCount )){ + // row.LocalCell( relnew,LocalCell_ProductionComparison ,LocalColumn := column, + // Plan := 0,Actual := 0 ); + // } + // } + //} + + traverse( table,LocalRow,row ){ + cellCountTree := NamedValueTree::Create(); + traverse( row,LocalCell,cell ){ + cellHandle := cellCountTree.GetHandle( cell.LocalColumn().CustomDate().AsQUILL()); + cellCountTree.Root().AddChild( cellHandle,0 ); + } + traverse( table,LocalColumn,column ){ + cellHandle := cellCountTree.GetHandle( column.CustomDate().AsQUILL()); + cell := guard( cellCountTree.Root().Child( cellHandle ),null( NamedValue )); + if( isnull( cell )){ + row.LocalCell( relnew,LocalCell_ProductionComparison ,LocalColumn := column,Plan := 0,Actual := 0 ); + } + } + } return table; *] -- Gitblit v1.9.3