| | |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | table := selectobject( this, Source.Report, report, not report.IsShow() ); |
| | | |
| | | //æ¸
空ä¹ååå¨çæ¾ç¤ºæ°æ® |
| | | this.Clear( search.TimeUnit(), search.StartDate(), search.EndDate() ); |
| | | Transaction::Transaction().Propagate( attribute( EnginePipelineColumn, Index ) ); |
| | |
| | | showrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'é¿æ¥äº§é', rownr + 2, false ); |
| | | showrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'éæ±', rownr + 3, false ); |
| | | rownr := rownr + 4; |
| | | traverse( models, Elements, model ){ |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), model, rownr, false ); |
| | | modelsnr := rownr + 3; |
| | | models := construct( Strings ); |
| | | uniquemodels := selectuniquevalues( row, Cell.Demand, demand, true, demand.Model() ); |
| | | |
| | | traverse( uniquemodels, Elements, e ){ |
| | | |
| | | if( rownr < modelsnr ){ |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), e, rownr, false ); |
| | | models.Add( e ); |
| | | rownr := rownr + 1; |
| | | } |
| | | } |
| | | |
| | | for( rownr := rownr; rownr < modelsnr; rownr ++ ){ |
| | | |
| | | EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '', rownr, false ); |
| | | rownr := rownr + 1; |
| | | } |
| | | showrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), 'åºå', rownr, false ); |
| | |
| | | production := column.CellValue( relnew, Value := [String]cell.ProductionQuantity() ); |
| | | showrowproduction.CellValue( relinsert, production ); |
| | | sumproduction := selectobject( column, CellValue, c, c.Row() = sumrowproduction ); |
| | | |
| | | if( isnull( sumproduction ) ){ |
| | | sumproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowproduction.CellValue( relinsert, sumproduction ); |
| | |
| | | dlproduction := column.CellValue( relnew, Value := [String]dlproductionquantity ); |
| | | showrowdlproduction.CellValue( relinsert, dlproduction ); |
| | | sumdlproduction := selectobject( column, CellValue, c, c.Row() = sumrowdlproduction ); |
| | | |
| | | if( isnull( sumdlproduction ) ){ |
| | | sumdlproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowdlproduction.CellValue( relinsert, sumdlproduction ); |
| | |
| | | ccproduction := column.CellValue( relnew, Value := [String]ccproductionquantity ); |
| | | showrowccproduction.CellValue( relinsert, ccproduction ); |
| | | sumccproduction := selectobject( column, CellValue, c, c.Row() = sumrowccproduction ); |
| | | |
| | | if( isnull( sumccproduction ) ){ |
| | | sumccproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowccproduction.CellValue( relinsert, sumccproduction ); |
| | |
| | | } |
| | | sumdemand.Value( [String]( [Real]sumdemand.Value() + cell.DemandQuantity() ) ); |
| | | |
| | | traverse( cell, Demand, demand ){ |
| | | demandrow := selectobject( this, Row, r, r.Name() = row.Name() and exists( r, CellValue, cv, cv.Value() = demand.Model() ) ); |
| | | sumdemandrow := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Value() = demand.Model() ) ); |
| | | 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() ) ); |
| | | |
| | | if( not isnull( demandrow ) ){ |
| | | demandcell := column.CellValue( relnew, Value := [String]demand.Quantity() ); |
| | | demandrow.CellValue( relinsert, demandcell ); |
| | | } |
| | | |
| | | if( not isnull( sumdemandrow ) ){ |
| | | sumdemandcell := selectobject( column, CellValue, c, c.Row() = sumdemandrow ); |
| | | if( isnull( sumdemandcell ) ){ |
| | | sumdemandcell := column.CellValue( relnew, Value := [String]0 ); |
| | | sumdemandrow.CellValue( relinsert, sumdemandcell ); |
| | | } |
| | | sumdemandcell.Value( [String]( [Real]sumdemandcell.Value() + demand.Quantity() ) ); |
| | | } |
| | | } |
| | | |
| | | for( demandr := showrowdemand.RowNr() + 1; demandr < showrowinventory.RowNr(); demandr := demandr + 1 ){ |
| | |
| | | traverse( this, Column, column ){ |
| | | for( demandr := sumrowdemand.RowNr() + 1; demandr < sumrowinventory.RowNr(); demandr := demandr + 1 ){ |
| | | demandrow := selectobject( this, Row, r, r.RowNr() = demandr ); |
| | | // info( '------------------14----------------' ); |
| | | if( not isnull( demandrow ) and not exists( demandrow, CellValue, cv, cv.Column() = column ) ){ |
| | | demandcell := column.CellValue( relnew, Value := '' ); |
| | | demandrow.CellValue( relinsert, demandcell ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | rows := selectsortedset( this, Row, row, row.Name(), row.RowNr() ); |
| | | i := 0; |
| | | traverse( rows, Elements, e ){ |
| | | e.RowNr( i ); |
| | | i := i + 1; |
| | | } |
| | | *] |
| | | } |