| | |
| | | [* |
| | | //根据当前版本的下线计划 |
| | | allunit := OfflinePlanArchiveVersion::GetDefaultAllUnit(); |
| | | name := OfflinePlanArchiveVersion::GetDefaultName(); |
| | | search := interface.OfflinePlanArchiveSearch( relnew, Product := allunit, ProductionLine := allunit, Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );//, TimeUnit := Translations::MP_GlobalParameters_Day() |
| | | name := OfflinePlanArchiveVersion::GetDefaultName();//search := |
| | | interface.OfflinePlanArchiveSearch( relnew, Product := allunit, ProductionLine := allunit, Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );//, TimeUnit := Translations::MP_GlobalParameters_Day() |
| | | table := selectobject( interface, OfflinePlanArchiveVersion, version, not version.IsShow() ); |
| | | if( isnull( table ) ){ |
| | | table := interface.OfflinePlanArchiveVersion( relnew, ID := name, Name := name ); |
| | | } |
| | | showtable := selectobject( interface, OfflinePlanArchiveVersion, version, version.IsShow() ); |
| | | if( isnull( showtable ) ){ |
| | | showtable := interface.OfflinePlanArchiveVersion( relnew, ID := name, Name := name, IsShow := true ); |
| | | } |
| | | //showtable := selectobject( interface, OfflinePlanArchiveVersion, version, version.IsShow() ); |
| | | //if( isnull( showtable ) ){ |
| | | // showtable := interface.OfflinePlanArchiveVersion( relnew, ID := name, Name := name, IsShow := true ); |
| | | //} |
| | | nopcolumns := selectuniquevalues( macroPlan, NewOfflinePlanTable.NewOfflinePlanColumn, nopcolumn, not exists( table, Column, column, column.StartDate() = nopcolumn.StartDate() ), nopcolumn.StartDate() );//column.TimeUnit() = Translations::MP_GlobalParameters_Day() and |
| | | if( nopcolumns.Size() > 0 ){ |
| | | table.GenerateColumn( nopcolumns, false ); |
| | |
| | | } |
| | | } |
| | | } |
| | | productids := selectuniquevalues( table, Row, row, row.Name() ); |
| | | productlines := selectuniquevalues( table, Row, row, row.ProductionLine() ); |
| | | showtable.Generate( search, productids, productlines ); |
| | | //productids := selectuniquevalues( table, Row, row, row.Name() ); |
| | | //productlines := selectuniquevalues( table, Row, row, row.ProductionLine() ); |
| | | //showtable.Generate( search, productids, productlines ); |
| | | *] |
| | | } |