lazhen
2024-10-10 7edeca2ed3587a88d7f94cacf05e49c8db610fb0
_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl
@@ -23,13 +23,13 @@
    models                  := selectuniquevalues( table, Column.Cell.Demand, demand, demand.Model() );
    cellnr                  := 5 + models.Size();
    //合计行
    sumrowproduction        := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '生产', rows.Size() * cellnr, true );
    sumrowproduction        := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '总产量', rows.Size() * cellnr, true );
    sumrowdlproduction      := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '大连产量', sumrowproduction.RowNr() + 1, false );
    sumrowccproduction      := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '长春产量', sumrowproduction.RowNr() + 2, false );
    sumrowdemand            := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '需求', sumrowproduction.RowNr() + 3, false );
    sumrowdemand            := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '总需求', sumrowproduction.RowNr() + 3, false );
    rowno                   := sumrowproduction.RowNr() + 4;
    traverse( models, Elements, model ){
      EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', model, rowno, false );
      EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', model.Concat( '需求' ), rowno, false );
      rowno                 := rowno + 1;
    }
    sumrowinventory         := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '库存', rowno, false );
@@ -38,10 +38,10 @@
    rownr                   := 0;
    traverse( rows, Elements, row, productids.Find( row.Name() ) >= 0 ){
    
      showrowproduction   := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '生产', rownr, true );;
      showrowproduction   := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '总生产', rownr, true );;
      showrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '大连产量', rownr + 1, false );
      showrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '长春产量', rownr + 2, false );
      showrowdemand       := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '需求', rownr + 3, false );
      showrowdemand       := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '总需求', rownr + 3, false );
      rownr               := rownr + 4;
      modelsnr            := rownr + 3;
      models              := construct( Strings );
@@ -50,7 +50,7 @@
      traverse( uniquemodels, Elements, e ){
    
        if( rownr < modelsnr ){
          EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), e, rownr, false );
          EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), e.Concat( '需求' ), rownr, false );
          models.Add( e );
          rownr             := rownr + 1;
        }
@@ -114,8 +114,8 @@
          sumdemand.Value( [String]( [Real]sumdemand.Value() + cell.DemandQuantity() ) );
          
          traverse( cell, Demand, demand, exists( models, Elements, model, model = demand.Model() ) ){
            demandrow              := selectobject( this, Row, r, r.Name() = row.Name() and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model() ) );
            sumdemandrow           := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model() ) );
            demandrow              := selectobject( this, Row, r, r.Name() = row.Name() and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model().Concat( '需求' ) ) );
            sumdemandrow           := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model().Concat( '需求' ) ) );
    
            if( not isnull( demandrow ) ){
              demandcell             := column.CellValue( relnew, Value := [String]demand.Quantity() );