| | |
| | | package com.vincent.rsf.openApi.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | |
| | | } |
| | | /**WMS基础配置链接*/ |
| | | String wmsUrl = wmsApi.getHost() + ":" + wmsApi.getPort() + WmsConstant.MODIFY_ORDER_DETLS; |
| | | log.info("修改订单信息及状态: {}, 请求参数: {}", wmsUrl, JSONObject.toJSONString(params)); |
| | | HttpHeaders headers = new HttpHeaders(); |
| | | headers.add("Content-Type", "application/json"); |
| | | headers.add("api-version", "v2.0"); |
| | | |
| | | List<Map<String, Object>> maps = new ArrayList<>(); |
| | | Map<String, Object> mapParams = new HashMap<>(); |
| | | mapParams.put("orderNo", Arrays.asList(params.getOrderNo())); |
| | | mapParams.put("orderNo", params.getOrderNo()); |
| | | mapParams.put("anfme", params.getAnfme()); |
| | | mapParams.put("type", params.getType()); |
| | | mapParams.put("wkType", params.getWkType()); |
| | | mapParams.put("exceStatus", params.getExceStatus()); |
| | | mapParams.put("orderItems", params.getOrderItems()); |
| | | maps.add(mapParams); |
| | | |
| | | HttpEntity httpEntity = new HttpEntity(maps, headers); |
| | | log.info("修改订单信息及状态: {}, 请求参数: {}", wmsUrl, JSONArray.toJSONString(maps)); |
| | | HttpEntity<List<Map<String, Object>>> httpEntity = new HttpEntity<>(maps, headers); |
| | | ResponseEntity<String> exchange = restTemplate.exchange(wmsUrl, HttpMethod.POST, httpEntity, String.class); |
| | | log.info("订单修改返回结果: {}", exchange); |
| | | if (Objects.isNull(exchange.getBody())) { |