Browse Source

增加订单资源下载

master
xyiege 3 years ago
parent
commit
0a3f5c7319
  1. 27
      src/main/java/cn/chjyj/szwh/utils/SzwhApiUtils.java

27
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;
}
}

Loading…
Cancel
Save