From 89c96171bb971dcaed7cf289b58ef44ca689523c Mon Sep 17 00:00:00 2001 From: limj <limj@taizhitech.com> Date: 星期四, 21 九月 2023 09:11:20 +0800 Subject: [PATCH] Merge branch 'dev' of http://47.101.211.7:10101/r/TIANMA_JITUAN into dev_lmj --- _Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl | 38 ++++++++++++++++++++++++++++++++++++-- 1 files changed, 36 insertions(+), 2 deletions(-) diff --git a/_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl b/_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl index d1dcf3b..fec169c 100644 --- a/_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl +++ b/_Main/BL/Type_PanelMaterial/StaticMethod_Send.qbl @@ -13,7 +13,7 @@ jsonBuilder := JSON::Object(); - jsonBuilder.Add( "releaseDate", Date::ActualDate().Format( "Y-M2-D2" ) ); + jsonBuilder.Add( "releaseDate", DateTime::ActualTime().Format( "Y-M2-D2 H2:m:s" ) ); jsonBuilder.Add( "businessType", businessType ); jsonBuilder.Add( "scenarioName", scenario.Name() ); @@ -32,6 +32,40 @@ json := jsonBuilder.Build(); - info( json.AsPrettyString() ); + //url := "/panelMaterial/send"; + + // for HTTPS requests: + //i := HTTPInterface::Create( address, 8080 ); + //i.URL( url ); + i := HTTPInterface::Create( address, 8080 ); + i.MediaType( "application/json" ); + i.URL( "/panelMaterial/send" ); + i.PostMethod( true ); //it's not a POST method + //postrequestbody := '{ + // "releaseDate": "2023-09-15 17:47:29", + // "businessType": "杞﹁浇", + // "scenarioName": "1.0 Base", + // "panelMaterials": [ + // { + // "productID": "Body side left - E series", + // "productDescription": "娴嬭瘯A", + // "startDate": "2023-09-13", + // "quantity": 100.0 + // }, + // { + // "productID": "Body side left - E series", + // "productDescription": "娴嬭瘯B", + // "startDate": "2023-09-22", + // "quantity": 200.0 + // } + // ] + //}'; + postrequestbody := json.AsString(); + + i.Call( postrequestbody ); // Call's argument is for POST method's content. + htmlresult := i.Result(); + + info( "-----------------------鍙戦�佹柟--------------------------------" ); + info( htmlresult.AsQUILL() ); *] } -- Gitblit v1.9.3