| | |
| | | { |
| | | DefaultText: 'Assembly online plan + Machine offline plan - MS64' |
| | | } |
| | | InfoMessage InterfaceDataset_AOnlineAndMOfflinePlanMS64_URL |
| | | { |
| | | DefaultText: '/sap/bc/zedppps/zed_pps_ms64' |
| | | } |
| | | InfoMessage InterfaceDataset_AOnlineAndMOfflinePlanPIR_Name |
| | | { |
| | | DefaultText: 'Assembly online plan + Machine offline plan - PIR' |
| | | } |
| | | InfoMessage InterfaceDataset_AOnlineAndMOfflinePlanPIR_URL |
| | | { |
| | | DefaultText: '/sap/bc/zedppps/zed_pps_pir' |
| | | } |
| | | InfoMessage InterfaceDataset_ActualDailyProductionData_Name |
| | | { |
| | |
| | | { |
| | | DefaultText: '/data-service/api/service/post-data/V1.101/2f6c42fe895c45bdb2e8e1ca8489b5a2' |
| | | } |
| | | InfoMessage InterfaceDataset_SAP_Address |
| | | { |
| | | DefaultText: '10.120.76.86' |
| | | } |
| | | InfoMessage InterfaceDataset_ShippingActualData_Name |
| | | { |
| | | DefaultText: 'Shipping actual data' |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Relation InterfaceSAPResponseLoginfo_InterfaceLoginfo_InterfaceLoginfo_SAPResponseLoginfo |
| | | { |
| | | #keys: '1[415136.0.1262040147]' |
| | | DefaultRelationStrategy |
| | | { |
| | | } |
| | | RelationSide.LeftSide InterfaceLoginfo |
| | | { |
| | | #keys: '3[415136.0.1262040149][415136.0.1262040148][415136.0.1262040150]' |
| | | Cardinality: '0to1' |
| | | ObjectDefinition: InterfaceSAPResponseLoginfo |
| | | OwningSide: 'Reference' |
| | | } |
| | | RelationSide.RightSide SAPResponseLoginfo |
| | | { |
| | | #keys: '3[415136.0.1262040152][415136.0.1262040151][415136.0.1262040153]' |
| | | Cardinality: '1toN' |
| | | ObjectDefinition: InterfaceLoginfo |
| | | OwningSide: 'Owned' |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ZPPPSCode |
| | | { |
| | | #keys: '3[415136.0.1256454719][415136.0.1256454718][415136.0.1256454720]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | DefaultValue |
| | | { |
| | | TargetAttribute: ZPPPSCode |
| | | } |
| | |
| | | , ReturnMsg := 'Success' |
| | | , Success := true |
| | | ); |
| | | ms64 := owner.AOnlineAndMOfflinePlanMS64( relnew, Werk := werk, StartDate := startdate, EndDate := enddate |
| | | ms64 := owner.AOnlineAndMOfflinePlanMS64( relnew, ZPPPSCode := OS::GenerateGUIDAsString(), Werk := AOnlineAndMOfflinePlanPIR::GetWerk( werk ), StartDate := startdate, EndDate := enddate |
| | | , VersionFrom := versionfrom |
| | | , VersionTo := versionto, IsActive := versionflag ); |
| | | loginfo.AOnlineAndMOfflinePlanMS64( relinsert, ms64 ); |
| | |
| | | ms64.MS64Data( relnew, Product := product.ID() ); |
| | | } |
| | | loginfo.TotalRow( ms64.MS64Data( relsize ) ); |
| | | InterfaceLoginfo::CallInterfaceForSAPGet( owner, loginfo ); |
| | | *] |
| | | } |
| | |
| | | }else{ |
| | | loginfo.Last( false ); |
| | | } |
| | | owner.AOnlineAndMOfflinePlanPIR( relflush ); |
| | | // owner.AOnlineAndMOfflinePlanPIR( relflush ); |
| | | } |
| | | owner.AOnlineAndMOfflinePlanPIR( relflush ); |
| | | nowdate := DateTime::ActualTime(); |
| | | productids := construct( Strings ); |
| | | loginfo := owner.InterfaceLoginfo( relnew, ExecuteUser := executor |
| | |
| | | , ReturnMsg := 'Success' |
| | | , Success := true |
| | | ); |
| | | pir := owner.AOnlineAndMOfflinePlanPIR( relnew, ZPPPSCode := OS::GenerateGUIDAsString(), Werk := werk, Version := version, StartDate := startdate, EndDate := enddate ); |
| | | 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 ){ |
| | |
| | | } |
| | | } |
| | | loginfo.TotalRow( pir.PIRData( relsize ) ); |
| | | InterfaceLoginfo::CallInterfaceForSAPGet( owner, loginfo ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GetWerk ( |
| | | String werk |
| | | ) as String |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Oct-30-2024 (created) |
| | | value := '8201;8200'; |
| | | if( werk = FinancialProductionReport::GetDefaultCCUnit() ){ |
| | | value := '8200'; |
| | | }else if( werk = FinancialProductionReport::GetDefaultDLUnit() ){ |
| | | value := '8201'; |
| | | } |
| | | return value; |
| | | *] |
| | | } |
| | |
| | | TextBody: |
| | | [* |
| | | //// çå
°é¸½ Jul-17-2024 (created) |
| | | requestbody :='[ |
| | | { |
| | | "product": "DZ948293", |
| | | "demandDate": "2024-10-01", |
| | | "demandQty": 800, |
| | | "versionName": "V2410204", |
| | | "interfaceTime": "2024-10-01 12:00:00" |
| | | } |
| | | ]'; |
| | | jsonarray := JSON::Array().Add( JSON::Object().Add( "product", "DZ948293" ) |
| | | .Add( "demandDate", "2024-10-01" ) |
| | | .Add( "demandQty", 800 ) |
| | | .Add( "versionName", "V2410204" ) |
| | | .Add( "interfaceTime", "2024-10-01 12:00:00" ).Build() ).Build(); |
| | | requestbody := jsonarray.AsString(); |
| | | loginfo := owner.InterfaceLoginfo( relnew, ExecuteUser := executor |
| | | , Name := Translations::InterfaceDataset_CustomerDemandPPAIDS_Name() |
| | | , InterfaceDateTime := DateTime::ActualTime() |
| | | , Message := '客æ·éæ±ï¼PPA+IDSï¼' |
| | | , RequestBody := requestbody); |
| | | |
| | | InterfaceLoginfo::CallInterface( owner, loginfo ); |
| | | //error( '--------------------', requestbody ); |
| | | data := InterfaceLoginfo::CallInterfaceForDataCenter( owner, loginfo ); |
| | | info( '----------------', data.AsString() ); |
| | | //if( not isnull( data ) ){ |
| | | // |
| | | // cnv2 := StringToDate::StandardConverter(); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method Generate0 ( |
| | | EnginePipelineSearch search, |
| | | Product_MPs products |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jun-25-2024 (created) |
| | | table := selectobject( this, Source.Report, report, not report.IsShow() ); |
| | | //æ¸
空ä¹ååå¨çæ¾ç¤ºæ°æ® |
| | | this.Clear( search.TimeUnit(), search.StartDate(), search.EndDate() ); |
| | | Transaction::Transaction().Propagate( attribute( EnginePipelineColumn, Index ) ); |
| | | Transaction::Transaction().Propagate( attribute( EnginePipelineCell, ProductionQuantity ) ); |
| | | Transaction::Transaction().Propagate( attribute( EnginePipelineCell, DemandQuantity ) ); |
| | | //è¿æ»¤åç产åid |
| | | productids := selectuniquevalues( products, Elements, product, true, product.ID() ); |
| | | rows := selectsortedset( table, Row, row, row.RowNr() ); |
| | | models := selectuniquevalues( table, Column.Cell.Demand, demand, demand.Model() ); |
| | | cellnr := 5 + models.Size(); |
| | | //åè®¡è¡ |
| | | sumname := 'SUM'; |
| | | sumstr := sumname.Format( 'S(Len(10))' ); |
| | | sumrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( 'æ»äº§é' ), sumname, '', rows.Size() * cellnr ); |
| | | sumrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( '大è¿äº§é' ), sumname, '', sumrowproduction.RowNr() + 1 ); |
| | | sumrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( 'é¿æ¥äº§é' ), sumname, '', sumrowdlproduction.RowNr() + 1 ); |
| | | sumrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( 'æ»éæ±' ), sumname, '', sumrowccproduction.RowNr() + 1 ); |
| | | sumdemandrows := construct( EnginePipelineRows ); |
| | | rowno := sumrowdemand.RowNr() + 1; |
| | | traverse( models, Elements, model ){ |
| | | sumdemandrows.Add( EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( model.Concat( 'éæ±' ) ), sumname, model, rowno ) ); |
| | | rowno := rowno + 1; |
| | | } |
| | | sumrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, sumstr.Concat( 'åºå' ), sumname, '', rowno ); |
| | | |
| | | //è¡è®¡æ° |
| | | rownr := 0; |
| | | traverse( rows, Elements, row, productids.Find( row.Name() ) >= 0 ){ |
| | | rowname := row.Name().Format( 'S(Len(10))' ); |
| | | showrowproduction := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( 'æ»äº§é' ), row.Name(), '', rownr ); |
| | | showrowdlproduction := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '大è¿äº§é' ), row.Name(), '', showrowproduction.RowNr() + 1 ); |
| | | showrowccproduction := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( 'é¿æ¥äº§é' ), row.Name(), '', showrowdlproduction.RowNr() + 1 ); |
| | | showrowdemand := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( 'æ»éæ±' ), row.Name(), '', showrowccproduction.RowNr() + 1 ); |
| | | rownr := showrowdemand.RowNr() + 1; |
| | | modelsnr := showrowdemand.RowNr() + 3; |
| | | uniquemodels := selectuniquevalues( row, Cell.Demand, demand, true, demand.Model() ); |
| | | demandrows := construct( EnginePipelineRows ); |
| | | traverse( uniquemodels, Elements, e ){ |
| | | |
| | | if( rownr < modelsnr ){ |
| | | demandrows.Add( EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( e.Concat( 'éæ±' ) ), row.Name(), e, rownr ) ); |
| | | rownr := rownr + 1; |
| | | } |
| | | } |
| | | |
| | | for( rownr := rownr; rownr < modelsnr; rownr ++ ){ |
| | | |
| | | demandrows.Add( EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( '' ), row.Name(), '', rownr ) ); |
| | | } |
| | | showrowinventory := EnginePipelineRow::CraeteCellValueForRow( this, rowname.Concat( 'åºå' ), row.Name(), '', rownr ); |
| | | |
| | | traverse( this, Column, column ){ |
| | | daycells := selectset( row, Cell, cell, cell.Column().TimeUnit() = Translations::MP_GlobalParameters_Day() and |
| | | cell.Column().StartDate() >= column.StartDate() and |
| | | cell.Column().StartDate() <= column.EndDate() ); |
| | | |
| | | //ç产 |
| | | productionqty := sum( daycells, Elements, cell, cell.ProductionQuantity() ); |
| | | production := column.CellValue( relnew, Value := [String]productionqty ); |
| | | showrowproduction.CellValue( relinsert, production ); |
| | | sumproduction := selectobject( column, CellValue, c, c.Row() = sumrowproduction ); |
| | | if( isnull( sumproduction ) ){ |
| | | sumproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowproduction.CellValue( relinsert, sumproduction ); |
| | | } |
| | | sumproduction.Value( [String]( [Real]sumproduction.Value() + productionqty ) ); |
| | | //大è¿äº§é |
| | | dlproductionqty := sum( daycells, Elements, cell, cell.Production().DLProduction() ); |
| | | dlproduction := column.CellValue( relnew, Value := [String]dlproductionqty ); |
| | | showrowdlproduction.CellValue( relinsert, dlproduction ); |
| | | sumdlproduction := selectobject( column, CellValue, c, c.Row() = sumrowdlproduction ); |
| | | if( isnull( sumdlproduction ) ){ |
| | | sumdlproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowdlproduction.CellValue( relinsert, sumdlproduction ); |
| | | } |
| | | sumdlproduction.Value( [String]( [Real]sumdlproduction.Value() + dlproductionqty ) ); |
| | | //é¿æ¥äº§é |
| | | ccproductionqty := sum( daycells, Elements, cell, cell.Production().CCProduction() ); |
| | | ccproduction := column.CellValue( relnew, Value := [String]ccproductionqty ); |
| | | showrowccproduction.CellValue( relinsert, ccproduction ); |
| | | sumccproduction := selectobject( column, CellValue, c, c.Row() = sumrowccproduction ); |
| | | if( isnull( sumccproduction ) ){ |
| | | sumccproduction := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowccproduction.CellValue( relinsert, sumccproduction ); |
| | | } |
| | | sumccproduction.Value( [String]( [Real]sumccproduction.Value() + ccproductionqty ) ); |
| | | //éæ± |
| | | totaldemandqty := sum( daycells, Elements, cell, cell.DemandQuantity() ); |
| | | totaldemand := column.CellValue( relnew, Value := [String]totaldemandqty ); |
| | | showrowdemand.CellValue( relinsert, totaldemand ); |
| | | sumdemand := selectobject( column, CellValue, c, c.Row() = sumrowdemand ); |
| | | if( isnull( sumdemand ) ){ |
| | | sumdemand := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowdemand.CellValue( relinsert, sumdemand ); |
| | | } |
| | | sumdemand.Value( [String]( [Real]sumdemand.Value() + totaldemandqty ) ); |
| | | //å
·ä½éæ± |
| | | traverse( demandrows, Elements, demandrow ){ |
| | | demandqty := sum( daycells, Elements.Demand, celldemand, celldemand.Model() = demandrow.Demand(), celldemand.Quantity() ); |
| | | demandcell := column.CellValue( relnew, Value := [String]demandqty ); |
| | | demandrow.CellValue( relinsert, demandcell ); |
| | | sumdemandrow := selectobject( sumdemandrows, Elements, r, r.Demand() = demandrow.Demand() ); |
| | | if( not isnull( sumdemandrow ) ){ |
| | | sumdemandcell := selectobject( column, CellValue, c, c.Row() = sumdemandrow ); |
| | | if( isnull( sumdemandcell ) ){ |
| | | sumdemandcell := column.CellValue( relnew, Value := [String]0 ); |
| | | sumdemandrow.CellValue( relinsert, sumdemandcell ); |
| | | } |
| | | sumdemandcell.Value( [String]( [Real]sumdemandcell.Value() + demandqty ) ); |
| | | } |
| | | } |
| | | //åºå |
| | | inventroyqty := maxobject( daycells, Elements, e, e.Column().StartDate() ).InventoryQuantity(); |
| | | inventory := column.CellValue( relnew, Value := [String]inventroyqty ); |
| | | showrowinventory.CellValue( relinsert, inventory ); |
| | | suminventory := selectobject( column, CellValue, c, c.Row() = sumrowinventory ); |
| | | if( isnull( suminventory ) ){ |
| | | suminventory := column.CellValue( relnew, Value := [String]0 ); |
| | | sumrowinventory.CellValue( relinsert, suminventory ); |
| | | } |
| | | suminventory.Value( [String]( [Real]suminventory.Value() + inventroyqty ) ); |
| | | } |
| | | } |
| | | traverse( this, Column, column ){ |
| | | for( demandr := sumrowdemand.RowNr() + 1; demandr < sumrowinventory.RowNr(); demandr := demandr + 1 ){ |
| | | demandrow := selectobject( this, Row, r, r.RowNr() = demandr and r.Name() = sumname ); |
| | | // info( '------------------14----------------' ); |
| | | if( not isnull( demandrow ) and not exists( demandrow, CellValue, cv, cv.Column() = column ) ){ |
| | | demandcell := column.CellValue( relnew, Value := '' ); |
| | | demandrow.CellValue( relinsert, demandcell ); |
| | | } |
| | | } |
| | | } |
| | | |
| | | rows := selectsortedset( this, Row, row, row.Name(), row.RowNr() ); |
| | | i := 0; |
| | | traverse( rows, Elements, e ){ |
| | | e.RowNr( i ); |
| | | i := i + 1; |
| | | } |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Method GenerateArchiveData ( |
| | | const MacroPlan macroplan, |
| | | RecycleBin recyclebin, |
| | | Archive archive, |
| | | Boolean iscustomdemand, |
| | | Boolean isofflineplan, |
| | | Boolean isshiftplan, |
| | | Boolean isassembleonlineplan, |
| | | Boolean isinventoryplan, |
| | | Boolean istrcdemand, |
| | | Boolean istransferplan, |
| | | Boolean ispackageplan |
| | | ) |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Oct-30-2024 (created) |
| | | if( iscustomdemand ){//å
¨å¹´æ¥åº¦éæ±/客æ·éæ± |
| | | CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |
| | | } |
| | | if( isofflineplan ){//å产线ä¸çº¿è®¡å |
| | | OfflinePlanArchiveVersion::RefreshData( this, macroplan, archive ); |
| | | } |
| | | if( isshiftplan ){//çæ¬¡è®¡å |
| | | // CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |
| | | } |
| | | if( isassembleonlineplan ){//è£
é
ä¸çº¿è®¡å |
| | | AssemblyOnlinePlanVersion::RefreshData( this, macroplan ); |
| | | } |
| | | if( isinventoryplan ){//åºå计å |
| | | // CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |
| | | } |
| | | if( istrcdemand ){//TRCéæ± |
| | | // CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |
| | | } |
| | | if( istransferplan ){//è°æ¨è®¡å |
| | | // CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |
| | | } |
| | | if( ispackageplan ){//å
è£
计å |
| | | // CustomerDemandIDS::GenerateData( this, recyclebin, archive ); |
| | | } |
| | | *] |
| | | } |
| | |
| | | address := Translations::InterfaceDataset_DataCenter_Address(); |
| | | httpinterface := HTTPInterface::Create( address,80); |
| | | httpinterface.PostMethod( true ); |
| | | httpinterface.MediaType( Translations::InterfaceDataset_DataCenter_ContentType() ); |
| | | httpinterface.MediaType( Translations::InterfaceDataset_ContentType() ); |
| | | httpinterface.AddHeader( "clientId", Translations::InterfaceDataset_DataCenter_ClientId() ); |
| | | httpinterface.AddHeader( "clientSecret", Translations::InterfaceDataset_DataCenter_ClientSecret() ); |
| | | try{ |
| | |
| | | |
| | | if( loginfo.Success() ){ |
| | | resultJson := JSON::Parse( loginfo.Response() ); |
| | | code := resultJson.Get( "code" ).GetString(); |
| | | code := resultJson.Get( "code" ).GetNumber(); |
| | | msg := resultJson.Get( "message" ).GetString(); |
| | | data := resultJson.Get( "data" ); |
| | | |
| | | loginfo.ReturnMsg( msg ); |
| | | if( code = "200" ){ |
| | | total := resultJson.Get( "dataSize" ).GetNumber(); |
| | | if( code = 200 ){ |
| | | // total := resultJson.Get( "dataSize" ).GetNumber(); |
| | | loginfo.ReturnSuccess( true ); |
| | | loginfo.TotalRow( total ); |
| | | // loginfo.TotalRow( total ); |
| | | loginfo.UpdateLast(); |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod CallInterfaceForSAPGet ( |
| | | InterfaceDataset owner, |
| | | InterfaceLoginfo loginfo |
| | | ) as owning InterfaceSAPResponseLoginfos |
| | | { |
| | | Description: 'è°ç¨æ°æ®ä¸å°æ¥å£' |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jul-22-2024 (created) |
| | | address := Translations::InterfaceDataset_SAP_Address(); |
| | | httpinterface := HTTPInterface::Create( address,80); |
| | | httpinterface.PostMethod( false ); |
| | | httpinterface.MediaType( Translations::InterfaceDataset_ContentType() ); |
| | | try{ |
| | | if( loginfo.Name() = Translations::InterfaceDataset_AOnlineAndMOfflinePlanPIR_Name() ){//è£
é
ä¸çº¿è®¡åPIR |
| | | httpinterface.URL( Translations::InterfaceDataset_AOnlineAndMOfflinePlanPIR_URL() ); |
| | | } |
| | | if( loginfo.Name() = Translations::InterfaceDataset_AOnlineAndMOfflinePlanMS64_Name() ){//è£
é
ä¸çº¿è®¡åMS64 |
| | | httpinterface.URL( Translations::InterfaceDataset_AOnlineAndMOfflinePlanMS64_URL() ); |
| | | } |
| | | httpinterface.Call(); |
| | | result := httpinterface.Result(); |
| | | loginfo.Response( result ); |
| | | loginfo.Success( true ); |
| | | }onerror{ |
| | | loginfo.ReturnMsg( e.GeneralInformation() ); |
| | | } |
| | | |
| | | //åç»å
Œ
±å¤ç |
| | | loginfo.FinishTime( DateTime::ActualTime() ); |
| | | data := JSON::Null().Build(); |
| | | saploginfos := construct( InterfaceSAPResponseLoginfos ); |
| | | if( loginfo.Success() ){ |
| | | resultJson := JSON::Parse( loginfo.Response() ); |
| | | code := resultJson.Get( "code" ).GetNumber(); |
| | | msg := resultJson.Get( "message" ).GetString(); |
| | | data := resultJson.Get( "data" ); |
| | | |
| | | loginfo.ReturnMsg( msg ); |
| | | if( code = 200 ){ |
| | | // total := resultJson.Get( "dataSize" ).GetNumber(); |
| | | loginfo.ReturnSuccess( true ); |
| | | // loginfo.TotalRow( total ); |
| | | loginfo.UpdateLast(); |
| | | } |
| | | for( i := 0; i < data.Size(); i++ ){ |
| | | item := data.Get( i ); |
| | | saploginfos.Add( InterfaceSAPResponseLoginfo::GenerateData( loginfo, item ) ); |
| | | } |
| | | } |
| | | |
| | | return &saploginfos; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ID |
| | | { |
| | | #keys: '3[415136.0.1262040083][415136.0.1262040082][415136.0.1262040084]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute IsSuccess |
| | | { |
| | | #keys: '3[415136.0.1262040069][415136.0.1262040068][415136.0.1262040070]' |
| | | ValueType: Boolean |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute LogMessageNo |
| | | { |
| | | #keys: '3[415136.0.1262040113][415136.0.1262040112][415136.0.1262040114]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute LogNo |
| | | { |
| | | #keys: '3[415136.0.1262040103][415136.0.1262040102][415136.0.1262040104]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Msg |
| | | { |
| | | #keys: '3[415136.0.1261990019][415136.0.1261990018][415136.0.1261990020]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Msg_v1 |
| | | { |
| | | #keys: '3[415136.0.1261990029][415136.0.1261990028][415136.0.1261990030]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Msg_v2 |
| | | { |
| | | #keys: '3[415136.0.1262040123][415136.0.1262040122][415136.0.1262040124]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Msg_v3 |
| | | { |
| | | #keys: '3[415136.0.1262040133][415136.0.1262040132][415136.0.1262040134]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Msg_v4 |
| | | { |
| | | #keys: '3[415136.0.1261990039][415136.0.1261990038][415136.0.1261990040]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Number |
| | | { |
| | | #keys: '3[415136.0.1262040093][415136.0.1262040092][415136.0.1262040094]' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute Type |
| | | { |
| | | #keys: '3[415136.0.1262040059][415136.0.1262040058][415136.0.1262040060]' |
| | | Description: 'S/E' |
| | | ValueType: String |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Function CalcIsSuccess |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Oct-31-2024 (created) |
| | | |
| | | value := false; |
| | | |
| | | if( this.Type() = 'S' ){ |
| | | |
| | | value := true; |
| | | } |
| | | |
| | | this.IsSuccess( value ); |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | StaticMethod GenerateData ( |
| | | InterfaceLoginfo owner, |
| | | JSON item |
| | | ) as InterfaceSAPResponseLoginfo |
| | | { |
| | | TextBody: |
| | | [* |
| | | // çå
°é¸½ Jul-17-2024 (created) |
| | | type := guard( item.Get( "type").GetString(),""); |
| | | id := guard( item.Get( "id").GetString(),""); |
| | | number := guard( item.Get( "number").GetString(),""); |
| | | logNo := guard( item.Get( "logNo").GetString(),""); |
| | | logMessageNo := guard( item.Get( "logMessageNo").GetString(),""); |
| | | msg := guard( item.Get( "msg").GetString(),""); |
| | | msg_v1 := guard( item.Get( "msg_v1").GetString(),""); |
| | | msg_v2 := guard( item.Get( "msg_v2").GetString(),""); |
| | | msg_v3 := guard( item.Get( "msg_v3").GetString(),""); |
| | | msg_v4 := guard( item.Get( "msg_v4").GetString(),""); |
| | | |
| | | saploginfo := owner.SAPResponseLoginfo( relnew, Type := type |
| | | , ID := id |
| | | , Number := number |
| | | , LogNo := logNo |
| | | , LogMessageNo := logMessageNo |
| | | , Msg := msg |
| | | , Msg_v1 := msg_v1 |
| | | , Msg_v2 := msg_v2 |
| | | , Msg_v3 := msg_v3 |
| | | , Msg_v4 := msg_v4 ); |
| | | |
| | | return saploginfo; |
| | | *] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: #DomainModel |
| | | Type InterfaceSAPResponseLoginfo |
| | | { |
| | | #keys: '5[415136.0.1262040055][415136.0.1262040053][0.0.0][415136.0.1262040054][415136.0.1262040056]' |
| | | BaseType: Object |
| | | Description: 'sapæ¥å£è¿åä¿¡æ¯' |
| | | StructuredName: 'InterfaceSAPResponseLoginfos' |
| | | } |
| | |
| | | #parent: #root |
| | | StaticMethod RefreshData ( |
| | | InterfaceDataset interface, |
| | | const MacroPlan macroPlan |
| | | const MacroPlan macroPlan, |
| | | const Archive archive |
| | | ) |
| | | { |
| | | TextBody: |
| | |
| | | } |
| | | nopcolumns := selectuniquevalues( macroPlan, NewOfflinePlanTable.NewOfflinePlanColumn, nopcolumn, not exists( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcolumn.StartDate() ), nopcolumn.StartDate() ); |
| | | table.GenerateColumn( nopcolumns, search.TimeUnit(), search.StartDate(), search.EndDate() ); |
| | | traverse( macroPlan, NewOfflinePlanTable, noptable ){ |
| | | |
| | | noptable := maxobject( macroPlan, NewOfflinePlanTable, noptable, noptable.SaveDateTime() ); |
| | | actproductiondatas := selectset( archive,ActualDailyProductionData,data,true ); |
| | | actproductiontree := NamedValueTree::Create(); |
| | | for( i := 0; i< actproductiondatas.Size(); i++ ){ |
| | | actproduction := actproductiondatas.Element( i ); |
| | | actproductionKey := actproduction.ProductNo() + actproduction.ProductionDate().AsQUILL(); |
| | | actproductionhandle := actproductiontree.GetHandle( actproductionKey ); |
| | | actproductiontree.Root().AddChild( actproductionhandle,i ); |
| | | } |
| | | traverse( noptable, NewOfflinePlanRow, noprow ){ |
| | | row := table.GetRow( noprow ); |
| | | traverse( noprow, NewOfflinePlanCell, nopcell ){ |
| | | column := selectobject( table, Column, column, column.TimeUnit() = Translations::MP_GlobalParameters_Day() and column.StartDate() = nopcell.NewOfflinePlanColumn().StartDate() ); |
| | | cell := selectobject( row, Cell, cell, cell.Column() = column ); |
| | | actproductionKey := noprow.ProductID() + column.StartDate().AsQUILL(); |
| | | actproductionhandle:= actproductiontree.GetHandle( actproductionKey ); |
| | | actproductionindex := guard( actproductiontree.Root().Child( actproductionhandle ),null( NamedValue )); |
| | | |
| | | actproductionqty := 0.0; |
| | | if( not isnull( actproductionindex )){ |
| | | actproduction := actproductiondatas.Element( actproductionindex.GetValueAsNumber() ); |
| | | actproductionqty := actproduction.ActualOut(); |
| | | } |
| | | cell.ActualProductionQty( actproductionqty ); |
| | | cell.InventoryWeight( nopcell.InventoryWeight() ); |
| | | // cell.ProductionSerialNumber( nopcell.ProductionSerialNumber() ); |
| | | cell.Quantity( nopcell.Quantity() ); |
| | | // cell.Shift( nopcell.Shift() ); |
| | | // cell.Value( nopcell.Value() ); |
| | | } |
| | | } |
| | | } |
| | | //showtable.Generate( search, products ); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: #root |
| | | Attribute ActualProductionQty |
| | | { |
| | | #keys: '3[415136.0.1256481350][415136.0.1256481349][415136.0.1256481351]' |
| | | Description: 'å®é
产é' |
| | | ValueType: Real |
| | | } |
| | |
| | | showlabel := showlabel.Concat( plannames.Concatenate( "ã" ) ).Concat( 'ï¼' ); |
| | | // info( '*****************************' ); |
| | | if( WebMessageBox::Question( this, showlabel, 'OK|Cancel' ) = 0 ){ |
| | | InterfaceDataset.GenerateArchiveData( MacroPlan, RecycleBin, Archive, cbCustomDemand.Checked() |
| | | , cbOfflinePlan.Checked() |
| | | , cbShiftPlan.Checked() |
| | | , cbAssembleOnlinePlan.Checked() |
| | | , cbInventoryPlan.Checked() |
| | | , cbTRCDemand.Checked() |
| | | , cbTransferPlan.Checked() |
| | | , cbPackagePlan.Checked() ); |
| | | } |
| | | //}else{ |
| | | // info( '************###########*****************' ); |
| | |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component efFactory |
| | | { |
| | | #keys: '[415136.0.1044211287]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | Label: 'å·¥å代ç ' |
| | | Taborder: 0 |
| | | Visible: false |
| | | ] |
| | | } |
| | | Component dsStartDate |
| | | { |
| | | #keys: '[415136.0.1044211288]' |
| | |
| | | Properties: |
| | | [ |
| | | Label: 'å¼å§æ¥æ' |
| | | Taborder: 2 |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | Component dsEndDate |
| | |
| | | Properties: |
| | | [ |
| | | Label: 'ç»ææ¥æ' |
| | | Taborder: 3 |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component cbActiveVersion |
| | |
| | | [ |
| | | Checked: true |
| | | Label: 'æ¯å¦æ¿æ´»çæ¬' |
| | | Taborder: 6 |
| | | Taborder: 5 |
| | | ] |
| | | } |
| | | Component efVersionFrom |
| | |
| | | Properties: |
| | | [ |
| | | Label: 'ä»çæ¬' |
| | | Taborder: 4 |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | Component efVersionTo |
| | |
| | | Properties: |
| | | [ |
| | | Label: 'å°çæ¬' |
| | | Taborder: 5 |
| | | Taborder: 4 |
| | | ] |
| | | } |
| | | Component ddslFactory |
| | |
| | | BaseType: 'WebDropDownStringList' |
| | | Properties: |
| | | [ |
| | | InitialValue: 'all;8200;8201' |
| | | Label: 'å·¥å代ç ' |
| | | Strings: 'All;DL;CC' |
| | | Taborder: 1 |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | ] |
| | |
| | | BaseType: 'WebPanel' |
| | | Children: |
| | | [ |
| | | Component efFactory id:efFactory_672 |
| | | { |
| | | #keys: '[415136.0.1043000546]' |
| | | BaseType: 'WebEditField' |
| | | Properties: |
| | | [ |
| | | Label: 'å·¥å代ç ' |
| | | Taborder: 0 |
| | | Visible: false |
| | | ] |
| | | } |
| | | Component dsStartDate id:dsStartDate_60 |
| | | { |
| | | #keys: '[415136.0.1043000586]' |
| | |
| | | Properties: |
| | | [ |
| | | Label: '计åå¼å§æ¶é´' |
| | | Taborder: 3 |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | Component dsEndDate id:dsEndDate_236 |
| | |
| | | Properties: |
| | | [ |
| | | Label: '计åç»ææ¶é´' |
| | | Taborder: 4 |
| | | Taborder: 3 |
| | | ] |
| | | } |
| | | Component ddslFactory id:ddslFactory_424 |
| | |
| | | BaseType: 'WebDropDownStringList' |
| | | Properties: |
| | | [ |
| | | InitialValue: 'all;8200;8201' |
| | | InitialValue: 'All' |
| | | Label: 'å·¥å代ç ' |
| | | Strings: 'All;DL;CC' |
| | | Taborder: 1 |
| | | Taborder: 0 |
| | | ] |
| | | } |
| | | Component efVersion |
| | |
| | | Properties: |
| | | [ |
| | | Label: 'çæ¬' |
| | | Taborder: 2 |
| | | Taborder: 1 |
| | | ] |
| | | } |
| | | ] |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #parent: pnlLeft/ddslFactory_424 |
| | | Response OnCreated () id:Response_pnlLeft_ddslFactory_OnCreated |
| | | { |
| | | #keys: '[415136.0.1257761350]' |
| | | CanBindMultiple: false |
| | | DefinitionID: 'Responsedef_WebComponent_OnCreated' |
| | | QuillAction |
| | | { |
| | | Body: |
| | | [* |
| | | valueString := "All"; |
| | | |
| | | this.Strings( valueString.Concat( ";" ).Concat( FinancialProductionReport::GetDefaultCCUnit().Concat( ";" ) ).Concat( FinancialProductionReport::GetDefaultDLUnit() ) ); |
| | | *] |
| | | GroupServerCalls: false |
| | | } |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component ListInterfaceSapResponseLoginfo |
| | | { |
| | | #keys: '[415136.0.1260821889]' |
| | | BaseType: 'WebList' |
| | | Children: |
| | | [ |
| | | Component DataExtractorInterfaceSapResponseLoginfo |
| | | { |
| | | #keys: '[415136.0.1260821890]' |
| | | BaseType: 'WebDataExtractor' |
| | | Properties: |
| | | [ |
| | | DataType: 'InterfaceLoginfo' |
| | | ExtractionMode: 'Selected' |
| | | Source: 'FormInterfaceLoginfo.ListInterfaceLoginfo' |
| | | Taborder: 0 |
| | | Transformation: 'SAPResponseLoginfo' |
| | | ] |
| | | } |
| | | #child: listActionBarPageInterfaceSapResponseLoginfo |
| | | Component DataSetLevelInterfaceSapResponseLoginfo |
| | | { |
| | | #keys: '[415136.0.1260821895]' |
| | | BaseType: 'WebDataSetLevel' |
| | | Children: |
| | | [ |
| | | #child: listContextMenuInterfaceSapResponseLoginfo |
| | | ] |
| | | Properties: |
| | | [ |
| | | Columns: '[{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"ID","title":"ID","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"ID"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"IsSuccess","title":"IsSuccess","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"IsSuccess"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LogMessageNo","title":"LogMessageNo","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"LogMessageNo"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"LogNo","title":"LogNo","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"LogNo"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Msg","title":"Msg","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Msg"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Msg_v1","title":"Msg_v1","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Msg_v1"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Msg_v2","title":"Msg_v2","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Msg_v2"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Msg_v3","title":"Msg_v3","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Msg_v3"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Msg_v4","title":"Msg_v4","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Msg_v4"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Number","title":"Number","subtotals":"","tooltip":"","width":-1,"display":"hidden","editable":false,"attribute":"Number"}},{"attribute":{"classtype":"WebApiDefinitionAttributeDataMember","columnid":"Type","title":"Type","subtotals":"","tooltip":"","width":-1,"display":"shown","editable":false,"attribute":"Type"}}]' |
| | | ContextMenu: 'listContextMenuInterfaceSapResponseLoginfo' |
| | | Taborder: 2 |
| | | ] |
| | | } |
| | | ] |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component listActionBarPageInterfaceSapResponseLoginfo |
| | | { |
| | | #keys: '[415136.0.1260821892]' |
| | | BaseType: 'listActionBarPage' |
| | | Properties: |
| | | [ |
| | | Taborder: 1 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | Component listContextMenuInterfaceSapResponseLoginfo |
| | | { |
| | | #keys: '[415136.0.1260821897]' |
| | | BaseType: 'listContextMenu' |
| | | Properties: |
| | | [ |
| | | Taborder: 0 |
| | | ] |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | Quintiq file version 2.0 |
| | | #root |
| | | #parent: MacroPlannerWebApp |
| | | OrphanComponent FormInterfaceSapResponseLoginfo |
| | | { |
| | | #keys: '[415136.0.1260821836]' |
| | | BaseType: 'WebForm' |
| | | Children: |
| | | [ |
| | | #child: ListInterfaceSapResponseLoginfo |
| | | ] |
| | | Properties: |
| | | [ |
| | | Image: 'DATA_SCROLL' |
| | | Title: 'SAP response loginfo' |
| | | ] |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | form_FormInterfaceSapResponseLoginfo |
| | | { |
| | | title: 'QMacroPlanner::FormInterfaceSapResponseLoginfo' |
| | | shown: true |
| | | componentID: 'QMacroPlanner::FormInterfaceSapResponseLoginfo' |
| | | layout |
| | | { |
| | | mode: 'open' |
| | | rowPosition: 17 |
| | | rowSpan: 12 |
| | | columnPosition: 1 |
| | | columnSpan: 12 |
| | | } |
| | | components |
| | | { |
| | | FormInterfaceSapResponseLoginfo_ListInterfaceSapResponseLoginfo |
| | | { |
| | | } |
| | | FormInterfaceSapResponseLoginfo_DataSetLevelInterfaceSapResponseLoginfo |
| | | { |
| | | groupDepth: -1 |
| | | column_IsSuccess |
| | | { |
| | | columnId: 'IsSuccess' |
| | | dataPath: 'IsSuccess' |
| | | dataType: 'boolean' |
| | | index: 0 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Msg |
| | | { |
| | | columnId: 'Msg' |
| | | dataPath: 'Msg' |
| | | dataType: 'string' |
| | | index: 1 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Msg_v1 |
| | | { |
| | | columnId: 'Msg_v1' |
| | | dataPath: 'Msg_v1' |
| | | dataType: 'string' |
| | | index: 2 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Msg_v2 |
| | | { |
| | | columnId: 'Msg_v2' |
| | | dataPath: 'Msg_v2' |
| | | dataType: 'string' |
| | | index: 3 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Msg_v3 |
| | | { |
| | | columnId: 'Msg_v3' |
| | | dataPath: 'Msg_v3' |
| | | dataType: 'string' |
| | | index: 4 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Msg_v4 |
| | | { |
| | | columnId: 'Msg_v4' |
| | | dataPath: 'Msg_v4' |
| | | dataType: 'string' |
| | | index: 5 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | column_Type |
| | | { |
| | | columnId: 'Type' |
| | | dataPath: 'Type' |
| | | dataType: 'string' |
| | | index: 6 |
| | | subtotals: '' |
| | | width: 150 |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | userconfigurableinformation |
| | | { |