自动化立体仓库 - WCS系统
Junjie
2023-07-27 84a9e3a9a624526116b42ab15e27ec852eaa7c21
src/main/java/com/zy/common/utils/NyHttpUtils.java
@@ -273,21 +273,24 @@
        try {
            String response = new HttpHandler.Builder()
                    .setUri(requestUrl)
                    .setPath("/test")
                    .setPath("/static/readStatus.json")
                    .setJson(JSON.toJSONString(httpCommand))
                    .build()
                    .doPost();
                    .doGet();
            JSONObject jsonObject = JSON.parseObject(response);
            JSONObject request = jsonObject.getJSONObject("request");
            JSONObject body = request.getJSONObject("body");
            if (body.get("result").equals("success")) {
            JSONObject response2 = jsonObject.getJSONObject("response");
            JSONObject body = response2.getJSONObject("body");
            if (body.get("responseType").equals("state")) {//读取状态,不需要判断success
                return body;
            }
            if (body.get("result").equals("success")) {
                return body;
            }
        } catch (Exception e) {
            e.printStackTrace();
//            e.printStackTrace();
        }
        return null;
    }