| | |
| | | pir := owner.AOnlineAndMOfflinePlanPIR( relnew, ZPPPSCode := OS::GenerateGUIDAsString(), Werk := AOnlineAndMOfflinePlanPIR::GetWerk( werk ), Version := version, StartDate := startdate, EndDate := enddate ); |
| | | loginfo.AOnlineAndMOfflinePlanPIR( relinsert, pir ); |
| | | traverse( owner, AssemblyOnlinePlanVersion, verison, not verison.IsShow() ){ |
| | | traverse( verison, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() >= startdate and column.StartDate() <= enddate ){ |
| | | traverse( verison, Column, column, column.StartDate() >= startdate and column.StartDate() <= enddate ){//column.TimeUnit() = Translations::MP_GlobalParameters_Day() and |
| | | traverse( column, Cell, cell, ( werk = 'All' or cell.Row().Unit().FindString( werk, 0 ) > -1 ) ){ |
| | | quantityrow := cell.Row(); |
| | | rowwerk := ifexpr( quantityrow.ProductionLine().FindString( "CC", 0 ) > -1, AOnlineAndMOfflinePlanPIR::GetWerk( FinancialProductionReport::GetDefaultCCUnit() ), AOnlineAndMOfflinePlanPIR::GetWerk( FinancialProductionReport::GetDefaultDLUnit() ) ); |
| | |
| | | } |
| | | |
| | | traverse( owner, OfflinePlanArchiveVersion, table, not table.IsShow() ){ |
| | | traverse( table, Column, column, column.StartDate() >= startdate and column.StartDate() <= enddate ){ |
| | | traverse( table, Column, column, column.StartDate() >= startdate and column.StartDate() <= enddate ){//column.TimeUnit() = Translations::MP_GlobalParameters_Day() and |
| | | traverse( column, Cell, cell, ( werk = 'All' or cell.Row().Unit().FindString( werk, 0 ) > -1 ) |
| | | and ( cell.Row().ProductionLine() <> 'DL_MOMO' or cell.Row().ProductionLine() <> 'CC_MOMO' ) ){ |
| | | row := cell.Row(); |
| | |
| | | } |
| | | } |
| | | traverse( productids, Elements, e ){ |
| | | for( date := startdate.StartOfWeek(); date <= enddate; date := ( date + Duration::Days( 1 ) ).Date() ){ |
| | | for( date := startdate.StartOfYear(); date <= enddate; date := ( date + Duration::Days( 1 ) ).Date() ){ |
| | | if( not exists( pir, PIRData, pirdata, pirdata.Product() = e and pirdata.PlanningDate() = date ) ){ |
| | | if( werk = 'All' ){ |
| | | pir.PIRData( relnew, Product := e, PlanningDate := date, PlanningQty := 0, Werk := '8200' ); |
| | |
| | | , Last := true |
| | | ); |
| | | traverse( interfaceDataset, AssemblyOnlinePlanVersion, verison, not verison.IsShow() ){ |
| | | traverse( verison, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() ){ |
| | | traverse( verison, Column, column ){//, column.TimeUnit() = Translations::MP_GlobalParameters_Day() |
| | | traverse( column, Cell, cell ){ |
| | | row := cell.Row(); |
| | | if( ( iscc and row.Unit() = FinancialProductionReport::GetDefaultCCUnit() ) or ( isdl and row.Unit() = FinancialProductionReport::GetDefaultDLUnit() ) ){ |
| | |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | info( '-----------Search start-------' ); |
| | | table := selectobject( this,InterfaceDataset.AssemblyOnlinePlanVersion, 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() ); |
| | | 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 := 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(), ProductionLine := row.ProductionLine(), Type := row.Type(), Unit := search.Unit() ); |
| | | } |
| | | 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 := column.Cell( relnew, Quantity := 0 ); |
| | | showrow.Cell( relinsert, showcell ); |
| | | } |
| | | showcell.Quantity( cell.Quantity() + showcell.Quantity() ); |
| | | } |
| | | } |
| | | } |
| | | //table := selectobject( this,InterfaceDataset.AssemblyOnlinePlanVersion, 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() ); |
| | | //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 := 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(), ProductionLine := row.ProductionLine(), Type := row.Type(), Unit := search.Unit() ); |
| | | // } |
| | | // 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 := column.Cell( relnew, Quantity := 0 ); |
| | | // showrow.Cell( relinsert, showcell ); |
| | | // } |
| | | // showcell.Quantity( cell.Quantity() + showcell.Quantity() ); |
| | | // } |
| | | // } |
| | | //} |
| | | info( '-----------Search end-------' ); |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | timeunit := guard( this.InterfaceDataset().AssemblyOnlinePlanVersionSearch().TimeUnit(), Translations::MP_GlobalParameters_Day() ) ; |
| | | weekstart := periods.Element( 0 ); |
| | | |
| | | monthstart := periods.Element( 0 ); |
| | | //timeunit := guard( this.InterfaceDataset().AssemblyOnlinePlanVersionSearch().TimeUnit(), Translations::MP_GlobalParameters_Day() ) ; |
| | | //weekstart := periods.Element( 0 ); |
| | | // |
| | | //monthstart := periods.Element( 0 ); |
| | | traverse( periods, Elements, periodtime ){ |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Day() ){ |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Day() ){ |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | this.Column( relnew, ColumnName := periodname, StartDate := periodtime, EndDate := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | } |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | weekend := ( weekstart + Duration::Days( 6 ) ).Date(); |
| | | if( ( weekend.Year() <> periodtime.Year() and weekend.Month() > 1 ) or ( abs( weekstart.Week() - periodtime.Week() ) > 1 and weekend.Year() = periodtime.Year() ) ){ |
| | | weekstart := periodtime; |
| | | } |
| | | if( periodtime = weekstart ){ |
| | | weekperiodname := weekstart.Format( "M2/D2/Y" ); |
| | | this.Column( relnew, ColumnName := weekperiodname, StartDate := weekstart, EndDate := ( weekstart.StartOfNextWeek() - Duration::Days( 1 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | |
| | | } |
| | | weekstart := periodtime.StartOfNextWeek(); |
| | | } |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | if( ( monthstart.Year() <> periodtime.Year() and abs( monthstart.Month() - periodtime.Month() ) <> 11 ) or ( abs( monthstart.Month() - periodtime.Month() ) > 1 and monthstart.Year() = periodtime.Year() ) ){ |
| | | monthstart := periodtime; |
| | | } |
| | | if( periodtime = monthstart ){ |
| | | monthperiodname := monthstart.Format( "M2/D2/Y" ); |
| | | enddate := ( monthstart.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | this.Column( relnew, ColumnName := monthperiodname, StartDate := monthstart, EndDate := enddate, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | |
| | | } |
| | | monthstart := periodtime.StartOfNextMonth(); |
| | | } |
| | | this.Column( relnew, ColumnName := periodname, StartDate := periodtime, EndDate := periodtime );//, TimeUnit := Translations::MP_GlobalParameters_Day() |
| | | // } |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | // weekend := ( weekstart + Duration::Days( 6 ) ).Date(); |
| | | // if( ( weekend.Year() <> periodtime.Year() and weekend.Month() > 1 ) or ( abs( weekstart.Week() - periodtime.Week() ) > 1 and weekend.Year() = periodtime.Year() ) ){ |
| | | // weekstart := periodtime; |
| | | // } |
| | | // if( periodtime = weekstart ){ |
| | | // weekperiodname := weekstart.Format( "M2/D2/Y" ); |
| | | // this.Column( relnew, ColumnName := weekperiodname, StartDate := weekstart, EndDate := ( weekstart.StartOfNextWeek() - Duration::Days( 1 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | // |
| | | // } |
| | | // weekstart := periodtime.StartOfNextWeek(); |
| | | // } |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | // if( ( monthstart.Year() <> periodtime.Year() and abs( monthstart.Month() - periodtime.Month() ) <> 11 ) or ( abs( monthstart.Month() - periodtime.Month() ) > 1 and monthstart.Year() = periodtime.Year() ) ){ |
| | | // monthstart := periodtime; |
| | | // } |
| | | // if( periodtime = monthstart ){ |
| | | // monthperiodname := monthstart.Format( "M2/D2/Y" ); |
| | | // enddate := ( monthstart.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | // this.Column( relnew, ColumnName := monthperiodname, StartDate := monthstart, EndDate := enddate, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | // |
| | | // } |
| | | // monthstart := periodtime.StartOfNextMonth(); |
| | | // } |
| | | } |
| | | *] |
| | | } |
| | |
| | | [* |
| | | // çå
°é¸½ Aug-7-2024 (created) |
| | | |
| | | column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period and column.TimeUnit() = unit ); |
| | | column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period );// and column.TimeUnit() = unit |
| | | |
| | | return column; |
| | | *] |
| | |
| | | allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | search := owner.AssemblyOnlinePlanVersionSearch(); |
| | | if( isnull( owner.AssemblyOnlinePlanVersionSearch() ) ){ |
| | | search := owner.AssemblyOnlinePlanVersionSearch( relnew, Product := allunit, ProductionLine := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | search := owner.AssemblyOnlinePlanVersionSearch( relnew, Product := allunit, ProductionLine := allunit, Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | }else{ |
| | | search := owner.AssemblyOnlinePlanVersionSearch(); |
| | | search.Product( allunit ); |
| | | search.ProductionLine( allunit ); |
| | | search.TimeUnit( Translations::MP_GlobalParameters_Day() ); |
| | | search.Unit( allunit ); |
| | | search.StartDate( Date::MinDate() ); |
| | | search.EndDate( Date::MaxDate() ); |
| | |
| | | interface.AssemblyOnlinePlanVersion( relflush ); |
| | | allunit := AssemblyOnlinePlanVersion::GetDefaultAllUnit(); |
| | | name := AssemblyOnlinePlanVersion::GetDefaultName();//search := |
| | | search := interface.AssemblyOnlinePlanVersionSearch( relnew, Product := allunit, ProductionLine := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | search := interface.AssemblyOnlinePlanVersionSearch( relnew, Product := allunit, ProductionLine := allunit, Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );//, TimeUnit := Translations::MP_GlobalParameters_Day() |
| | | table := selectobject( interface, AssemblyOnlinePlanVersion, version, not version.IsShow() ); |
| | | if( isnull( table ) ){ |
| | | table := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name ); |
| | |
| | | if( isnull( showtable ) ){ |
| | | showtable := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name, IsShow := true ); |
| | | } |
| | | aopcolumns := selectuniquevalues( macroPlan, NewAssemblyOnlinePlanColumn, aopcolumn, not exists( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = aopcolumn.StartDate() ), aopcolumn.StartDate() ); |
| | | aopcolumns := selectuniquevalues( macroPlan, NewAssemblyOnlinePlanColumn, aopcolumn, not exists( table, Column, column, column.StartDate() = aopcolumn.StartDate() ), aopcolumn.StartDate() );//, column.TimeUnit() = Translations::MP_GlobalParameters_Day() |
| | | if( aopcolumns.Size() > 0 ){ |
| | | table.GenerateColumn( aopcolumns, false ); |
| | | } |
| | |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | info( '-----------Search start-------' ); |
| | | table := selectobject( this,InterfaceDataset.CustomerDemandIDS, report, not report.IsShow() ); |
| | | //æ¸
空ä¹ååå¨çæ¾ç¤ºæ°æ® |
| | | idscolumns := selectuniquevalues( table, Column, idscolumn, idscolumn.TimeUnit() = search.TimeUnit() and idscolumn.StartDate() >= search.StartDate() and idscolumn.StartDate() <= search.EndDate(), idscolumn.StartDate() ); |
| | | this.Clear( idscolumns ); |
| | | traverse( table, Row, row, ( search.Unit() = FinancialProductionReport::GetDefaultAllUnit() or row.Factory() = search.Unit() ) |
| | | and ( products.Size() = 0 or products.Find( row.Name() ) > -1 ) ){ |
| | | |
| | | showrow := selectobject( this, Row, showrow, showrow.Name() = row.Name() and showrow.Factory() = search.Unit() ); |
| | | if( isnull( showrow ) ){ |
| | | showrow := this.Row( relnew, Name := row.Name(), Factory := search.Unit() ); |
| | | } |
| | | traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){ |
| | | column := selectobject( this, Column, column, column.Name() = cell.Column().Name() ); |
| | | if( not isnull( column ) ){ |
| | | showcell := selectobject( showrow, Cell, showcell, showcell.Column() = column ); |
| | | if( isnull( showcell ) ){ |
| | | showcell := column.Cell( relnew, Value := '' ); |
| | | showrow.Cell( relinsert, showcell ); |
| | | } |
| | | showcell.Value( [String]( [Number]cell.Value() + [Number]showcell.Value() ) ); |
| | | } |
| | | } |
| | | } |
| | | //table := selectobject( this,InterfaceDataset.CustomerDemandIDS, report, not report.IsShow() ); |
| | | ////æ¸
空ä¹ååå¨çæ¾ç¤ºæ°æ® |
| | | //idscolumns := selectuniquevalues( table, Column, idscolumn, idscolumn.TimeUnit() = search.TimeUnit() and idscolumn.StartDate() >= search.StartDate() and idscolumn.StartDate() <= search.EndDate(), idscolumn.StartDate() ); |
| | | //this.Clear( idscolumns ); |
| | | //traverse( table, Row, row, ( search.Unit() = FinancialProductionReport::GetDefaultAllUnit() or row.Factory() = search.Unit() ) |
| | | // and ( products.Size() = 0 or products.Find( row.Name() ) > -1 ) ){ |
| | | // |
| | | // showrow := selectobject( this, Row, showrow, showrow.Name() = row.Name() and showrow.Factory() = search.Unit() ); |
| | | // if( isnull( showrow ) ){ |
| | | // showrow := this.Row( relnew, Name := row.Name(), Factory := search.Unit() ); |
| | | // } |
| | | // traverse( row, Cell, cell, cell.Column().TimeUnit() = search.TimeUnit() ){ |
| | | // column := selectobject( this, Column, column, column.Name() = cell.Column().Name() ); |
| | | // if( not isnull( column ) ){ |
| | | // showcell := selectobject( showrow, Cell, showcell, showcell.Column() = column ); |
| | | // if( isnull( showcell ) ){ |
| | | // showcell := column.Cell( relnew, Value := '' ); |
| | | // showrow.Cell( relinsert, showcell ); |
| | | // } |
| | | // showcell.Value( [String]( [Number]cell.Value() + [Number]showcell.Value() ) ); |
| | | // } |
| | | // } |
| | | //} |
| | | info( '-----------Search end-------' ); |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | timeunit := guard( this.InterfaceDataset().CustomerDemandIDSSearch().TimeUnit(), Translations::MP_GlobalParameters_Day() ) ; |
| | | weekstart := periods.Element( 0 ); |
| | | |
| | | monthstart := periods.Element( 0 ); |
| | | //timeunit := guard( this.InterfaceDataset().CustomerDemandIDSSearch().TimeUnit(), Translations::MP_GlobalParameters_Day() ) ; |
| | | //weekstart := periods.Element( 0 ); |
| | | // |
| | | //monthstart := periods.Element( 0 ); |
| | | traverse( periods, Elements, periodtime ){ |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Day() ){ |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Day() ){ |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | this.Column( relnew, Name := periodname, StartDate := periodtime, EndDate := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | } |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | weekend := ( weekstart + Duration::Days( 6 ) ).Date(); |
| | | if( ( weekend.Year() <> periodtime.Year() and weekend.Month() > 1 ) or ( abs( weekstart.Week() - periodtime.Week() ) > 1 and weekend.Year() = periodtime.Year() ) ){ |
| | | weekstart := periodtime; |
| | | } |
| | | if( periodtime = weekstart ){ |
| | | weekperiodname := weekstart.Format( "M2/D2/Y" ); |
| | | this.Column( relnew, Name := weekperiodname, StartDate := weekstart, EndDate := ( weekstart.StartOfNextWeek() - Duration::Days( 1 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | |
| | | } |
| | | weekstart := periodtime.StartOfNextWeek(); |
| | | } |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | if( ( monthstart.Year() <> periodtime.Year() and abs( monthstart.Month() - periodtime.Month() ) <> 11 ) or ( abs( monthstart.Month() - periodtime.Month() ) > 1 and monthstart.Year() = periodtime.Year() ) ){ |
| | | monthstart := periodtime; |
| | | } |
| | | if( periodtime = monthstart ){ |
| | | monthperiodname := monthstart.Format( "M2/D2/Y" ); |
| | | enddate := ( monthstart.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | this.Column( relnew, Name := monthperiodname, StartDate := monthstart, EndDate := enddate, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | |
| | | } |
| | | monthstart := periodtime.StartOfNextMonth(); |
| | | } |
| | | this.Column( relnew, Name := periodname, StartDate := periodtime, EndDate := periodtime );//, TimeUnit := Translations::MP_GlobalParameters_Day() |
| | | // } |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | // weekend := ( weekstart + Duration::Days( 6 ) ).Date(); |
| | | // if( ( weekend.Year() <> periodtime.Year() and weekend.Month() > 1 ) or ( abs( weekstart.Week() - periodtime.Week() ) > 1 and weekend.Year() = periodtime.Year() ) ){ |
| | | // weekstart := periodtime; |
| | | // } |
| | | // if( periodtime = weekstart ){ |
| | | // weekperiodname := weekstart.Format( "M2/D2/Y" ); |
| | | // this.Column( relnew, Name := weekperiodname, StartDate := weekstart, EndDate := ( weekstart.StartOfNextWeek() - Duration::Days( 1 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | // |
| | | // } |
| | | // weekstart := periodtime.StartOfNextWeek(); |
| | | // } |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | // if( ( monthstart.Year() <> periodtime.Year() and abs( monthstart.Month() - periodtime.Month() ) <> 11 ) or ( abs( monthstart.Month() - periodtime.Month() ) > 1 and monthstart.Year() = periodtime.Year() ) ){ |
| | | // monthstart := periodtime; |
| | | // } |
| | | // if( periodtime = monthstart ){ |
| | | // monthperiodname := monthstart.Format( "M2/D2/Y" ); |
| | | // enddate := ( monthstart.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | // this.Column( relnew, Name := monthperiodname, StartDate := monthstart, EndDate := enddate, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | // |
| | | // } |
| | | // monthstart := periodtime.StartOfNextMonth(); |
| | | // } |
| | | } |
| | | *] |
| | | } |
| | |
| | | // çå
°é¸½ Aug-7-2024 (created) |
| | | //periodname := period.Format( "M2/D2/Y" ); |
| | | |
| | | column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period and column.TimeUnit() = unit ); |
| | | column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period );// and column.TimeUnit() = unit |
| | | |
| | | return column; |
| | | *] |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Aug-20-2024 (created) |
| | | interface.CustomerDemandIDS( relflush ); |
| | | //interface.CustomerDemandIDS( relflush ); |
| | | //interface.CustomerDemandIDSSearch( relflush ); |
| | | info( '-------------------------Start---------------------'); |
| | | allunit := CustomerDemandIDS::GetDefaultAllUnit(); |
| | | search := interface.CustomerDemandIDSSearch( relnew, Product := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate(), TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit ); |
| | | search := interface.CustomerDemandIDSSearch( relnew, Product := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate(), Unit := allunit ); |
| | | name := '客æ·éæ±'; |
| | | idstable := selectobject( interface, CustomerDemandIDS, idstable, idstable.ID() = name ); |
| | | if( isnull( idstable ) ){ |
| | |
| | | allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | search := owner.CustomerDemandIDSSearch(); |
| | | if( isnull( search ) ){ |
| | | search := owner.CustomerDemandIDSSearch( relnew, Product := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | search := owner.CustomerDemandIDSSearch( relnew, Product := allunit, Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | }else{ |
| | | search := owner.CustomerDemandIDSSearch(); |
| | | search.Product( allunit ); |
| | | search.TimeUnit( Translations::MP_GlobalParameters_Day() ); |
| | | search.Unit( allunit ); |
| | | search.StartDate( Date::MinDate() ); |
| | | search.EndDate( Date::MaxDate() ); |
| | |
| | | jsonarray := JSON::Array(); |
| | | |
| | | traverse ( table, Row, r ){ |
| | | traverse ( table, Column, c, c.TimeUnit() = Translations::MP_GlobalParameters_Day() ) { |
| | | traverse ( table, Column, c ) {//, c.TimeUnit() = Translations::MP_GlobalParameters_Day() |
| | | cell := select( r, Cell, tempC, tempC.Column() = c ); |
| | | |
| | | if ( not isnull( cell ) ) { |
| | |
| | | jsonarray := JSON::Array(); |
| | | |
| | | traverse ( table, Row, r ){ |
| | | traverse ( table, Column, c, c.TimeUnit() = Translations::MP_GlobalParameters_Day() ) { |
| | | traverse ( table, Column, c ) {//, c.TimeUnit() = Translations::MP_GlobalParameters_Day() |
| | | cell := select( r, Cell, tempC, tempC.Column() = c ); |
| | | |
| | | if ( not isnull( cell ) ) { |
| | |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | info( '-----------Search start-------' ); |
| | | table := selectobject( this,InterfaceDataset.InventoryPlanArchiveVersion, 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() ); |
| | | this.Clear( aopcolumns ); |
| | | traverse( table, Row, row, ( units.Size() = 0 or units.Find( row.Unit() ) > -1 ) and ( products.Size() = 0 or 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.Name() = cell.Column().Name() ); |
| | | if( not isnull( column ) ){ |
| | | showcell := selectobject( showrow, Cell, showcell, showcell.Column() = column ); |
| | | if( isnull( showcell ) ){ |
| | | showcell := showrow.Cell( relnew, PlanQuantity := 0, ActualQuantity := 0 ); |
| | | column.Cell( relinsert, showcell ); |
| | | } |
| | | showcell.PlanQuantity( cell.PlanQuantity() + showcell.PlanQuantity() ); |
| | | showcell.ActualQuantity( cell.ActualQuantity() + showcell.ActualQuantity() ); |
| | | } |
| | | } |
| | | } |
| | | //table := selectobject( this,InterfaceDataset.InventoryPlanArchiveVersion, report, not report.IsShow() ); |
| | | ////æ¸
空ä¹ååå¨çæ¾ç¤ºæ°æ® |
| | | //search.TimeUnit( Translations::MP_GlobalParameters_Day() ); |
| | | //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, ( units.Size() = 0 or units.Find( row.Unit() ) > -1 ) and ( products.Size() = 0 or 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.Name() = cell.Column().Name() ); |
| | | // if( not isnull( column ) ){ |
| | | // showcell := selectobject( showrow, Cell, showcell, showcell.Column() = column ); |
| | | // if( isnull( showcell ) ){ |
| | | // showcell := showrow.Cell( relnew, PlanQuantity := 0, ActualQuantity := 0 ); |
| | | // column.Cell( relinsert, showcell ); |
| | | // } |
| | | // showcell.PlanQuantity( cell.PlanQuantity() + showcell.PlanQuantity() ); |
| | | // showcell.ActualQuantity( cell.ActualQuantity() + showcell.ActualQuantity() ); |
| | | // } |
| | | // } |
| | | //} |
| | | info( '-----------Search end-------' ); |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | timeunit := guard( this.InterfaceDataset().InventoryPlanArchiveVersionSearch().TimeUnit(), Translations::MP_GlobalParameters_Day() ) ; |
| | | weekstart := periods.Element( 0 ); |
| | | |
| | | monthstart := periods.Element( 0 ); |
| | | //timeunit := guard( this.InterfaceDataset().InventoryPlanArchiveVersionSearch().TimeUnit(), Translations::MP_GlobalParameters_Day() ) ; |
| | | //weekstart := periods.Element( 0 ); |
| | | // |
| | | //monthstart := periods.Element( 0 ); |
| | | traverse( periods, Elements, periodtime ){ |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Day() ){ |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Day() ){ |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | this.Column( relnew, Name := periodname, StartDate := periodtime, EndDate := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | } |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | weekend := ( weekstart + Duration::Days( 6 ) ).Date(); |
| | | if( ( weekend.Year() <> periodtime.Year() and weekend.Month() > 1 ) or ( abs( weekstart.Week() - periodtime.Week() ) > 1 and weekend.Year() = periodtime.Year() ) ){ |
| | | weekstart := periodtime; |
| | | } |
| | | if( periodtime = weekstart ){ |
| | | weekperiodname := weekstart.Format( "M2/D2/Y" ); |
| | | this.Column( relnew, Name := weekperiodname, StartDate := weekstart, EndDate := ( weekstart.StartOfNextWeek() - Duration::Days( 1 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | |
| | | } |
| | | weekstart := periodtime.StartOfNextWeek(); |
| | | } |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | if( ( monthstart.Year() <> periodtime.Year() and abs( monthstart.Month() - periodtime.Month() ) <> 11 ) or ( abs( monthstart.Month() - periodtime.Month() ) > 1 and monthstart.Year() = periodtime.Year() ) ){ |
| | | monthstart := periodtime; |
| | | } |
| | | if( periodtime = monthstart ){ |
| | | monthperiodname := monthstart.Format( "M2/D2/Y" ); |
| | | enddate := ( monthstart.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | this.Column( relnew, Name := monthperiodname, StartDate := monthstart, EndDate := enddate, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | |
| | | } |
| | | monthstart := periodtime.StartOfNextMonth(); |
| | | } |
| | | this.Column( relnew, Name := periodname, StartDate := periodtime, EndDate := periodtime );//, TimeUnit := Translations::MP_GlobalParameters_Day() |
| | | // } |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | // weekend := ( weekstart + Duration::Days( 6 ) ).Date(); |
| | | // if( ( weekend.Year() <> periodtime.Year() and weekend.Month() > 1 ) or ( abs( weekstart.Week() - periodtime.Week() ) > 1 and weekend.Year() = periodtime.Year() ) ){ |
| | | // weekstart := periodtime; |
| | | // } |
| | | // if( periodtime = weekstart ){ |
| | | // weekperiodname := weekstart.Format( "M2/D2/Y" ); |
| | | // this.Column( relnew, Name := weekperiodname, StartDate := weekstart, EndDate := ( weekstart.StartOfNextWeek() - Duration::Days( 1 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | // |
| | | // } |
| | | // weekstart := periodtime.StartOfNextWeek(); |
| | | // } |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | // if( ( monthstart.Year() <> periodtime.Year() and abs( monthstart.Month() - periodtime.Month() ) <> 11 ) or ( abs( monthstart.Month() - periodtime.Month() ) > 1 and monthstart.Year() = periodtime.Year() ) ){ |
| | | // monthstart := periodtime; |
| | | // } |
| | | // if( periodtime = monthstart ){ |
| | | // monthperiodname := monthstart.Format( "M2/D2/Y" ); |
| | | // enddate := ( monthstart.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | // this.Column( relnew, Name := monthperiodname, StartDate := monthstart, EndDate := enddate, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | // |
| | | // } |
| | | // monthstart := periodtime.StartOfNextMonth(); |
| | | // } |
| | | } |
| | | *] |
| | | } |
| | |
| | | // çå
°é¸½ Aug-7-2024 (created) |
| | | //periodname := period.Format( "M2/D2/Y" ); |
| | | |
| | | column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period and column.TimeUnit() = unit ); |
| | | column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period );// and column.TimeUnit() = unit |
| | | |
| | | return column; |
| | | *] |
| | |
| | | Description: 'çæè®¡ååºååæ¡£æ°æ®' |
| | | TextBody: |
| | | [* |
| | | interfaceDataset.InventoryPlanArchiveVersion( relflush ); |
| | | //interfaceDataset.InventoryPlanArchiveVersion( relflush ); |
| | | info( '-------------------------Start---------------------'); |
| | | machineproductparent := MachiningPipelineReport::GetDefaultProductParent(); |
| | | engineproductparent := EnginePipelineReport::GetDefaultProductParent(); |
| | | allunit := AssemblyOnlinePlanVersion::GetDefaultAllUnit(); |
| | | name := InventoryPlanArchiveVersion::GetDefaultName(); |
| | | search := interfaceDataset.InventoryPlanArchiveVersionSearch( relnew, Product := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | search := interfaceDataset.InventoryPlanArchiveVersionSearch( relnew, Product := allunit, Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );//, TimeUnit := Translations::MP_GlobalParameters_Day() |
| | | table := selectobject( interfaceDataset, InventoryPlanArchiveVersion, version, not version.IsShow() ); |
| | | if( isnull( table ) ){ |
| | | table := interfaceDataset.InventoryPlanArchiveVersion( relnew, ID := name, Name := name ); |
| | |
| | | showtable := interfaceDataset.InventoryPlanArchiveVersion( relnew, ID := name, Name := name, IsShow := true ); |
| | | } |
| | | periods := selectuniquevalues( macroPlan, Period_MP, period, not period.IsHistorical() and period.TimeUnit() = Translations::MP_GlobalParameters_Day() |
| | | and not exists( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = period.StartDate() ), period.StartDate() ); |
| | | and not exists( table, Column, column, column.StartDate() = period.StartDate() ), period.StartDate() );//column.TimeUnit() = Translations::MP_GlobalParameters_Day() and |
| | | if( periods.Size() > 0 ){ |
| | | table.GenerateColumn( periods, false ); |
| | | } |
| | |
| | | allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | search := owner.InventoryPlanArchiveVersionSearch(); |
| | | if( isnull( owner.InventoryPlanArchiveVersionSearch() ) ){ |
| | | search := owner.InventoryPlanArchiveVersionSearch( relnew, Product := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | search := owner.InventoryPlanArchiveVersionSearch( relnew, Product := allunit, Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );//, TimeUnit := Translations::MP_GlobalParameters_Day() |
| | | }else{ |
| | | search := owner.InventoryPlanArchiveVersionSearch(); |
| | | search.Product( allunit ); |
| | | search.TimeUnit( Translations::MP_GlobalParameters_Day() ); |
| | | // search.TimeUnit( Translations::MP_GlobalParameters_Day() ); |
| | | search.Unit( allunit ); |
| | | search.StartDate( Date::MinDate() ); |
| | | search.EndDate( Date::MaxDate() ); |
| | |
| | | offlinePlanRow := select( offlinePlanTable,Row,row,row.ProductID() = this.ProductInStockingPoint_MP().ProductID() and row.StockingPointID() = this.ProductInStockingPoint_MP().StockingPointID() ); |
| | | |
| | | if( not this.IsEnable() and not isnull( offlinePlanRow )){ |
| | | offlinePlanCells := selectset( offlinePlanRow, Cell,cell,cell.Column().TimeUnit() = "Day" ); |
| | | offlinePlanCells := selectset( offlinePlanRow, Cell,cell, true );//,cell.Column().TimeUnit() = "Day" |
| | | offlinePlanCellIndexTree := NamedValueTree::Create(); |
| | | for( i := 0; i< offlinePlanCells.Size(); i++ ){ |
| | | offlinePlanCell := offlinePlanCells.Element( i ); |
| | |
| | | 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() ); |
| | | } |
| | | // } |
| | | } |
| | | } |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | timeunit := guard( this.InterfaceDataset().OfflinePlanArchiveSearch().TimeUnit(), Translations::MP_GlobalParameters_Day() ) ; |
| | | weekstart := periods.Element( 0 ); |
| | | |
| | | monthstart := periods.Element( 0 ); |
| | | //timeunit := guard( this.InterfaceDataset().OfflinePlanArchiveSearch().TimeUnit(), Translations::MP_GlobalParameters_Day() ) ; |
| | | //weekstart := periods.Element( 0 ); |
| | | // |
| | | //monthstart := periods.Element( 0 ); |
| | | traverse( periods, Elements, periodtime ){ |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Day() ){ |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Day() ){ |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | this.Column( relnew, ColumnName := periodname, StartDate := periodtime, EndDate := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | } |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | weekend := ( weekstart + Duration::Days( 6 ) ).Date(); |
| | | if( ( weekend.Year() <> periodtime.Year() and weekend.Month() > 1 ) or ( abs( weekstart.Week() - periodtime.Week() ) > 1 and weekend.Year() = periodtime.Year() ) ){ |
| | | weekstart := periodtime; |
| | | } |
| | | if( periodtime = weekstart ){ |
| | | weekperiodname := weekstart.Format( "M2/D2/Y" ); |
| | | this.Column( relnew, ColumnName := weekperiodname, StartDate := weekstart, EndDate := ( weekstart.StartOfNextWeek() - Duration::Days( 1 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | |
| | | } |
| | | weekstart := periodtime.StartOfNextWeek(); |
| | | } |
| | | if( not isshow or timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | if( ( monthstart.Year() <> periodtime.Year() and abs( monthstart.Month() - periodtime.Month() ) <> 11 ) or ( abs( monthstart.Month() - periodtime.Month() ) > 1 and monthstart.Year() = periodtime.Year() ) ){ |
| | | monthstart := periodtime; |
| | | } |
| | | if( periodtime = monthstart ){ |
| | | monthperiodname := monthstart.Format( "M2/D2/Y" ); |
| | | enddate := ( monthstart.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | this.Column( relnew, ColumnName := monthperiodname, StartDate := monthstart, EndDate := enddate, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | |
| | | } |
| | | monthstart := periodtime.StartOfNextMonth(); |
| | | } |
| | | this.Column( relnew, ColumnName := periodname, StartDate := periodtime, EndDate := periodtime );//, TimeUnit := Translations::MP_GlobalParameters_Day() |
| | | // } |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Week() ){ |
| | | // weekend := ( weekstart + Duration::Days( 6 ) ).Date(); |
| | | // if( ( weekend.Year() <> periodtime.Year() and weekend.Month() > 1 ) or ( abs( weekstart.Week() - periodtime.Week() ) > 1 and weekend.Year() = periodtime.Year() ) ){ |
| | | // weekstart := periodtime; |
| | | // } |
| | | // if( periodtime = weekstart ){ |
| | | // weekperiodname := weekstart.Format( "M2/D2/Y" ); |
| | | // this.Column( relnew, ColumnName := weekperiodname, StartDate := weekstart, EndDate := ( weekstart.StartOfNextWeek() - Duration::Days( 1 ) ).Date(), TimeUnit := Translations::MP_GlobalParameters_Week() ); |
| | | // |
| | | // } |
| | | // weekstart := periodtime.StartOfNextWeek(); |
| | | // } |
| | | // if( not isshow or timeunit = Translations::MP_GlobalParameters_Month() ){ |
| | | // if( ( monthstart.Year() <> periodtime.Year() and abs( monthstart.Month() - periodtime.Month() ) <> 11 ) or ( abs( monthstart.Month() - periodtime.Month() ) > 1 and monthstart.Year() = periodtime.Year() ) ){ |
| | | // monthstart := periodtime; |
| | | // } |
| | | // if( periodtime = monthstart ){ |
| | | // monthperiodname := monthstart.Format( "M2/D2/Y" ); |
| | | // enddate := ( monthstart.StartOfNextMonth() - Duration::Days( 1 ) ).Date(); |
| | | // this.Column( relnew, ColumnName := monthperiodname, StartDate := monthstart, EndDate := enddate, TimeUnit := Translations::MP_GlobalParameters_Month() ); |
| | | // |
| | | // } |
| | | // monthstart := periodtime.StartOfNextMonth(); |
| | | // } |
| | | } |
| | | *] |
| | | } |
| | |
| | | [* |
| | | // çå
°é¸½ Aug-7-2024 (created) |
| | | |
| | | column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period and column.TimeUnit() = unit ); |
| | | column := selectobject( this, Column, column, column.StartDate() <= period and column.EndDate() >= period );// and column.TimeUnit() = unit |
| | | |
| | | return column; |
| | | *] |
| | |
| | | allunit := FinancialProductionReport::GetDefaultAllUnit(); |
| | | search := owner.OfflinePlanArchiveSearch(); |
| | | if( isnull( owner.OfflinePlanArchiveSearch() ) ){ |
| | | search := owner.OfflinePlanArchiveSearch( relnew, Product := allunit, ProductionLine := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | search := owner.OfflinePlanArchiveSearch( relnew, Product := allunit, ProductionLine := allunit, Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() );//, TimeUnit := Translations::MP_GlobalParameters_Day() |
| | | }else{ |
| | | search := owner.OfflinePlanArchiveSearch(); |
| | | search.Product( allunit ); |
| | | search.ProductionLine( allunit ); |
| | | search.TimeUnit( Translations::MP_GlobalParameters_Day() ); |
| | | // search.TimeUnit( Translations::MP_GlobalParameters_Day() ); |
| | | search.Unit( allunit ); |
| | | search.StartDate( Date::MinDate() ); |
| | | search.EndDate( Date::MaxDate() ); |
| | |
| | | //æ ¹æ®å½åçæ¬çä¸çº¿è®¡å |
| | | allunit := OfflinePlanArchiveVersion::GetDefaultAllUnit(); |
| | | name := OfflinePlanArchiveVersion::GetDefaultName(); |
| | | search := interface.OfflinePlanArchiveSearch( relnew, Product := allunit, ProductionLine := allunit, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | 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 ); |
| | |
| | | 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.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcolumn.StartDate() ), nopcolumn.StartDate() ); |
| | | 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 ); |
| | | } |
| | |
| | | row := table.GetRow( noprow ); |
| | | if( not isnull( row ) ){ |
| | | traverse( noprow, NewOfflinePlanCell, nopcell ){ |
| | | column := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() ); |
| | | column := selectobject( table, Column, column, column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() );//column.TimeUnit() = Translations::MP_GlobalParameters_Day() and |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | actproductionKey := noprow.ProductID() + column.StartDate().AsQUILL(); |
| | | actproductionhandle:= actproductiontree.GetHandle( actproductionKey ); |
| | |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | Visible: false |
| | | ] |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | //åºé´æ¹ååå·æ°æ¾ç¤º |
| | | if( dhSearch.Data().TimeUnit() <> this.BoundValue() ){ |
| | | dhSearch.Data().TimeUnit( this.BoundValue() ); |
| | | // DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | } |
| | | //if( dhSearch.Data().TimeUnit() <> this.BoundValue() ){ |
| | | // dhSearch.Data().TimeUnit( this.BoundValue() ); |
| | | //// DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | //} |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | Properties: |
| | | [ |
| | | Taborder: 5 |
| | | Visible: false |
| | | ] |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | //åºé´æ¹ååå·æ°æ¾ç¤º |
| | | if( dhSearch.Data().TimeUnit() <> this.BoundValue() ){ |
| | | dhSearch.Data().TimeUnit( this.BoundValue() ); |
| | | // DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | } |
| | | //if( dhSearch.Data().TimeUnit() <> this.BoundValue() ){ |
| | | // dhSearch.Data().TimeUnit( this.BoundValue() ); |
| | | //// DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | //} |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | Visible: false |
| | | ] |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | //åºé´æ¹ååå·æ°æ¾ç¤º |
| | | if( dhSearch.Data().TimeUnit() <> this.BoundValue() ){ |
| | | dhSearch.Data().TimeUnit( this.BoundValue() ); |
| | | // DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | } |
| | | //if( dhSearch.Data().TimeUnit() <> this.BoundValue() ){ |
| | | // dhSearch.Data().TimeUnit( this.BoundValue() ); |
| | | //// DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | //} |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Attributes: 'Quantity;ActualProductionQty' |
| | | Attributes: 'Order;Quantity;ActualProductionQty' |
| | | Column: 'Column' |
| | | Row: 'Row' |
| | | Taborder: 0 |
| | |
| | | [ |
| | | Orientation: 'horizontal' |
| | | Taborder: 1 |
| | | Visible: false |
| | | ] |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | //åºé´æ¹ååå·æ°æ¾ç¤º |
| | | if( dhSearch.Data().TimeUnit() <> this.BoundValue() ){ |
| | | dhSearch.Data().TimeUnit( this.BoundValue() ); |
| | | // DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | } |
| | | //if( dhSearch.Data().TimeUnit() <> this.BoundValue() ){ |
| | | // dhSearch.Data().TimeUnit( this.BoundValue() ); |
| | | //// DataHolderTable.Data().Generate( dhSearch.Data(), DataHolderProduct.Data() ); |
| | | //} |
| | | *] |
| | | GroupServerCalls: false |
| | | } |