From 489022017f8b581ab413455b41ec841879a75e03 Mon Sep 17 00:00:00 2001 From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com> Date: 星期六, 12 十月 2024 17:48:22 +0800 Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/VWED into dev --- _Main/BL/Type_EnginePipelineReport/Method_Generate.qbl | 39 +++++++++++++++++++-------------------- 1 files changed, 19 insertions(+), 20 deletions(-) diff --git a/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl b/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl index 5d5baa7..4b5cc53 100644 --- a/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl +++ b/_Main/BL/Type_EnginePipelineReport/Method_Generate.qbl @@ -17,31 +17,30 @@ //杩囨护鍚庣殑浜у搧id productids := selectuniquevalues( products, Elements, product, true, product.ID() ); rows := selectsortedset( table, Row, row, row.RowNr() ); - //鏄剧ず鍒� - productcolumn := selectobject( this, Column, column, column.Index() = 0 ); - attricolumn := selectobject( this, Column, column, column.Index() = 1 ); models := selectuniquevalues( table, Column.Cell.Demand, demand, demand.Model() ); cellnr := 5 + models.Size(); //鍚堣琛� - 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 ); + sumname := 'SUM'; + sumstr := sumname.Format( 'S(Len(10))' ); + sumrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( '鎬讳骇閲�' ), sumname, '', rows.Size() * cellnr ); + sumrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( '澶ц繛浜ч噺' ), sumname, '', sumrowproduction.RowNr() + 1 ); + sumrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( '闀挎槬浜ч噺' ), sumname, '', sumrowproduction.RowNr() + 2 ); + sumrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( '鎬婚渶姹�' ), sumname, '', sumrowproduction.RowNr() + 3 ); rowno := sumrowproduction.RowNr() + 4; traverse( models, Elements, model ){ - EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', model.Concat( '闇�姹�' ), rowno, false ); + EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( model.Concat( '闇�姹�' ) ), sumname, model, rowno ); rowno := rowno + 1; } - sumrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, 'SUM', '搴撳瓨', rowno, false ); + sumrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( '搴撳瓨' ), sumname, '', rowno ); //琛岃鏁� rownr := 0; traverse( rows, Elements, row, productids.Find( row.Name() ) >= 0 ){ - - 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 ); + rowname := row.Name().Format( 'S(Len(10))' ); + showrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '鎬讳骇閲�' ), row.Name(), '', rownr ); + showrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '澶ц繛浜ч噺' ), row.Name(), '', rownr + 1 ); + showrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '闀挎槬浜ч噺' ), row.Name(), '', rownr + 2 ); + showrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '鎬婚渶姹�' ), row.Name(), '', rownr + 3 ); rownr := rownr + 4; modelsnr := rownr + 3; models := construct( Strings ); @@ -50,7 +49,7 @@ traverse( uniquemodels, Elements, e ){ if( rownr < modelsnr ){ - EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), e.Concat( '闇�姹�' ), rownr, false ); + EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( e.Concat( '闇�姹�' ) ), row.Name(), e, rownr ); models.Add( e ); rownr := rownr + 1; } @@ -58,9 +57,9 @@ for( rownr := rownr; rownr < modelsnr; rownr ++ ){ - EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '', rownr, false ); + EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '' ), row.Name(), '', rownr ); } - showrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, productcolumn, attricolumn, row.Name(), '搴撳瓨', rownr, false ); + showrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '搴撳瓨' ), row.Name(), '', rownr ); traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){ @@ -114,8 +113,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().Concat( '闇�姹�' ) ) ); - sumdemandrow := selectobject( this, Row, r, r.Name() = 'SUM' and exists( r, CellValue, cv, cv.Column() = attricolumn and cv.Value() = demand.Model().Concat( '闇�姹�' ) ) ); + demandrow := selectobject( this, Row, r, r.Product() = row.Name() and r.Demand() = demand.Model() ); + sumdemandrow := selectobject( this, Row, r, r.Name() = sumname and r.Demand() = demand.Model() ); if( not isnull( demandrow ) ){ demandcell := column.CellValue( relnew, Value := [String]demand.Quantity() ); @@ -155,7 +154,7 @@ } traverse( this, Column, column ){ for( demandr := sumrowdemand.RowNr() + 1; demandr < sumrowinventory.RowNr(); demandr := demandr + 1 ){ - demandrow := selectobject( this, Row, r, r.RowNr() = demandr and r.Name() = 'SUM' ); + demandrow := selectobject( this, Row, r, r.RowNr() = demandr and r.Name() = sumname ); // info( '------------------14----------------' ); if( not isnull( demandrow ) and not exists( demandrow, CellValue, cv, cv.Column() = column ) ){ demandcell := column.CellValue( relnew, Value := '' ); -- Gitblit v1.9.3