|
|
@ -147,7 +147,7 @@ public class SzwhApiUtils { |
|
|
* distribute 同步订单数据 |
|
|
* distribute 同步订单数据 |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
public static JSONObject synchInfo(JSONObject postJson){ |
|
|
public static JSONObject synchInfo(String postJson){ |
|
|
String entHost= ProperUtils.getSzwhProp("REAL_URL");//委托系统主机
|
|
|
String entHost= ProperUtils.getSzwhProp("REAL_URL");//委托系统主机
|
|
|
String url=entHost+"/dist/api/v1/synchInfo"; |
|
|
String url=entHost+"/dist/api/v1/synchInfo"; |
|
|
// 使用的token
|
|
|
// 使用的token
|
|
|
@ -155,8 +155,8 @@ public class SzwhApiUtils { |
|
|
Map hmap = new HashMap(); |
|
|
Map hmap = new HashMap(); |
|
|
hmap.put("dist_token",sign); |
|
|
hmap.put("dist_token",sign); |
|
|
hmap.put("Content-Type","application/json"); |
|
|
hmap.put("Content-Type","application/json"); |
|
|
JSONObject json = RequestUtils.postData(url,postJson.toString(),hmap); |
|
|
JSONObject json = RequestUtils.postData(url,postJson,hmap); |
|
|
log.info(""); |
|
|
log.info("synchinfo:"+postJson+",ret:"+json); |
|
|
return json; |
|
|
return json; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -195,4 +195,25 @@ public class SzwhApiUtils { |
|
|
log.info(batchcode+"订单获取合约关联编码"+json); |
|
|
log.info(batchcode+"订单获取合约关联编码"+json); |
|
|
return 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; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|