¶Ô±ÈÐÂÎļþ |
| | |
| | | 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 |
| | | ); |
| | | 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() ); |
| | | *] |
| | | } |
| | |
| | | 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() ); |
| | |
| | | } |
| | | } |
| | | } |
| | | info( '-----------Search end-------' ); |
| | | *] |
| | | } |
| | |
| | | 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 ); |
| | |
| | | , 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 ); |
| | | //} |
| | | *] |
| | | } |
| | |
| | | // CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |
| | | } |
| | | if( isassembleonlineplan ){//è£
é
ä¸çº¿è®¡å |
| | | // AssemblyOnlinePlanVersion::RefreshData( this, macroplan ); |
| | | AssemblyOnlinePlanPPPSPush::GenerateData( this, macroplan, executor ); |
| | | } |
| | | if( isinventoryplan ){//åºå计å |
| | | // CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |