自动化立体仓库 - WMS系统
zhangc
2024-11-23 77c35ecf9aff59753b794a7ace8ca699e039694a
src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java
@@ -273,6 +273,7 @@
    private int doHttpRequest(Object requestParam, String namespace, String url, String path, String appkey, String ip) {
        String response = "";
        boolean success = false;
        int code =0;
        try {
            response = new HttpHandler.Builder()
                    .setUri(url)
@@ -283,7 +284,7 @@
                    .doPost();
            JSONObject jsonObject = JSON.parseObject(response);
            int code = Integer.parseInt(jsonObject.get("code").toString());
             code = Integer.parseInt(jsonObject.get("code").toString());
            if (code != 0) {
                if (code == 6) {
                    log.info("AGV任务单号已上报:{}", response);
@@ -304,15 +305,17 @@
            throw new CoolException("调用AGV响应错误");
            //return 1;
        } finally {
            apiLogService.save(
                    namespace,
                    url + path,
                    appkey,
                    ip,
                    JSON.toJSONString(JSONObject.toJSONString(requestParam)),
                    response,
                    success
            );
            if(code !=6){
                apiLogService.save(
                        namespace,
                        url + path,
                        appkey,
                        ip,
                        JSON.toJSONString(JSONObject.toJSONString(requestParam)),
                        response,
                        success
                );
            }
        }
    }