| | |
| | | .setJson(JSON.toJSONString(applyInDto)) |
| | | .build() |
| | | .doPost(); |
| | | log.info("WMS返回数据:{}", response); |
| | | log.info("请求数据:{},WMS返回数据:{}", applyInDto,response); |
| | | JSONObject jsonObject = JSON.parseObject(response); |
| | | if (jsonObject.get(code) != null && jsonObject.getInteger(code).equals(codeValue)) { |
| | | return JSONObject.parseObject(jsonObject.getString(dataCode), ApplyInRepsonseDto.class); |
| | |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | String s= "{\"msg\":\"Success\",\"code\":200,\"data\":{\"locNo\":\"A102400201\",\"batchNo\":\"TK2603104428\",\"taskNo\":\"TK2603104428\"}}"; |
| | | String s = "{\"msg\":\"Success\",\"code\":200,\"data\":{\"locNo\":\"A102400201\",\"batchNo\":\"TK2603104428\",\"taskNo\":\"TK2603104428\"}}"; |
| | | //System.out.println(JSON.parseObject(s).getString("data")); |
| | | ApplyInRepsonseDto applyInRepsonseDto = JSONObject.parseObject(JSON.parseObject(s).getString("data"), ApplyInRepsonseDto.class); |
| | | System.out.println(applyInRepsonseDto); |