Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | } |
| | | } |
| | | |
| | | traverse( owner, OfflinePlanArchiveVersion, table ){ |
| | | traverse( owner, OfflinePlanArchiveVersion, table, not table.IsShow() ){ |
| | | traverse( table, Column, column, column.StartDate() >= startdate and column.StartDate() <= enddate ){ |
| | | 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' ) ){ |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Order |
| | | { |
| | | #keys: '3[415136.0.1280830135][415136.0.1280830134][415136.0.1280830136]' |
| | | Description: 'ç产顺åºï¼Stringï¼' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: Order |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GenerateData ( |
| | | const MacroPlan macroplan, |
| | | InterfaceDataset interfaceDataset, |
| | | String executor, |
| | | Boolean versionflag |
| | | const MacroPlan macroplan, |
| | | String executor |
| | | ) |
| | | { |
| | | Description: 'çæå¯ä»¥ä¸åç客æ·éæ±ï¼PPA+IDSï¼æ°æ®' |
| | |
| | | , Name := Translations::InterfaceDataset_AssemblyOnlinePlanPPPSPush_Name() |
| | | , InterfaceDateTime := nowdate |
| | | , Message := 'è£
é
ä¸çº¿è®¡å-PPPSä¼ è¾è³æ°æ®ä¸å°ï¼å
嫿åºï¼/SAPï¼ä¸å
嫿åºï¼' |
| | | , IsShow := false |
| | | , Last := true |
| | | , ReturnSuccess := true |
| | | , ReturnMsg := 'Success' |
| | | , Success := true |
| | | , Last := true |
| | | ); |
| | | traverse( macroplan, AssemblyOnlinePlanColumn, column ){ |
| | | traverse( column, AssemblyOnlinePlanCell, cell, cell.Value() <> '' and cell.AssemblyOnlinePlanRow().Type() = '1' ){ |
| | | quantityrow := cell.AssemblyOnlinePlanRow(); |
| | | ordercell := selectobject( column, AssemblyOnlinePlanCell, ocell, ocell.AssemblyOnlinePlanRow().ProductID() = quantityrow.ProductID() |
| | | and ocell.AssemblyOnlinePlanRow().ProductionLine() = quantityrow.ProductionLine() |
| | | and ocell.AssemblyOnlinePlanRow().Type() = '2' ); |
| | | product := selectobject( macroplan, Product_MP, product, product.ID() = quantityrow.ProductID() ); |
| | | |
| | | cd :=interfaceDataset.AssemblyOnlinePlanPPPSPush( relnew, Product := product.ID() |
| | | , PlanningDate := column.ColumnDate() |
| | | , PlanningQty := [Number]cell.Value() |
| | | , Sequence := ordercell.Value() |
| | | traverse( interfaceDataset, AssemblyOnlinePlanVersion, verison, not verison.IsShow() ){ |
| | | traverse( verison, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() ){ |
| | | traverse( column, Cell, cell ){ |
| | | row := cell.Row(); |
| | | cd :=interfaceDataset.AssemblyOnlinePlanPPPSPush( relnew, Product := row.ProductID() |
| | | , PlanningDate := column.StartDate() |
| | | , PlanningQty := [Number]cell.Quantity() |
| | | , Sequence := cell.Order() |
| | | , VersionName := macroplan.ScenarioName() |
| | | , InterfaceTime := nowdate |
| | | , VersionFlag := versionflag |
| | | , ProductFourCode := product.Notes() |
| | | , FactoryName := row.Unit() |
| | | , Fac := ifexpr( row.Unit() = FinancialProductionReport::GetDefaultCCUnit(), 'CC', 'DL' ) |
| | | // , VersionFlag := versionflag |
| | | , ProductFourCode := ifexpr( row.ProductID() = row.Name(), '', row.Name() ) |
| | | ); |
| | | loginfo.AssemblyOnlinePlanPPPSPush( relinsert, cd ); |
| | | } |
| | | } |
| | | } |
| | | loginfo.TotalRow( loginfo.AssemblyOnlinePlanPPPSPush( relsize ) ); |
| | | AssemblyOnlinePlanPPPSPush::Publish( interfaceDataset, loginfo ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod Publish ( |
| | | InterfaceDataset owner, |
| | | InterfaceLoginfo loginfo |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | //// çå
°é¸½ Jul-17-2024 (created) |
| | | jsonarray := JSON::Array(); |
| | | traverse( owner, AssemblyOnlinePlanPPPSPush, aopdata ){ |
| | | aopdatajson := JSON::Object().Add( "product", aopdata.Product() ).Add( "planningDate", aopdata.PlanningDate().Format( 'Y-M2-D2' ) )//"2024-10-01" ) |
| | | .Add( "planningQty", aopdata.PlanningQty() ) |
| | | .Add( "sequence", aopdata.Sequence() ) |
| | | .Add( "factoryName", aopdata.FactoryName() ) |
| | | .Add( "fac", aopdata.Fac() ) |
| | | .Add( "versionName", aopdata.VersionName() ) |
| | | .Add( "interfaceTime", aopdata.InterfaceTime().Format( 'Y-M2-D2 H:m:s' ) ).Build();/*"2024-10-01 12:00:00" )*/ |
| | | jsonarray.Add( aopdatajson ); |
| | | } |
| | | requestbody := jsonarray.Build().AsString(); |
| | | info( requestbody ); |
| | | data := InterfaceLoginfo::CallInterfaceForDataCenter( owner, loginfo ); |
| | | info( '----------------', data.AsString() ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Clear ( |
| | | Dates periods |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | this.Column( relflush ); |
| | | this.Row( relflush ); |
| | | |
| | | this.GenerateColumn( periods, true ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Generate ( |
| | | AssemblyOnlinePlanVersionSearch search |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ 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, ( search.Unit() = FinancialProductionReport::GetDefaultAllUnit() or row.Unit() = search.Unit() ) |
| | | and ( search.Product() = FinancialProductionReport::GetDefaultAllUnit() or search.Product() = row.Name() ) |
| | | and ( search.ProductionLine() = FinancialProductionReport::GetDefaultAllUnit() or search.ProductionLine() = row.ProductionLine() ) ){ |
| | | |
| | | 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-------' ); |
| | | *] |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GenerateColumn ( |
| | | Dates periods |
| | | Dates periods, |
| | | Boolean isshow |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | timeunit := guard( this.InterfaceDataset().AssemblyOnlinePlanVersionSearch().TimeUnit(), Translations::MP_GlobalParameters_Day() ) ; |
| | | weekstart := periods.Element( 0 ); |
| | | |
| | | monthstart := periods.Element( 0 ); |
| | | traverse( periods, Elements, periodtime ){ |
| | | periodname := periodtime.Format( "M2/D2/Y" ); |
| | | |
| | | this.Column( relnew, ColumnName := periodname, StartDate := periodtime, EndDate := periodtime, TimeUnit := Translations::MP_GlobalParameters_Day() ); |
| | | |
| | | 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() ); |
| | | 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( ( 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( 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( 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() ); |
| | | |
| | | 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(); |
| | | } |
| | | weekstart := periodtime.StartOfNextWeek(); |
| | | monthstart := periodtime.StartOfNextMonth(); |
| | | } |
| | | *] |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GetRow ( |
| | | const NewAssemblyOnlinePlanRow aoprow |
| | | NewAssemblyOnlinePlanRow aoprow |
| | | ) as AssemblyOnlinePlanVersionRow |
| | | { |
| | | TextBody: |
| | |
| | | row := selectobject( this, Row, row, row.ProductID() = aoprow.ProductID() and row.ProductionLine() = aoprow.ProductionLine() and row.Type() = aoprow.Type() ); |
| | | |
| | | if( isnull( row ) ){ |
| | | product := selectobject( aoprow.MacroPlan(), Product_MP, product, product.ID() = aoprow.ProductID() ); |
| | | unit := ifexpr( aoprow.ProductionLine().FindString( "CC", 0 ) > -1, FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() ); |
| | | row := this.Row( relnew, ProductID := aoprow.ProductID(), ProductionLine := aoprow.ProductionLine(), Type := aoprow.Type(), Unit := unit ); |
| | | row := this.Row( relnew, Name := aoprow.ProductID(), ProductionLine := aoprow.ProductionLine(), Type := aoprow.Type(), Unit := unit |
| | | , ProductID := ifexpr( exists( product.GetAllParent(), Elements, e, e.ID() = EnginePipelineReport::GetDefaultProductParent() ), product.Notes(), product.ID() ) ); |
| | | //åå§ååå
æ ¼ |
| | | row.InitializeCell(); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod InitiateSearch ( |
| | | InterfaceDataset owner |
| | | ) as AssemblyOnlinePlanVersion |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Sep-29-2024 (created) |
| | | 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() ); |
| | | }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() ); |
| | | } |
| | | table := selectobject( owner, AssemblyOnlinePlanVersion, table, table.IsShow() ); |
| | | if( not isnull( table ) ){ |
| | | table.Generate( search); |
| | | } |
| | | return table; |
| | | *] |
| | | } |
| | |
| | | #parent: #root |
| | | StaticMethod RefreshData ( |
| | | InterfaceDataset interface, |
| | | const MacroPlan macroPlan |
| | | MacroPlan macroPlan |
| | | ) |
| | | { |
| | | TextBody: |
| | |
| | | interface.AssemblyOnlinePlanVersion( relflush ); |
| | | allunit := AssemblyOnlinePlanVersion::GetDefaultAllUnit(); |
| | | name := AssemblyOnlinePlanVersion::GetDefaultName();//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, TimeUnit := Translations::MP_GlobalParameters_Day(), Unit := allunit, StartDate := Date::MinDate(), EndDate := Date::MaxDate() ); |
| | | table := selectobject( interface, AssemblyOnlinePlanVersion, version, not version.IsShow() ); |
| | | if( isnull( table ) ){ |
| | | table := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name ); |
| | | } |
| | | //showtable := selectobject( interface, AssemblyOnlinePlanVersion, version, version.IsShow() ); |
| | | //if( isnull( table ) ){ |
| | | // showtable := interface.AssemblyOnlinePlanVersion( relnew, ID := name, Name := name, IsShow := true ); |
| | | //} |
| | | showtable := selectobject( interface, AssemblyOnlinePlanVersion, version, version.IsShow() ); |
| | | if( isnull( table ) ){ |
| | | 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() ); |
| | | table.GenerateColumn( aopcolumns ); |
| | | table.GenerateColumn( aopcolumns, false ); |
| | | traverse( macroPlan, NewAssemblyOnlinePlanRow, aoprow, aoprow.Type() = '1' ){ |
| | | row := table.GetRow( aoprow ); |
| | | info( '------------------------', row.Type() ); |
| | | traverse( aoprow, NewAssemblyOnlinePlanCell, aopcell ){ |
| | | column := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = aopcell.NewAssemblyOnlinePlanColumn().StartDate() ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | cell.InventoryWeight( aopcell.InventoryWeight() ); |
| | | // cell.ProductionSerialNumber( aopcell.ProductionSerialNumber() ); |
| | | // cell.InventoryWeight( aopcell.InventoryWeight() ); |
| | | cell.Quantity( aopcell.Quantity() ); |
| | | // cell.Shift( aopcell.Shift() ); |
| | | // cell.Value( aopcell.Value() ); |
| | | } |
| | | } |
| | | //showtable.Generate( search, products ); |
| | | showtable.Generate( search ); |
| | | *] |
| | | } |
| | |
| | | , InterfaceDateTime := nowdate |
| | | , Message := '客æ·éæ±ï¼PPA+IDSï¼æ°æ®æ¨é' |
| | | , Last := true |
| | | , IsShow := false |
| | | , ReturnSuccess := true |
| | | , ReturnMsg := 'Success' |
| | | , Success := true |
| | | ); |
| | | traverse( interfaceDataset, CustomerDemandIDS.Row, row ){ |
| | | traverse( row, Cell, cell ){ |
| | |
| | | , DemandQty := [Number]cell.Value() |
| | | , VersionName := macroplan.ScenarioName() |
| | | , InterfaceTime := nowdate |
| | | , FactoryName := row.Factory() |
| | | , Fac := ifexpr( row.Factory() = FinancialProductionReport::GetDefaultCCUnit(), 'CC', 'DL' ) |
| | | // , VersionFlag := versionflag |
| | | ); |
| | | loginfo.CustomerDemandPPAIDS( relinsert, cd ); |
| | | } |
| | | } |
| | | loginfo.TotalRow( loginfo.CustomerDemandPPAIDS( relsize ) ); |
| | | CustomerDemandPPAIDS::Publish( interfaceDataset, loginfo ); |
| | | *] |
| | | } |
| | |
| | | #parent: #root |
| | | StaticMethod Publish ( |
| | | InterfaceDataset owner, |
| | | String executor |
| | | InterfaceLoginfo loginfo |
| | | ) |
| | | { |
| | | TextBody: |
| | |
| | | .Add( "interfaceTime", ids.InterfaceTime().Format( 'Y-M2-D2 H:m:s' ) ).Build();/*"2024-10-01 12:00:00" )*/ |
| | | jsonarray.Add( idsjson ); |
| | | } |
| | | //jsonarray := JSON::Array().Add( JSON::Object().Add( "product", "DZ948293" ) |
| | | // ).Build(); |
| | | requestbody := jsonarray.Build().AsString(); |
| | | info( requestbody ); |
| | | loginfo := owner.InterfaceLoginfo( relnew, ExecuteUser := executor |
| | | , Name := Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() |
| | | , InterfaceDateTime := DateTime::ActualTime() |
| | | , Message := '客æ·éæ±ï¼PPA+IDSï¼' |
| | | , RequestBody := requestbody); |
| | | //error( '--------------------', requestbody ); |
| | | data := InterfaceLoginfo::CallInterfaceForDataCenter( owner, loginfo ); |
| | | info( '----------------', data.AsString() ); |
| | | //if( not isnull( data ) ){ |
| | | // |
| | | // cnv2 := StringToDate::StandardConverter(); |
| | | // cnv2.SetCustomConversion(); |
| | | // cnv2.CustomFormatString( 'yyyy-MM-dd' ); |
| | | // |
| | | // sadatalist := construct( FinishedEngineInventorys ); |
| | | // for( seq := 0;seq < data.Size();seq++){ |
| | | // item := data.Get(seq); |
| | | // sadata := FinishedEngineInventory::GenerateData( loginfo, cnv2, item ); |
| | | // sadatalist.Add( sadata ); |
| | | // } |
| | | // |
| | | // options := DatasetFindOptions::Construct( 'MacroPlan' ).IncludeOffline( true ); //to load we must search offline datasets. |
| | | // mdskey := DatasetController::FindUnique( options ); |
| | | // |
| | | // MDSMacroPlan::Root( mdskey ) -> InventoryInterfaceData::SynchronizeInventory( owner, sadatalist ); |
| | | //} |
| | | *] |
| | | } |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GenerateArchiveData ( |
| | | const MacroPlan macroplan, |
| | | MacroPlan macroplan, |
| | | RecycleBin recyclebin, |
| | | Archive archive, |
| | | Boolean iscustomdemand, |
| | |
| | | AssemblyOnlinePlanVersion::RefreshData( this, macroplan ); |
| | | } |
| | | if( isinventoryplan ){//åºå计å |
| | | // CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |
| | | InventoryPlanArchiveVersion::GenerateData( macroplan, this ); |
| | | } |
| | | if( istrcdemand ){//TRCéæ± |
| | | // CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |
| | |
| | | // CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |
| | | } |
| | | if( isassembleonlineplan ){//è£
é
ä¸çº¿è®¡å |
| | | // AssemblyOnlinePlanVersion::RefreshData( this, macroplan ); |
| | | AssemblyOnlinePlanPPPSPush::GenerateData( this, macroplan, executor ); |
| | | } |
| | | if ( isinventoryplan ) { // 计ååºåæ°æ® |
| | | InterfaceDataset::PushPlanInventoryData( macroplan, this ); |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GetRowByUnit ( |
| | | String product, |
| | | Product_MP product, |
| | | String unit |
| | | ) as InventoryPlanArchiveRow |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Sep-6-2024 (created) |
| | | row := selectobject( this, Row, row, row.Name() = product and row.Unit() = unit ); |
| | | row := selectobject( this, Row, row, row.Name() = product.ID() and row.Unit() = unit ); |
| | | if( isnull( row ) ){ |
| | | //åå§ååå
æ ¼ |
| | | row := this.Row( relnew, Name := product, Unit := unit ); |
| | | row := this.Row( relnew, Name := product.ID(), Unit := unit, ProductID := ifexpr( exists( product.GetAllParent(), Elements, e, e.ID() = EnginePipelineReport::GetDefaultProductParent() ), product.Notes(), product.ID() ) ); |
| | | traverse( this, Column, column ){ |
| | | row.Initialize( column ); |
| | | } |
| | |
| | | } |
| | | traverse ( macroPlan, Product_MP.ProductInStockingPoint_MP, pispmp, not pispmp.IsSystem() and pispmp.IsLeaf() ) { |
| | | unit := ifexpr( pispmp.StockingPointID().Regex( "大è¿" ) or pispmp.StockingPointID().Regex( "DL" ), FinancialProductionReport::GetDefaultDLUnit(), FinancialProductionReport::GetDefaultCCUnit() ); |
| | | inventoryrow := table.GetRowByUnit( pispmp.ProductID(), unit ); |
| | | inventoryrow := table.GetRowByUnit( pispmp.Product_MP(), unit ); |
| | | traverse ( pispmp, ProductInStockingPointInPeriodPlanning.astype( ProductInStockingPointInPeriodPlanningLeaf ), pispippl, not pispippl.IsPeriodFrozen() ) { |
| | | startdate := pispippl.Start().Date(); |
| | | daycolumn := table.GetColumnByTimeUnit( Translations::MP_GlobalParameters_Day(), startdate ); |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GetRow ( |
| | | const NewOfflinePlanRow noprow |
| | | NewOfflinePlanRow noprow |
| | | ) as OfflinePlanArchiveRow |
| | | { |
| | | TextBody: |
| | |
| | | row := selectobject( this, Row, row, row.ProductID() = noprow.ProductID() and row.ProductionLine() = noprow.ProductionLine() and row.Type() = noprow.Type() ); |
| | | |
| | | if( isnull( row ) ){ |
| | | product := selectobject( noprow.NewOfflinePlanTable().MacroPlan(), Product_MP, product, product.ID() = noprow.ProductID() ); |
| | | unit := ifexpr( noprow.ProductionLine().FindString( "CC", 0 ) > -1, FinancialProductionReport::GetDefaultCCUnit(), FinancialProductionReport::GetDefaultDLUnit() ); |
| | | row := this.Row( relnew, ProductID := noprow.ProductID(), ProductionLine := noprow.ProductionLine(), Type := noprow.Type(), Unit := unit ); |
| | | row := this.Row( relnew, Name := noprow.ProductID(), ProductionLine := noprow.ProductionLine(), Type := noprow.Type(), Unit := unit |
| | | , ProductID := ifexpr( exists( product.GetAllParent(), Elements, e, e.ID() = EnginePipelineReport::GetDefaultProductParent() ), product.Notes(), product.ID() ) ); |
| | | //åå§ååå
æ ¼ |
| | | row.InitializeCell(); |
| | | } |
| | |
| | | #parent: #root |
| | | StaticMethod RefreshData ( |
| | | InterfaceDataset interface, |
| | | const MacroPlan macroPlan, |
| | | MacroPlan macroPlan, |
| | | const Archive archive |
| | | ) |
| | | { |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'InterfaceDataset' |
| | | FilterArguments: 'search:QMacroPlanner::FormAssemblyOnlinePlanVersion.dhSearch' |
| | | FixedFilter: 'object.Column().TimeUnit() = search.TimeUnit() and object.Column().StartDate() >= search.StartDate() and object.Column().StartDate() <= search.EndDate()' |
| | | Source: 'InterfaceDataset' |
| | | DataType: 'AssemblyOnlinePlanVersion' |
| | | Source: 'DataHolderTable' |
| | | Taborder: 0 |
| | | Transformation: 'AssemblyOnlinePlanVersion.Row.Cell' |
| | | Transformation: 'Row.Cell' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Attributes: 'Value' |
| | | Attributes: 'Quantity' |
| | | Column: 'Column' |
| | | Row: 'Row' |
| | | Taborder: 0 |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'InterfaceDataset' |
| | | Description: "( search.Generation() = '<All>' or object.Product_MP().Generation() = search.Generation() ) and ( search.MqbMlb() = '<All>' or object.Product_MP().MQBMLB() = search.MqbMlb() ) and ( search.Power() = '<All>' or object.Product_MP().Power() = search.Power() )" |
| | | FilterArguments: 'search:QMacroPlanner::FormAssemblyOnlinePlanVersion.dhSearch' |
| | | FixedFilter: "( search.Product() = '<All>' or object.ProductID() = search.Product() ) and ( search.ProductionLine() = '<All>' or object.ProductionLine() = search.ProductionLine() ) and ( search.Unit() = '<All>' or object.Unit() = search.Unit() )" |
| | | Source: 'InterfaceDataset' |
| | | DataType: 'AssemblyOnlinePlanVersion' |
| | | Source: 'DataHolderTable' |
| | | Taborder: 0 |
| | | Transformation: 'AssemblyOnlinePlanVersion.Row' |
| | | Transformation: 'Row' |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Legend: 'ProductID' |
| | | SortCriteria: 'ProductID' |
| | | Legend: 'Name' |
| | | SortCriteria: 'Name' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'InterfaceDataset' |
| | | FilterArguments: 'search:QMacroPlanner::FormAssemblyOnlinePlanVersion.dhSearch' |
| | | FixedFilter: 'object.TimeUnit() = search.TimeUnit() and ( search.StartDate().IsMinInfinity() or object.StartDate() >= search.StartDate() ) and ( search.EndDate().IsMaxInfinity() or object.StartDate() <= search.EndDate() )' |
| | | Source: 'InterfaceDataset' |
| | | DataType: 'AssemblyOnlinePlanVersion' |
| | | Source: 'DataHolderTable' |
| | | Taborder: 0 |
| | | Transformation: 'AssemblyOnlinePlanVersion.Column' |
| | | Transformation: 'Column' |
| | | ] |
| | | } |
| | | ] |
| | |
| | | [ |
| | | FixedSize: true |
| | | Orientation: 'horizontal' |
| | | Taborder: 1 |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | |
| | | Properties: |
| | | [ |
| | | Taborder: 5 |
| | | Visible: false |
| | | ] |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 2 |
| | | Taborder: 3 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Response OnCreated () id:Response_FormAssemblyOnlinePlanVersion_OnCreated |
| | | { |
| | | #keys: '[415136.0.1283300735]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebComponent_OnCreated' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | table := AssemblyOnlinePlanVersion::InitiateSearch( InterfaceDataset ); |
| | | DataHolderTable.Data( table ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: PanelOperation_283/ButtonSearch |
| | | Response OnClick () id:Response_PanelOperation_283_ButtonSearch_OnClick |
| | | { |
| | | #keys: '[415136.0.1283312413]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebButton_OnClick' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | if( not isnull( DataHolderTable.Data() ) ){ |
| | | DataHolderTable.Data().Generate( dhSearch.Data() ); |
| | | } |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | values := selectuniquevalues( InterfaceDataset, AssemblyOnlinePlanVersion.Row, row, true, row.ProductID() ); |
| | | values := selectuniquevalues( InterfaceDataset, AssemblyOnlinePlanVersion.Row, row, true, row.Name()); |
| | | |
| | | valueString := values.Concatenate( ";" ); |
| | | valueString := selectuniquevalues( valueString.Tokenize( ";" ), Elements, tempS, true, tempS ).Concatenate( ";" ); |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | valueString := "All"; |
| | | |
| | | this.Strings( valueString.Concat( ";" ).Concat( FinancialProductionReport::GetDefaultCCUnit().Concat( ";" ) ).Concat( FinancialProductionReport::GetDefaultDLUnit() ) ); |
| | | this.Strings( FinancialProductionReport::GetDefaultAllUnit().Concat( ";" ).Concat( FinancialProductionReport::GetDefaultCCUnit().Concat( ";" ) ).Concat( FinancialProductionReport::GetDefaultDLUnit() ) ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | #child: PanelHeader_952 |
| | | #child: PanelTable_273 |
| | | Component DataHolderTable id:DataHolderTable_568 |
| | | { |
| | | #keys: '[415136.0.1283300574]' |
| | | BaseType: 'WebDataHolder' |
| | | Databinding: 'AssemblyOnlinePlanVersion' |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | ] |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | |
| | | if( not isnull( DataHolderTable.Data() ) ){ |
| | | productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() ) |
| | | and exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() ) |
| | | and exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ), product.ID() ); |
| | | |
| | | productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, ( dhGenerations.Data().Size() = 0 or exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() ) ) |
| | | and ( dhGenerations.Data().Size() = 0 or exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() ) ) |
| | | and ( dhGenerations.Data().Size() = 0 or exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ) ), product.ID() ); |
| | | DataHolderTable.Data().Generate( dhSearch.Data(), dhFactorys.Data(), productids ); |
| | | } |
| | | *] |
| | |
| | | Body: |
| | | [* |
| | | if( not isnull( DataHolderTable.Data() ) ){ |
| | | productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() ) |
| | | and exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() ) |
| | | and exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ), product.ID() ); |
| | | |
| | | productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, ( dhGenerations.Data().Size() = 0 or exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() ) ) |
| | | and ( dhGenerations.Data().Size() = 0 or exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() ) ) |
| | | and ( dhGenerations.Data().Size() = 0 or exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ) ), product.ID() ); |
| | | DataHolderTable.Data().Generate( dhSearch.Data(), dhFactorys.Data(), productids ); |
| | | } |
| | | *] |
| | |
| | | Properties: |
| | | [ |
| | | DataType: 'InterfaceDataset' |
| | | Description: "( search.Generation() = '<All>' or object.Product_MP().Generation() = search.Generation() ) and ( search.MqbMlb() = '<All>' or object.Product_MP().MQBMLB() = search.MqbMlb() ) and ( search.Power() = '<All>' or object.Product_MP().Power() = search.Power() )" |
| | | FilterArguments: 'search:QMacroPlanner::FormAssemblyOnlinePlanVersion.dhSearch' |
| | | FixedFilter: "( search.Product() = '<All>' or object.Name() = search.Product() ) and ( search.Unit() = '<All>' or object.Unit() = search.Unit() )" |
| | | Source: 'InterfaceDataset' |
| | | Taborder: 0 |
| | | Transformation: 'InventoryPlanArchiveVersion.Row' |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | valueString := "All"; |
| | | |
| | | this.Strings( valueString.Concat( ";" ).Concat( FinancialProductionReport::GetDefaultCCUnit().Concat( ";" ) ).Concat( FinancialProductionReport::GetDefaultDLUnit() ) ); |
| | | this.Strings( FinancialProductionReport::GetDefaultAllUnit().Concat( ";" ).Concat( FinancialProductionReport::GetDefaultCCUnit().Concat( ";" ) ).Concat( FinancialProductionReport::GetDefaultDLUnit() ) ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | |
| | | Body: |
| | | [* |
| | | if( not isnull( DataHolderTable.Data() ) ){ |
| | | productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() ) |
| | | and exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() ) |
| | | and exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ), product.ID() ); |
| | | productids := selectuniquevalues( DataHolderProduct.Data(), Elements, product, ( dhGenerations.Data().Size() = 0 or exists( dhGenerations.Data(), Elements, e, e.Generation() = product.Generation() ) ) |
| | | and ( dhGenerations.Data().Size() = 0 or exists( dhMQBMLBs.Data(), Elements, e, e.MLBMQB() = product.MQBMLB() ) ) |
| | | and ( dhGenerations.Data().Size() = 0 or exists( dhPowers.Data(), Elements, e, e.Power() = product.Power() ) ), product.ID() ); |
| | | DataHolderTable.Data().Generate( dhSearch.Data(), dhFactorys.Data(), productids ); |
| | | } |
| | | *] |
| | |
| | | ] |
| | | Properties: |
| | | [ |
| | | Legend: 'ProductID' |
| | | SortCriteria: 'ProductID' |
| | | Legend: 'Name' |
| | | SortCriteria: 'Name' |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | |
| | | { |
| | | Body: |
| | | [* |
| | | valueString := "All"; |
| | | |
| | | this.Strings( valueString.Concat( ";" ).Concat( FinancialProductionReport::GetDefaultCCUnit().Concat( ";" ) ).Concat( FinancialProductionReport::GetDefaultDLUnit() ) ); |
| | | this.Strings( FinancialProductionReport::GetDefaultAllUnit().Concat( ";" ).Concat( FinancialProductionReport::GetDefaultCCUnit().Concat( ";" ) ).Concat( FinancialProductionReport::GetDefaultDLUnit() ) ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |