| | |
| | | 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 ); |
| | |
| | | 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 ); |
| | |
| | | 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; |
| | | } |
| | |
| | | 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() ); |