{"id":501,"date":"2019-05-13T14:05:29","date_gmt":"2019-05-13T06:05:29","guid":{"rendered":"http:\/\/www.hefeiyu.com\/?p=501"},"modified":"2021-06-16T12:01:56","modified_gmt":"2021-06-16T04:01:56","slug":"4gl%e8%b0%83%e7%94%a8web-api%ef%bc%8c%e5%ae%9e%e7%8e%b0json%e4%bc%a0%e9%80%92demo","status":"publish","type":"post","link":"https:\/\/www.hefeiyu.com\/?p=501","title":{"rendered":"4gl\u8c03\u7528WEB API\uff0c\u5b9e\u73b0JSON\u4f20\u9012(Demo)"},"content":{"rendered":"<div id=\"content_views\" class=\"htmledit_views\">\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\"><strong><span style=\"color: #ff0000;\">\u6d4b\u8bd5\u73af\u5883:<\/span><\/strong>\u00a0GP5.25 ,\u00a0fjs\u7248\u672c2.32,<span style=\"font-family: 'Courier New'; background-color: #ffffff;\">\u89e3\u6790json\u6240\u9700\u8981\u7684jar\u4f9d\u8d56\u5305\u00a0<\/span><span style=\"color: #ff6666;\">(PS: \u5982\u679c\u6ca1\u6709\u8bb0\u9519\u662ffjs2.32\u7248\u672c\u53ca\u4ee5\u4e0a\u624d\u652f\u6301java bridge,\u6240\u4ee5GP 5.25\u4ee5\u4e0b\u7684\u540c\u5b66\u5c31\u4e0d\u8981\u7528\u8fd9\u79cd\u65b9\u5f0f\u53bb\u6d4b\u8bd5)<\/span><\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\"><strong><span style=\"color: #ff0000;\">\u6d4b\u8bd5\u5185\u5bb9:<\/span><\/strong> \u5229\u7528\u6b64fjs\u7248\u672c\u5bf9java bridge\u7684\u652f\u6301,\u5b9e\u73b04gl\u8c03\u7528WEB API,\u5b9e\u73b0json\u4f20\u9012\u00a0<\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New'; color: #ff0000;\"><strong>\u6d4b\u8bd5\u6b65\u9aa4\u5982\u4e0b:<\/strong><\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">1.\u4e0b\u8f7d\u672c\u6b21\u6d4b\u8bd5\u9700\u8981\u7684jar\u4f9d\u8d56\u5305\uff0c\u767e\u5ea6\u641c\u7d22\u5c31\u6709 \u201cJava \u89e3\u6790JSON\uff0cJSON-LIBjar\u5305\u4e0b\u8f7d\u201d\u3002\u53ea\u662fif-common.jar\u6587\u4ef6\u8981\u7a0d\u5fae\u6ce8\u610f\uff0c\u8fd9\u662f\u522b\u4eba\u5199\u597d\u7684\u5305\uff0c\u4e0b\u8f7d\u4e0b\u6765\u662f\u6ca1\u6709\u7684\u3002\uff08\u5982\u679c\u6709java\u7ecf\u7684\u7ae5\u978b,\u60f3\u4e00\u4e0b\u5c31\u77e5\u9053\u8fd9\u91cc\u9762\u4f1a\u5199\u4ec0\u4e48\uff09<\/span><\/span><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\"><br \/>\n<\/span><\/span><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/05\/af4ee4b86dfdfb1ae2f56b9f3a017e66.png\" \/><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">2.\u5c06\u4e0b\u8f7d\u7684jar\u6587\u4ef6\u4f20\u5230ERP\u670d\u52a1\u5668\u5bf9\u5e94\u7684\u76ee\u5f55\uff1a\/u1\/topprod\/tiptop\/ds4gl2\/bin\/javaad\/jar\u3002<\/span><\/span><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/05\/2fc0f6f5aecaf9ecff82c2d558893333.png\" \/><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">3.\u4fee\u6539\u73af\u5883\u53d8\u91cf tiptop_env\u6587\u4ef6\u4e2d\u7684jar\u5305\u5f15\u7528\u8def\u5f84\u3002<\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">tiptop_env\u4f4d\u7f6e\uff1a\/u1\/topprod\/tiptop\/bin\/tiptop_env\uff0c<\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">\u53ef\u4f7f\u7528VI\u76f4\u63a5\u8fdb\u884c\u7f16\u8f91\uff0c\u7136\u540e\u4fdd\u5b58\u3002\uff08\u6ce8\u610f\uff1a\u591a\u4e2a\u73af\u5883\u53d8\u91cf\u4ee5 \u5192\u53f7 \u9694\u5f00\uff0c\u6700\u540e\u4e00\u4e2a\u73af\u5883\u53d8\u91cf\u65f6\u7528 \u5206\u53f7 \u7ed3\u675f\uff09<\/span><\/span><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/05\/193d56be8fb4c32c9ec063acd86791c5.png\" \/><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">4.\u7f16\u51994gl\u4ee3\u7801\uff0c\u91cd\u70b9\u5c06\u4e0a\u4f20\u5230\u670d\u52a1\u5668\u4e2d\u7684jar\u5305\uff0c\u901a\u8fc7import\u65b9\u5f0f\u5bfc\u5165\u52304gl\u4ee3\u7801\u4e2d\uff0c\u4ee5\u4fbf\u8c03\u7528\u3002\uff08\u76ee\u524d\u5df2\u5199\u6210\u516c\u5171\u51fd\u6570\u653elib\/cl_web_api.4gl\uff09<\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">\u57fa\u672c\u601d\u8def\uff1a\u5c06URL\u53ca\u8981\u4f20\u9012\u7684JSON\u683c\u5f0f\u6570\u636e\u4f5c\u4e3a\u53c2\u6570\u4f20\u5165\u63a5\u53e3\uff0c\u5c06\u63a5\u53e3\u8fd4\u56de\u7684\u6570\u636e\/\u5bf9\u8c61\u8fdb\u884c\u89e3\u6790\uff0c\u5b58\u5165\u4e00\u4e2a\u968f\u673a\u521b\u5efa\u7684\u4e34\u65f6\u8868\uff08\u968f\u673a\uff1a\u8868\u540d\u4e0d\u4f1a\u91cd\u590d\uff0c\u4e34\u65f6\u8868\u4e3a\u4f1a\u8bdd\u7c7b\u578b\uff09\uff0c\u56de\u4f20\u7ed94gl\u4e34\u65f6\u8868\uff0c\u4f9b4gl\u518d\u6b21\u5904\u7406\u3002<\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">4gl\u8c03\u7528\u6b64lib,\u53c2\u65703\u4f20\u5165\u4e0d\u540c\u7684\u503c,\u4f1a\u6709\u4e24\u79cd\u56de\u4f20\u7ed3\u679c: 1.\u8fd4\u56de\u4e34\u65f6\u8868\u540d2.\u8fd4\u56de\u5bf9\u8c61\u3002<\/span><\/span><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/05\/ce37165bf06cf3efaca414abdeb8d107.png\" \/><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">5.&lt;\u7b2c\u4e00\u79cd:\u8fd4\u56de\u4e34\u65f6\u8868\u540d&gt;<\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">\u8c03\u7528lib\u4e0b\u7684\u65b9\u6cd5CALLcl_web_api(p_Url,p_Post_Json,p_Type,p_Nouse2)\uff0c<\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">\u8bbe\u7f6e\u7b2c\u4e09\u4e2a\u53c2\u6570p_Type = 1, \u8fd4\u56de\u4e34\u65f6\u8868\u540d\uff0c\u4e34\u65f6\u8868\u5185\u5bb9\u4e3aAPI\u63a5\u53e3\u8fd4\u56de\u7684JSON\u6570\u636e\uff0c\u7a0b\u5e8f\u8c03\u7528\u793a\u4f8b:<\/span><\/span><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/05\/ff65887faaf0c44ef7fec0675c8b6775.png\" \/><\/p>\n<p><span style=\"font-family: 'Courier New'; background-color: #ffffff;\">\u00a0\u6839\u636e\u56de\u4f20\u7684\u8868\u540d\u505a\u4e00\u4e2a\u7b80\u5355\u7684FOREACH\u6d4b\u8bd5\uff1a<\/span><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/05\/b27ddbdb7b1e6b69c52e0395d6fa8487.png\" \/><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">6.&lt;\u7b2c\u4e8c\u79cd:\u8fd4\u56de\u5bf9\u8c61&gt; <\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">\u8c03\u7528lib\u4e0b\u7684\u65b9\u6cd5CALLcl_web_api(p_Url,p_Post_Json,p_Type,p_Nouse2)\uff0c<\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">\u8bbe\u7f6e\u7b2c\u4e09\u4e2a\u53c2\u6570p_Type = 2, \u8fd4\u56de\u4e34\u5bf9\u8c61\uff0c\u7a0b\u5e8f\u8c03\u7528\u793a\u4f8b\uff1a<\/span><\/span><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.hefeiyu.com\/wp-content\/uploads\/2019\/05\/ef49fc54fa4aa7f88caf37c2d2811f39.png\" \/><\/p>\n<p><span style=\"background-color: #ffffff;\"><span style=\"font-family: 'Courier New';\">7.\u6709\u4e2a\u524d\u63d0\u5f88\u91cd\u8981\uff0c\u5982\u679c\u662f\u8981\u8bbf\u95ee\u5916\u90e8\u7684WEB API\u63a5\u53e3\uff0cERP\u670d\u52a1\u5668\u8981\u4e00\u5b9a\u53ef\u4ee5\u8bbf\u95ee\u5916\u7f51\uff1b\u5f53\u7136\u5982\u679c\u4e0d\u65b9\u4fbf\u8ba9ERP\u670d\u52a1\u5668\u8bbf\u95ee\u5916\u7f51\uff0c\u5c31\u8c03\u7528\u5c40\u57df\u7f51\u4e0b\u53d1\u5e03WEB API\u63a5\u53e3\u4e5f\u662f\u53ef\u4ee5\u7684\u3002<\/span><\/span><\/p>\n<p><span style=\"background-color: #ffffff;\"><strong><span style=\"color: #ff0000;\">\u5e72\u8d27\u5949\u9001!!!\u00a0 cl_web_api.4gl\u6e90\u7801\u5982\u4e0b:<\/span><\/strong><\/span><\/p>\n<pre class=\"pure-highlightjs\"><code class=\"null\">`\r\n# Prog. Version..: '5.25.11-12.12.11(00010)'     #\r\n#&lt;--------------------------------------------------------------------------------------------------------------&gt;\r\n# Library name.....: cl_web_api.4gl\r\n# Descriptions.....: 4GL\u63d0\u4ea4Json\u5230Web,\u83b7\u53d6Web\u8fd4\u56de\u7684\u5bf9\u8c61,\u5e76\u8fdb\u884c\u89e3\u6790.(4GL\u8c03\u7528\u5916\u90e8Web API)\r\n# Memo.............: Two days,so funny. Where there is a will,there is a way..Ha-Ha-Ha..\r\n# Usage............: CALL cl_web_api(p_Url,p_Post_Json,p_Type,p_Nouse2) RETURNING p_Temp_Tab\/object\r\n# param_In_1.......: p_Url , type=String \r\n#     &lt;--Example--&gt;:   p_Url = \"http:\/\/xxx.xxx.x.xx\/2wm\/public\/index.php\/api\/Index\/uploadTest?a=test\"  \r\n# param_In_2.......: p_Post_Json , type=String \r\n#     &lt;--Example--&gt;:   p_Post_Json = 'postData=[{\"rec_id\": \"1\",\"name\": \"\u5321\u594e\"},{\"rec_id\": \"2\",\"name\": \"\u674e\u805a\"}]'\r\n# param_In_3.......: p_Type , type= Integer (type = 1 \u8fd4\u56de\u8868\u540d  type = 2 \u8fd4\u56de\u5bf9\u8c61 )  \r\n# param_In_4.......: p_Nouse2 , type=String\r\n# \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\r\n# param_Out_1......: p_Temp_Tab, type = String, Create temp table with random.\r\n# \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\r\n# Date &amp; Authors...: 2018-03-23\/24  By Kellan &amp; Andrew\r\n#&lt;--------------------------------------------------------------------------------------------------------------&gt;\r\n \r\nIMPORT os                                               \r\nIMPORT com\r\nIMPORT JAVA net.sf.json.JSON                            \r\nIMPORT JAVA net.sf.json.JSONArray\r\nIMPORT JAVA net.sf.json.JSONObject\r\nIMPORT JAVA com.lifesense.common.HttpUtils  \r\nIMPORT util \r\n                                       \r\nDATABASE ds        \r\nGLOBALS \"..\/..\/config\/top.global\"    \r\n \r\nFUNCTION cl_web_api(p_Url,p_Post_Json,p_Type,p_Nouse2)\r\n  DEFINE p_Url                       STRING,\r\n         p_Post_Json                 STRING,\r\n         p_Type                      INTEGER ,\r\n         p_Nouse2                    STRING                 \r\n  DEFINE l_rData                     STRING,\r\n         l_i                         INTEGER,\r\n         l_i_i                       INTEGER         \r\n  DEFINE w                           net.sf.json.JSONObject  #\u83b7\u53d6\u63a5\u53e3\u56de\u4f20\u7684\u5bf9\u8c61     \r\n  DEFINE jsony,jsonykey              net.sf.json.JSONArray   \r\n  DEFINE jsonwx                      net.sf.json.JSONObject\r\n  DEFINE l_str                       STRING    \r\n  DEFINE l_tab_colum                 STRING,\r\n         l_tem_tab_name              STRING,\r\n         l_json_values               STRING, \r\n         l_ins_values                STRING  \r\n  DEFINE l_ins_sql                   STRING,\r\n         l_msg                       STRING \r\n                  \r\n  #\u7ec4\u5408URL,\u63d0\u4ea4\u53c2\u6570\u7684JSON\u683c\u5f0f,\u8fd4\u56de\u5bf9\u8c61 w\r\n  LET l_tab_colum = \" \"   \r\n  LET g_success = 'Y'          \r\n  TRY\r\n      CALL HttpUtils.getJSONObject(p_Url,p_Post_Json) RETURNING w  \r\n  CATCH  \r\n     LET l_msg = \"ERROR :\",STATUS,\"==&gt;API\u63a5\u53e3\u901a\u8baf\u5931\u8d25!\"\r\n     CALL cl_err(l_msg,\"!\",1)       \r\n     IF p_Type = 1 THEN \r\n        RETURN \" \"\r\n     ELSE \r\n        RETURN w \r\n     END IF          \r\n  END TRY\r\n     \r\n  IF p_Type = 2 THEN \r\n     RETURN w \r\n  END IF \r\n  #web\u7aef\u56fa\u5b9a\u56de\u4f20\u5bf9\u8c61\u4e3arData  \r\n  LET l_rData = w.getString(\"rData\")    \r\n  CALL cl_err(l_rData,'!',1)\r\n   \r\n  #\u6839\u636e\u56de\u4f20\u5bf9\u8c61rData\u89e3\u6790\u4e3a\u6570\u7ec4\r\n  LET jsony = w.getJSONArray(\"rData\")  \r\n  IF jsony.size()=0 THEN\r\n     CALL cl_err(\"\u83b7\u53d6\u56de\u4f20\u503c\u5931\u8d25!\",'!',1)\r\n     RETURN \" \"\r\n  END IF  \r\n#begin----------------------------------create temp table------------------------------------------       \r\n#\u5faa\u73afjson\u7684key\u503c\u4f5c\u4e3a\u5b57\u6bb5\u521b\u5efa\u4e00\u4e2a\u4e34\u65f6\u8868:l_tem_tab_name.\u4e34\u65f6\u8868\u5b57\u6bb5\u7edf\u4e00\u7528varhcar(4000)\u9876\u989d \r\n         LET jsonwx = JSONObject.fromObject(jsony.getString(0)) \r\n         LET jsonykey = jsonwx.names()                            #json key\u83b7\u53d6 array\r\n         FOR l_i_i = 0 TO jsonykey.size()-1    \r\n             IF cl_nvl(jsonykey.getString(l_i_i),\" \") = \" \" THEN \r\n                CALL cl_err(\"\u670d\u52a1\u5668\u56de\u4f20\u7684JSON\u683c\u5f0fkey\u503c\u4e3a\u7a7a,\u8fd9\u662f\u4e0d\u5141\u8bb8\u7684!\",\"!\",1)\r\n                LET g_success = 'N'\r\n                EXIT FOR \r\n             END IF  \r\n                LET l_tab_colum = l_tab_colum,' ',\r\n                                  jsonykey.getString(l_i_i),'  VARCHAR(4000)',','              \r\n         END FOR                 \r\n     IF g_success = 'N' THEN \r\n        RETURN \" \"\r\n     END IF    \r\n     CALL cl_operation_str(l_tab_colum) RETURNING l_tab_colum\r\n     CALL cl_create_temp_table(l_tab_colum) RETURNING l_tem_tab_name\r\n     IF cl_nvl(l_tem_tab_name,\" \") = \" \" THEN         \r\n        RETURN \" \"\r\n     END IF \r\n#end----------------------------------create temp table------------------------------------------ \r\n      \r\n#begin----------------------------------insert data into temp table------------------------------  \r\n#\u4e24\u5c42\u5faa\u73af,\u83b7\u53d6key\u5bf9\u5e94\u7684value\u503c:l_values,\u7ec4\u5408\u51fa\u63d2\u5165\u4e34\u65f6\u8868\u7684value\u503c('column1','column2'.......),\u5e76\u5199\u5165\u4e34\u65f6\u8868 \r\n     FOR l_i = 0 TO jsony.size()-1\r\n         LET jsonwx = JSONObject.fromObject(jsony.getString(l_i)) \r\n         LET jsonykey = jsonwx.names()                            #json key\u83b7\u53d6 array\r\n         LET l_ins_values = \" \"\r\n         LET l_json_values = \" \"\r\n         FOR l_i_i = 0 TO jsonykey.size()-1  \r\n             LET l_json_values = jsonwx.getString(jsonykey.getString(l_i_i)) #\u6839\u636ejson key \u83b7\u53d6\u5bf9\u5e94\u7684value\u503c\r\n             IF cl_nvl(l_json_values,\" \") = \" \" THEN \r\n                LET l_json_values = \" \"\r\n             END IF \r\n             LET l_ins_values = l_ins_values,\" \",\"'\",l_json_values,\"'\",\",\"   #json key\u5bf9\u5e94\u7684values\u53ef\u80fd\u6709\u7279\u6b8a\u7b26\u53f7\u5f85\u5904\u7406?           \r\n         END FOR         \r\n        CALL cl_operation_str(l_ins_values) RETURNING l_ins_values\r\n        LET l_ins_sql = \" INSERT INTO \",l_tem_tab_name,\" \",\r\n                        \"      VALUES \",l_ins_values\r\n        PREPARE l_ins_sql_pb FROM l_ins_sql\r\n        EXECUTE l_ins_sql_pb  \r\n        IF STATUS THEN \r\n           CALL cl_err(\"\u5199\u5165\u4e34\u65f6\u8868\u5931\u8d25!\",\"1\",1)\r\n           RETURN \" \"\r\n        END IF                                                \r\n     END FOR  \r\n#end----------------------------------insert data into temp table------------------------------     \r\n  RETURN l_tem_tab_name\r\nEND FUNCTION \r\n \r\nFUNCTION cl_create_temp_table(p_tab_colum)\r\n  DEFINE p_tab_colum               STRING \r\n  DEFINE l_cre_temp_tab_sql        STRING,\r\n         l_tab_name                STRING, \r\n         l_random                  INTEGER, \r\n         l_ymd                     VARCHAR(20),\r\n         ls_time                   STRING \r\n \r\n        CALL util.Math.rand(10000) RETURNING l_random\r\n            LET ls_time = TIME\r\n            LET l_tab_name = g_prog CLIPPED, \"_\",\r\n                            TODAY USING \"YYMMDD\", \"_\",\r\n                            ls_time.subString(1,2), ls_time.subString(4,5), ls_time.subString(7,8),'_',l_random\r\n        CALL cl_replace_str(l_tab_name,' ','') RETURNING l_tab_name\r\n        LET l_cre_temp_tab_sql = \" Create Global Temporary Table \",          #\u4e24\u79cd\u65b9\u5f0f\u521b\u5efa\u4e34\u65f6\u88681,\u4f1a\u8bdd\u7c7b\u578b;2,\u4e8b\u52a1\u7c7b\u578b\r\n                                 \" \",l_tab_name,\" \",\r\n                                 \" \",p_tab_colum,\" On Commit Preserve Rows \" #\u672c\u6b21\u9009\u62e9\u4f1a\u8bdd\u7c7b\u578b\u521b\u5efa\r\n        PREPARE l_cre_temp_tab_pb FROM l_cre_temp_tab_sql\r\n        EXECUTE l_cre_temp_tab_pb\r\n        IF STATUS THEN \r\n           CALL cl_err(\"\u521b\u5efa\u4e34\u65f6\u8868\u51fa\u9519\"||l_tab_name,'!',1)\r\n           RETURN \" \"\r\n        END IF          \r\n        RETURN l_tab_name         \r\nEND FUNCTION \r\nFUNCTION cl_operation_str(p_str)\r\n  DEFINE p_str           STRING        \r\n        LET p_str = p_str.substring(3,length(p_str))      #\u53bb\u6389\u5f00\u5934\u7684\u7a7a\u683c\r\n        LET p_str = p_str.substring(1,length(p_str)-1)    #\u53bb\u6389\u6700\u540e\u4e00\u4e2a\u9017\u53f7\r\n        LET p_str = '(',p_str,')'                         #\u5916\u5c42\u52a0\u4e0a\u62ec\u53f7\r\n        RETURN p_str \r\nEND FUNCTION <\/code><\/pre>\n<p>\u76f8\u5173\u9644\u4ef6\uff1a<a href=\"https:\/\/pan.baidu.com\/s\/1HkO_f7nZc62qpaUI90EyPA\">https:\/\/pan.baidu.com\/s\/1HkO_f7nZc62qpaUI90EyPA<\/a>\u00a0 \u00a0 \u00a0\u63d0\u53d6\u7801: s454<\/p>\n<\/div>\n<p>\u8f6c\u8f7d\u8bf7\u6ce8\u660e\uff1a<a href=\"https:\/\/www.hefeiyu.com\">\u8d6b\u975e\u57df<\/a> &raquo; <a href=\"https:\/\/www.hefeiyu.com\/?p=501\">4gl\u8c03\u7528WEB API\uff0c\u5b9e\u73b0JSON\u4f20\u9012(Demo)<\/a><\/p>","protected":false},"excerpt":{"rendered":"<p>\u6d4b\u8bd5\u73af\u5883:\u00a0GP5.25 ,\u00a0fjs\u7248\u672c2.32,\u89e3\u6790json\u6240\u9700\u8981\u7684jar\u4f9d\u8d56\u5305\u00a0(PS: \u5982\u679c\u6ca1\u6709\u8bb0\u9519\u662ffjs2.32\u7248\u672c\u53ca\u4ee5\u4e0a\u624d\u652f\u6301java bridge,\u6240\u4ee5GP 5.25\u4ee5\u4e0b\u7684\u540c\u5b66\u5c31\u4e0d\u8981\u7528\u8fd9\u79cd\u65b9\u5f0f\u53bb\u6d4b\u8bd5) \u6d4b\u8bd5\u5185\u5bb9: \u5229\u7528\u6b64fjs\u7248\u672c\u5bf9ja [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[58,10,30,153],"class_list":["post-501","post","type-post","status-publish","format-standard","hentry","category-4gl","tag-erp","tag-tiptop","tag-30","tag-153"],"_links":{"self":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/501","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=501"}],"version-history":[{"count":5,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/501\/revisions"}],"predecessor-version":[{"id":7998,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=\/wp\/v2\/posts\/501\/revisions\/7998"}],"wp:attachment":[{"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=501"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=501"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hefeiyu.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=501"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}