自动化立体仓库 - WMS系统
zhangc
2024-12-12 5dc8a9f9aba3310fd21cad9509635bb7ec2f007f
src/main/java/com/zy/asrs/task/handler/AutoMoveTwoAndThreeGoOneHandler.java
@@ -21,6 +21,7 @@
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import java.util.concurrent.TimeUnit;
@Slf4j
@Service
@@ -104,18 +105,18 @@
    }
    private int doHttpRequest(Object requestParam, String namespace, String url, String path, String appkey, String ip){
        if (true){
            apiLogService.save(
                    namespace,
                    url + path,
                    appkey,
                    ip,
                    JSON.toJSONString(JSONObject.toJSONString(requestParam)),
                    "",
                    true
            );
            return 0;
        }
//        if (true){
//            apiLogService.save(
//                    namespace,
//                    url + path,
//                    appkey,
//                    ip,
//                    JSON.toJSONString(JSONObject.toJSONString(requestParam)),
//                    "",
//                    true
//            );
//            return 0;
//        }
        String response = "";
        boolean success = false;
@@ -123,6 +124,7 @@
            response = new HttpHandler.Builder()
                    .setUri(url)
                    .setPath(path)
                    .setTimeout(30, TimeUnit.SECONDS)
                    .setJson(JSONObject.toJSONString(requestParam))
                    .build()
                    .doPost();
@@ -130,13 +132,16 @@
            int code = Integer.parseInt(jsonObject.get("code").toString());
            if(code != 0){
                //TODO 张超
                throw new CoolException("调用AGV响应错误");
                //return code;
            }
            success = true;
            return code;
        }catch (Exception e){
            log.error(e.getMessage());
            throw new CoolException("调用AGV响应错误");
            //throw new CoolException("调用AGV响应错误");
            return 1;
        }finally {
            apiLogService.save(
                    namespace,