From 6307a9f1fb049bccf2d1fb677653c2dac68e1e40 Mon Sep 17 00:00:00 2001 From: hongjli <3117313295@qq.com> Date: 星期四, 14 九月 2023 09:10:51 +0800 Subject: [PATCH] 拉料修复 --- _Main/BL/Type_PanelMaterialVehicle/StaticMethod_ReceiveDataGeneration.qbl | 48 ++++++++++++++++++++++++ _Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse#1.qbl | 4 -- _Main/Sys/Integration/Structure/PanelMaterialResponseResult_from.xml | 0 _Main/Sys/Integration/Mapping/PanelMaterialResponseResult.xml | 0 _Main/Sys/Integration/Structure/PanelMaterialResponseResult_to.xml | 0 _Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl | 38 +++++------------- 6 files changed, 59 insertions(+), 31 deletions(-) diff --git "a/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse\0431.qbl" "b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse\0431.qbl" index 0943ed6..3692157 100644 --- "a/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse\0431.qbl" +++ "b/_Main/BL/IntegratorConfigs/IntegratorConfig_PanelMaterialRestServer/ContentMapperProcessor_ContentMapperReponse\0431.qbl" @@ -6,8 +6,4 @@ PosX: 330 PosY: 450 ReplyChannelOutputs: QuintiqEndpoint - ConditionalMapping - { - MappingName: 'PanelMaterialResponseResult' - } } diff --git a/_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl b/_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl index db2a7b9..6c43776 100644 --- a/_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl +++ b/_Main/BL/Type_GlobalDTOTable/Method_ReceivingPanelMaterials.qbl @@ -17,29 +17,13 @@ restNameValue := bodyNameValue.Child( restHandle ); restPayloadNameValue := restNameValue.Child( restPayloadHandle ); - releaseDateHandle := requestnvt.GetHandle( "releaseDate" ); businessTypeHandle := requestnvt.GetHandle( "businessType" ); - scenarioNameHandle := requestnvt.GetHandle( "scenarioName" ); - - releaseDateNameValue := restPayloadNameValue.Child( releaseDateHandle ); businessTypeNameValue := restPayloadNameValue.Child( businessTypeHandle ); - scenarioNameNameValue := restPayloadNameValue.Child( scenarioNameHandle ); - info( "鍙戝竷鏃堕棿锛�", releaseDateNameValue.GetValueAsString(), " 浜嬩笟閮細", businessTypeNameValue.GetValueAsString(), " 鐗堟湰鍙凤細", scenarioNameNameValue.GetValueAsString() ); - - panelMaterialsHandle := requestnvt.GetHandle( "panelMaterials" ); - panelMaterialsNameValue := restPayloadNameValue.Child( panelMaterialsHandle ); - childPanelMaterialsNameValue := panelMaterialsNameValue.Children(); - productIDHandle := requestnvt.GetHandle( "productID" ); - productDescriptionHandle := requestnvt.GetHandle( "productDescription" ); - startDateHandle := requestnvt.GetHandle( "startDate" ); - quantityHandle := requestnvt.GetHandle( "quantity" ); - traverse ( childPanelMaterialsNameValue, Elements, cpmnv ) { - info( "浜у搧锛�", cpmnv.Child( productIDHandle ).GetValueAsString() ); - info( "浜у搧鎻忚堪锛�", cpmnv.Child( productDescriptionHandle ).GetValueAsString() ); - info( "寮�濮嬫椂闂达細", cpmnv.Child( startDateHandle ).GetValueAsString() ); - info( "鏁伴噺锛�", cpmnv.Child( quantityHandle ).GetValueAsString() ); + if ( businessTypeNameValue.GetValueAsString() = "杞﹁浇" ) { + PanelMaterialVehicle::ReceiveDataGeneration( this, requestnvt ); } + info( "---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------" ); @@ -56,35 +40,35 @@ categoryNamedValue := petNamedValue.AddChild( categoryHandle ); categoryIDHandle := replynvt.GetHandle( "Id" ); categoryIDNamedValue := categoryNamedValue.AddChild( categoryIDHandle ); - categoryIDNamedValue.SetValue( "TestID" ); + categoryIDNamedValue.SetValue( 3 ); categoryNameHandle := replynvt.GetHandle( "Name" ); categoryNameNamedValue := categoryNamedValue.AddChild( categoryNameHandle ); - categoryNameNamedValue.SetValue( "TestName" ); + categoryNameNamedValue.SetValue( "Cat" ); petNameHandle := replynvt.GetHandle( "Name" ); petNameValue := petNamedValue.AddChild( petNameHandle ); petNameValue.SetValue( "Pet1" ); petIdHandle := replynvt.GetHandle( "PetId" ); petIdNameValue := petNamedValue.AddChild( petIdHandle ); - petIdNameValue.SetValue( "Pet1" ); + petIdNameValue.SetValue( 1 ); photoUrlHandle := replynvt.GetHandle( "PhotoUrl" ); photoUrlNameValue := petNamedValue.AddChild( photoUrlHandle ); urlHandle := replynvt.GetHandle( "Url" ); - photoUrlNameValue.AddChild( urlHandle, "鍦板潃1" ); + photoUrlNameValue.AddChild( urlHandle, "url1" ); statusHandle := replynvt.GetHandle( "Status" ); statusNameValue := petNamedValue.AddChild( statusHandle ); - statusNameValue.SetValue( "鍙敤" ); + statusNameValue.SetValue( "available" ); tagHandle := replynvt.GetHandle( "Tag" ); tagNameValue := petNamedValue.AddChild( tagHandle ); tagIdHandle := replynvt.GetHandle( "Id" ); - tagNameValue.AddChild( tagIdHandle, "aaa" ); + tagNameValue.AddChild( tagIdHandle, 123 ); tagNameHandle := replynvt.GetHandle( "Name" ); - tagNameValue.AddChild( tagNameHandle, "vvvvvv" ); + tagNameValue.AddChild( tagNameHandle, "tag1" ); - info( rootNamedValue.ToString() ); + info( replynvt.ToString() ); return emit( replynvt ); diff --git a/_Main/BL/Type_PanelMaterialVehicle/StaticMethod_ReceiveDataGeneration.qbl b/_Main/BL/Type_PanelMaterialVehicle/StaticMethod_ReceiveDataGeneration.qbl new file mode 100644 index 0000000..438d7cd --- /dev/null +++ b/_Main/BL/Type_PanelMaterialVehicle/StaticMethod_ReceiveDataGeneration.qbl @@ -0,0 +1,48 @@ +Quintiq file version 2.0 +#parent: #root +StaticMethod ReceiveDataGeneration ( + GlobalOTDTable globalOTDTable, + NamedValueTree requestnvt +) +{ + TextBody: + [* + nameValue := requestnvt.Root(); + + bodyHandle := requestnvt.GetHandle( "Body" ); + restHandle := requestnvt.GetHandle( "Rest" ); + restPayloadHandle := requestnvt.GetHandle( "RestPayload" ); + + bodyNameValue := nameValue.Child( bodyHandle ); + restNameValue := bodyNameValue.Child( restHandle ); + restPayloadNameValue := restNameValue.Child( restPayloadHandle ); + + releaseDateHandle := requestnvt.GetHandle( "releaseDate" ); + businessTypeHandle := requestnvt.GetHandle( "businessType" ); + scenarioNameHandle := requestnvt.GetHandle( "scenarioName" ); + + releaseDateNameValue := restPayloadNameValue.Child( releaseDateHandle ); + businessTypeNameValue := restPayloadNameValue.Child( businessTypeHandle ); + scenarioNameNameValue := restPayloadNameValue.Child( scenarioNameHandle ); + + panelMaterialsHandle := requestnvt.GetHandle( "panelMaterials" ); + panelMaterialsNameValue := restPayloadNameValue.Child( panelMaterialsHandle ); + childPanelMaterialsNameValue := panelMaterialsNameValue.Children(); + productIDHandle := requestnvt.GetHandle( "productID" ); + productDescriptionHandle := requestnvt.GetHandle( "productDescription" ); + startDateHandle := requestnvt.GetHandle( "startDate" ); + quantityHandle := requestnvt.GetHandle( "quantity" ); + traverse ( childPanelMaterialsNameValue, Elements, cpmnv ) { + info( "浜у搧锛�", cpmnv.Child( productIDHandle ).GetValueAsString() ); + info( "浜у搧鎻忚堪锛�", cpmnv.Child( productDescriptionHandle ).GetValueAsString() ); + info( "寮�濮嬫椂闂达細", cpmnv.Child( startDateHandle ).GetValueAsString() ); + info( "鏁伴噺锛�", cpmnv.Child( quantityHandle ).GetValueAsString() ); + // globalOTDTable.PanelMaterialVehicle( relnew, + // Customer := businessTypeNameValue.GetValueAsString(), + // ID := OS::GenerateGUIDAsString(), + // OrderDate := cpmnv.Child( startDateHandle ).GetValueAsString(), + + + } + *] +} diff --git a/_Main/Sys/Integration/Mapping/PanelMaterialResponseResult.xml b/_Main/Sys/Integration/Mapping/PanelMaterialResponseResult.xml index 853ffcf..a2b6fc7 100644 --- a/_Main/Sys/Integration/Mapping/PanelMaterialResponseResult.xml +++ b/_Main/Sys/Integration/Mapping/PanelMaterialResponseResult.xml Binary files differ diff --git a/_Main/Sys/Integration/Structure/PanelMaterialResponseResult_from.xml b/_Main/Sys/Integration/Structure/PanelMaterialResponseResult_from.xml index e776879..54bd566 100644 --- a/_Main/Sys/Integration/Structure/PanelMaterialResponseResult_from.xml +++ b/_Main/Sys/Integration/Structure/PanelMaterialResponseResult_from.xml Binary files differ diff --git a/_Main/Sys/Integration/Structure/PanelMaterialResponseResult_to.xml b/_Main/Sys/Integration/Structure/PanelMaterialResponseResult_to.xml index d360783..b381552 100644 --- a/_Main/Sys/Integration/Structure/PanelMaterialResponseResult_to.xml +++ b/_Main/Sys/Integration/Structure/PanelMaterialResponseResult_to.xml Binary files differ -- Gitblit v1.9.3