| | |
| | | info( '-----------Search start-------' ); |
| | | table := selectobject( this,InterfaceDataset.OfflinePlanArchiveVersion, report, not report.IsShow() ); |
| | | //清空之前存储的显示数据 |
| | | aopcolumns := selectuniquevalues( table, Column, aopcolumn, aopcolumn.TimeUnit() = search.TimeUnit() and aopcolumn.StartDate() >= search.StartDate() and aopcolumn.StartDate() <= search.EndDate(), aopcolumn.StartDate() ); |
| | | aopcolumns := selectuniquevalues( table, Column, aopcolumn, aopcolumn.StartDate() >= search.StartDate() and aopcolumn.StartDate() <= search.EndDate(), aopcolumn.StartDate() );//aopcolumn.TimeUnit() = search.TimeUnit() and |
| | | this.Clear( aopcolumns ); |
| | | traverse( table, Row, row, ( units.Size() = 0 or units.Find( row.ProductionLine() ) > -1 ) and ( products.Size() = 0 or products.Find( row.Name() ) > -1 ) ){ |
| | | |
| | |
| | | showrow := this.Row( relnew, Name := row.Name(), ProductID := row.ProductID(), Unit := search.Unit() ); |
| | | } |
| | | 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() ); |
| | | cells := selectset( row, Cell, cell, cell.Column().StartDate() >= column.StartDate() and cell.Column().StartDate() <= column.EndDate() );//cell.Column().TimeUnit() = Translations::MP_GlobalParameters_Day() and |
| | | |
| | | // traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){ |
| | | // column := selectobject( this, Column, column, column.ColumnName() = cell.Column().ColumnName() ); |
| | |
| | | actqty := sum( cells, Elements, cell, cell.ActualProductionQty() ); |
| | | showcell.Quantity( qty + showcell.Quantity() ); |
| | | showcell.ActualProductionQty( actqty + showcell.ActualProductionQty() ); |
| | | if( search.TimeUnit() = Translations::MP_GlobalParameters_Day() ){ |
| | | // if( search.TimeUnit() = Translations::MP_GlobalParameters_Day() ){ |
| | | showcell.Order( cells.Element( 0 ).Order() ); |
| | | showcell.OrderNr( cells.Element( 0 ).OrderNr() ); |
| | | } |
| | | // } |
| | | } |
| | | } |
| | | } |