This commit is contained in:
2022-11-28 10:32:27 +08:00
parent 48907753bd
commit bde0414ec7
2 changed files with 4 additions and 2 deletions

View File

@@ -116,11 +116,13 @@ public class LmsToSapServiceImpl implements LmsToSapService {
// String url = acsUrl + api;
String url = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SAP_URL").getValue();
String token = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SAP_TOKEN").getValue();
String sap_client = SpringContextHolder.getBean(ParamServiceImpl.class).findByCode("SAP_CLIENT").getValue();
String api = "/sap/center/wms/005";
url = url + api;
try {
String resultMsg = HttpRequest.post(url).header("TOKEN","877734686FA61EDD99E9D85A96D91E14")
.header("sap-client","130")
String resultMsg = HttpRequest.post(url).header("TOKEN",token)
.header("sap-client",sap_client)
.body(String.valueOf(jo))
.execute().body();
result = JSONObject.parseObject(resultMsg);