| | |
| | | } |
| | | } |
| | | |
| | | for (OpenOrderPakoutParam param : list) { |
| | | doHttpRequest(param, "入库单上报", url, orderReportPath, null, "127.0.0.1"); |
| | | //for (OpenOrderPakoutParam param : list) { |
| | | doHttpRequest(list, "入库单上报", url, orderReportPath, null, "127.0.0.1"); |
| | | |
| | | } |
| | | //} |
| | | |
| | | return 200; |
| | | |
| | |
| | | .build() |
| | | .doPost(); |
| | | log.info("入库单上报请求返回报文:{}", response); |
| | | response = response.replace("\\", ""); |
| | | response = response.substring(1, response.length() - 1); |
| | | |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | JSONArray jsonArray = (JSONArray) jsonObject.get(""); |
| | | JSONObject jsonResult = (JSONObject) jsonArray.get(0); |
| | | if (Cools.isEmpty(jsonResult.get("ErrorCode"))) { |
| | | throw new CoolException(jsonResult.get("ErrorMsg").toString()); |
| | | if (Cools.isEmpty(jsonObject.get("ErrorCode"))) { |
| | | throw new CoolException(jsonObject.get("ErrorMsg").toString()); |
| | | } |
| | | |
| | | int code = Integer.parseInt(jsonResult.get("ErrorCode").toString()); |
| | | if (code != 1) { |
| | | throw new CoolException(jsonResult.get("ErrorMsg").toString()); |
| | | int code = Integer.parseInt(jsonObject.get("ErrorCode").toString()); |
| | | if (code != 0) { |
| | | throw new CoolException(jsonObject.get("ErrorMsg").toString()); |
| | | } |
| | | success = true; |
| | | return code; |