xiaoding721
2024-11-21 99cac3bb9bc0baa321d7726d75854ab38bcddc05
更新 StaticMethod_GenerateAnnualPlanReport.qbl
已修改1个文件
24 ■■■■■ 文件已修改
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateAnnualPlanReport.qbl 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
_Main/BL/Type_LocalCell_Default/StaticMethod_GenerateAnnualPlanReport.qbl
@@ -40,7 +40,7 @@
        localRowHandle := localRowIndexTree.GetHandle( row.ProductID() + row.ProductionLine() );
        localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
        if( isnull( localRowIndex )){
          localRow := localTable.LocalRow( relnew,CustomName := row.Name(),ProductID := row.ProductID(),ProductionLine := row.ProductionLine(),Index := localTable.GetRowIndexCache() );
          localRow := localTable.LocalRow( relnew,CustomName := row.ProductID() + " in " + row.ProductionLine(),ProductID := row.ProductID(),ProductionLine := row.ProductionLine(),Index := localTable.GetRowIndexCache() );
          localRows.Add( localRow );
          localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
        }else{
@@ -80,7 +80,7 @@
          localRowHandle := localRowIndexTree.GetHandle( pisp_mp.ProductID() + pisp_mp.StockingPoint_MP().Unit().Name() );
          localRowIndex := guard( localRowIndexTree.Root().Child( localRowHandle ),null( NamedValue ));
          if( isnull( localRowIndex )){
            localRow := localTable.LocalRow( relnew,CustomName := pisp_mp.Name(),ProductID := pisp_mp.ProductID(),ProductionLine := pisp_mp.StockingPoint_MP().Unit().Name(),Index := localTable.GetRowIndexCache() );
            localRow := localTable.LocalRow( relnew,CustomName := pisp_mp.ProductID() + " in " + pisp_mp.StockingPoint_MP().Unit().Name(),ProductID := pisp_mp.ProductID(),ProductionLine := pisp_mp.StockingPoint_MP().Unit().Name(),Index := localTable.GetRowIndexCache() );
            localRows.Add( localRow );
            localRowIndexTree.Root().AddChild( localRowHandle,localRows.Size() - 1 );
          }else{
@@ -164,6 +164,26 @@
      row.Delete();
    }
    
    traverse( localTable,LocalRow,row ){
      cells := selectset( row,LocalCell,cell,true );
      cellIndexTree := NamedValueTree::Create();
      for( i := 0;i < cells.Size(); i++){
        cell := cells.Element( i );
        cellHandle := cellIndexTree.GetHandle( row.CustomName() + cell.LocalColumn().CustomDate().AsQUILL() + cell.LocalColumn().TimeUnit() );
        cellIndexTree.Root().AddChild( cellHandle,i );
      }
      traverse( localTable,LocalColumn,column ){
        cellHandle := cellIndexTree.GetHandle( row.CustomName() + column.CustomDate().AsQUILL() + column.TimeUnit() );
        cellIndex := guard( cellIndexTree.Root().Child( cellHandle ),null( NamedValue ));
        if( isnull( cellIndex )){
          cell := row.LocalCell( relnew,LocalCell_Default,LocalColumn := column,RealValue := 0 );
          cells.Add( cell );
          cellIndexTree.Root().AddChild( cellHandle,cells.Size() - 1 );
        }
      }
    }
    return localTable;
  *]
}