From e1af2556a7f785c518380e63b67fe8600b9163ec Mon Sep 17 00:00:00 2001 From: lazhen <17772815105@139.com> Date: 星期一, 18 十一月 2024 17:21:03 +0800 Subject: [PATCH] 下线计划界面排版 --- _Main/BL/Type_OfflinePlanArchiveVersion/Method_Generate.qbl | 26 +++++++++++++++++++------- 1 files changed, 19 insertions(+), 7 deletions(-) diff --git a/_Main/BL/Type_OfflinePlanArchiveVersion/Method_Generate.qbl b/_Main/BL/Type_OfflinePlanArchiveVersion/Method_Generate.qbl index be82731..0c8071c 100644 --- a/_Main/BL/Type_OfflinePlanArchiveVersion/Method_Generate.qbl +++ b/_Main/BL/Type_OfflinePlanArchiveVersion/Method_Generate.qbl @@ -1,7 +1,9 @@ Quintiq file version 2.0 #parent: #root Method Generate ( - OfflinePlanArchiveSearch search + OfflinePlanArchiveSearch search, + Strings products, + Strings units ) { TextBody: @@ -12,23 +14,33 @@ //娓呯┖涔嬪墠瀛樺偍鐨勬樉绀烘暟鎹� aopcolumns := selectuniquevalues( table, Column, aopcolumn, aopcolumn.TimeUnit() = search.TimeUnit() and aopcolumn.StartDate() >= search.StartDate() and aopcolumn.StartDate() <= search.EndDate(), aopcolumn.StartDate() ); this.Clear( aopcolumns ); - traverse( table, Row, row, ( search.Unit() = FinancialProductionReport::GetDefaultAllUnit() or row.Unit() = search.Unit() ) - and ( search.Product() = FinancialProductionReport::GetDefaultAllUnit() or search.Product() = row.Name() )){ + traverse( table, Row, row, units.Find( row.ProductionLine() ) > -1 and products.Find( row.Name() ) > -1 ){ showrow := selectobject( this, Row, showrow, showrow.Name() = row.Name() and showrow.Unit() = search.Unit() ); if( isnull( showrow ) ){ showrow := this.Row( relnew, Name := row.Name(), ProductID := row.ProductID(), Unit := search.Unit() ); } - traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){ - column := selectobject( this, Column, column, column.ColumnName() = cell.Column().ColumnName() ); + traverse( this, Column, column ){ + cells := selectset( row, Cell, cell, cell.Column().TimeUnit() = Translations::MP_GlobalParameters_Day() + and cell.Column().StartDate() >= column.StartDate() + and cell.Column().StartDate() <= column.EndDate() ); + + // traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){ + // column := selectobject( this, Column, column, column.ColumnName() = cell.Column().ColumnName() ); if( not isnull( column ) ){ showcell := selectobject( showrow, Cell, showcell, showcell.Column() = column ); if( isnull( showcell ) ){ showcell := showrow.Cell( relnew, Quantity := 0, ActualProductionQty := 0 ); column.Cell( relinsert, showcell ); } - showcell.Quantity( cell.Quantity() + showcell.Quantity() ); - showcell.ActualProductionQty( cell.ActualProductionQty() + showcell.ActualProductionQty() ); + qty := sum( cells, Elements, cell, cell.Quantity() ); + actqty := sum( cells, Elements, cell, cell.ActualProductionQty() ); + showcell.Quantity( qty + showcell.Quantity() ); + showcell.ActualProductionQty( actqty + showcell.ActualProductionQty() ); + if( search.TimeUnit() = Translations::MP_GlobalParameters_Day() ){ + showcell.Order( cells.Element( 0 ).Order() ); + showcell.OrderNr( cells.Element( 0 ).OrderNr() ); + } } } } -- Gitblit v1.9.3