From 961a746fb6f8c8d0ce1440aa411075c383865d38 Mon Sep 17 00:00:00 2001
From: xiaoding721 <33130084+xiaoding721@users.noreply.github.com>
Date: 星期四, 23 五月 2024 16:34:33 +0800
Subject: [PATCH] 需求导入优化
---
_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl | 32 ++++++++++++++++++++------------
1 files changed, 20 insertions(+), 12 deletions(-)
diff --git a/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl b/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl
index d157263..f14945f 100644
--- a/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl
+++ b/_Main/BL/Type_Archive/StaticMethod_HandlePR.qbl
@@ -27,17 +27,25 @@
info( json );
// 璋冪敤鎺ュ彛
- //url := "/PR/Import";
- //i := HTTPInterface::Create( archive.JavaInterfaceAddress(), archive.JavaInterfacePort() );
- //i.URL( url );
- //i.PostMethod( true );
- //
- //try {
- // i.Call( json );
- //
- // htmlresult := i.Result();
- //} onerror {
- //
- //}
+ url := "/PR/Import";
+
+ i := HTTPInterface::Create( archive.JavaInterfaceAddress(), archive.JavaInterfacePort() );
+ i.URL( url );
+ i.PostMethod( true );
+ i.MediaType( "application/json" );
+
+ i.Call( json );
+
+ htmlresult := i.Result();
+
+ respJSON := JSON::Parse( htmlresult );
+ code := respJSON.Get( "code" ).GetNumber();
+ message := respJSON.Get( "message" ).GetString();
+
+ if ( code = 200 ) {
+
+ } else {
+ error( message );
+ }
*]
}
--
Gitblit v1.9.3