| | |
| | | [* |
| | | // 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(); |
| | |
| | | |
| | | 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() ); |
| | |
| | | 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; |
| | | *] |