【泛微接口】工具类修改
This commit is contained in:
parent
c32de4c662
commit
cbd621d36e
|
|
@ -59,7 +59,7 @@ public class FWImpl {
|
|||
mainTable.put("bmbm", bmbm);
|
||||
|
||||
FWRestfulUtils fwRestfulUtils = new FWRestfulUtils();
|
||||
return fwRestfulUtils.pushBaseData(mainTable, tqq9_fwuserid, number, "bd_warehouse");
|
||||
return fwRestfulUtils.pushData(mainTable, tqq9_fwuserid, number, "bd_warehouse");
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -388,7 +388,10 @@ public class FWImpl {
|
|||
et.put("yx", yx);
|
||||
et.put("sfmr", sfmr);
|
||||
|
||||
recordsArr1.add(et);
|
||||
JSONObject entry = new JSONObject();
|
||||
entry.put("data", et);
|
||||
|
||||
recordsArr1.add(entry);
|
||||
}
|
||||
|
||||
//银行明细
|
||||
|
|
@ -420,7 +423,10 @@ public class FWImpl {
|
|||
p.put("sfmr", sfmr);
|
||||
p.put("bz", bze);
|
||||
|
||||
recordsArr2.add(p);
|
||||
JSONObject entry = new JSONObject();
|
||||
entry.put("data", p);
|
||||
|
||||
recordsArr2.add(entry);
|
||||
}
|
||||
|
||||
//组装单头
|
||||
|
|
@ -448,7 +454,7 @@ public class FWImpl {
|
|||
mainTable.put("sfyzlbzs", sfyzlbzs);
|
||||
mainTable.put("sfyfrwtsqs", sfyfrwtsqs);
|
||||
mainTable.put("bz", bz);
|
||||
mainTable.put("qymc", gysmc);
|
||||
mainTable.put("gysmc", gysmc);
|
||||
mainTable.put("qylx", qylx);
|
||||
mainTable.put("tyshxydm", tyshxydm);
|
||||
mainTable.put("yyzzbh", yyzzbh);
|
||||
|
|
@ -534,7 +540,7 @@ public class FWImpl {
|
|||
mainTable.put("htfj", fjArr);
|
||||
|
||||
FWRestfulUtils fwRestfulUtils = new FWRestfulUtils();
|
||||
return fwRestfulUtils.pushBaseData(mainTable, cjr, gysbh, "bd_supplier", recordsArr1, recordsArr2);
|
||||
return fwRestfulUtils.pushData(mainTable, cjr, gysbh, "bd_supplier", recordsArr1, recordsArr2);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -48,11 +48,8 @@ public class FWRestfulUtils {
|
|||
* @param details
|
||||
* @return
|
||||
*/
|
||||
public String pushBaseData(JSONObject mainTable, String fwuserid, String billno, String entityName, JSONArray... details){
|
||||
String requestName = "推送采购供应商信息";
|
||||
public String pushData(JSONObject mainTable, String fwuserid, String billno, String entityName, JSONArray... details){
|
||||
|
||||
//restful接口url
|
||||
String url = FW_Main_URL + "api/cube/restful/interface/saveOrUpdateModeData/CGGYS";
|
||||
//获取时间戳
|
||||
String currentTimeTamp = getTimestamp();
|
||||
|
||||
|
|
@ -69,15 +66,28 @@ public class FWRestfulUtils {
|
|||
operationinfo.put("operator", fwuserid);
|
||||
|
||||
//封装mainTable参数
|
||||
String requestName = null;
|
||||
String ourl = null;
|
||||
Map<String, Object> dataParam = new HashMap<>();
|
||||
dataParam.put("mainTable",mainTable);
|
||||
dataParam.put("operationinfo",operationinfo);
|
||||
if("bd_supplier".equals(entityName)){
|
||||
requestName = "推送采购供应商信息";
|
||||
ourl = "api/cube/restful/interface/saveOrUpdateModeData/CGGYS";
|
||||
dataParam.put("detail1", details[0]);
|
||||
dataParam.put("detail2", details[1]);
|
||||
}else if("bd_warehouse".equals(entityName)){
|
||||
requestName = "推送仓库信息";
|
||||
ourl = "api/cube/restful/interface/saveOrUpdateModeData/CK";
|
||||
}else if("im_otheroutbill".equals(entityName)){
|
||||
requestName = "推送快递单号信息";
|
||||
ourl = "api/cube/restful/interface/saveOrUpdateModeData/KDDHCX";
|
||||
}
|
||||
System.out.println("===请求参数dataparam==="+dataParam);
|
||||
|
||||
//restful接口url
|
||||
String url = FW_Main_URL + ourl;
|
||||
|
||||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("data",dataParam);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue