From 0a3f5c73194aa39be99192ab811b56b29562faa6 Mon Sep 17 00:00:00 2001 From: xyiege Date: Sat, 26 Nov 2022 14:07:18 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E8=AE=A2=E5=8D=95=E8=B5=84?= =?UTF-8?q?=E6=BA=90=E4=B8=8B=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../cn/chjyj/szwh/utils/SzwhApiUtils.java | 27 ++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/src/main/java/cn/chjyj/szwh/utils/SzwhApiUtils.java b/src/main/java/cn/chjyj/szwh/utils/SzwhApiUtils.java index e3975cb..93c2cfe 100644 --- a/src/main/java/cn/chjyj/szwh/utils/SzwhApiUtils.java +++ b/src/main/java/cn/chjyj/szwh/utils/SzwhApiUtils.java @@ -147,7 +147,7 @@ public class SzwhApiUtils { * distribute 同步订单数据 * @return */ - public static JSONObject synchInfo(JSONObject postJson){ + public static JSONObject synchInfo(String postJson){ String entHost= ProperUtils.getSzwhProp("REAL_URL");//委托系统主机 String url=entHost+"/dist/api/v1/synchInfo"; // 使用的token @@ -155,8 +155,8 @@ public class SzwhApiUtils { Map hmap = new HashMap(); hmap.put("dist_token",sign); hmap.put("Content-Type","application/json"); - JSONObject json = RequestUtils.postData(url,postJson.toString(),hmap); - log.info(""); + JSONObject json = RequestUtils.postData(url,postJson,hmap); + log.info("synchinfo:"+postJson+",ret:"+json); return json; } @@ -195,4 +195,25 @@ public class SzwhApiUtils { log.info(batchcode+"订单获取合约关联编码"+json); return json; } + + /** + * 下载订单资源 + * @param resurl + * @param islicode + * @param contractIslicode + * @return + */ + public static JSONObject getDownOrdRes(String resurl,String islicode,String contractIslicode){ + String entHost= ProperUtils.getSzwhProp("REAL_URL");//委托系统主机 + //String url=entHost+"/dist/api/v1/synchInfo"; + String url = entHost+ resurl; +// // 使用的token + String sign=SignUtils.createSign("distribute"); + Map hmap = new HashMap(); + hmap.put("dist_token",sign); + hmap.put("Content-Type","application/json"); + //JSONObject json = RequestUtils.postData(url,postJson); + JSONObject json = RequestUtils.GetData(url,hmap,false); + return json; + } }