自动化立体仓库 - WMS系统
zhangchao
2024-11-07 eb6768340c1b382442df9a20fbc3712857184755
src/main/java/com/zy/asrs/service/impl/AgvWrkMastServiceImp.java
@@ -67,6 +67,7 @@
        //判断要修改的工作档状态是否合理,如果不合理则抛出异常
        checkWrkSts(agvWrkMast,wrkSts);
        agvWrkMast.setWrkSts(wrkSts);
        agvWrkMast.setModiTime(new Date());
        this.updateById(agvWrkMast);
    }
@@ -108,6 +109,8 @@
        AgvLocMast locMast = agvCommonService.getLocNo(basDevp.getLocType1(),basDevp.getFloor(),false,true);
        agvWrkMast.setLocNo(locMast.getLocNo());
        agvWrkMast.setWrkSts(201L);
        agvWrkMast.setLogErrMemo("startAllcationIn");
        agvWrkMast.setModiTime(new Date());
        agvWrkMastService.updateById(agvWrkMast);
        // 更目标库位
        locMast.setLocSts("S");
@@ -269,7 +272,6 @@
    private int doHttpRequest(Object requestParam, String namespace, String url, String path, String appkey, String ip){
        String response = "";
        boolean success = false;
        try {
            response = new HttpHandler.Builder()
                    .setUri(url)
@@ -281,13 +283,17 @@
            int code = Integer.parseInt(jsonObject.get("code").toString());
            if(code != 0){
                throw new CoolException("调用AGV响应错误");
                //TODO 张超
                //throw new CoolException("调用AGV响应错误");
                return code;
            }
            success = true;
            return code;
        }catch (Exception e){
            log.error(e.getMessage());
            throw new CoolException("调用AGV响应错误");
            //TODO 张超
            //throw new CoolException("调用AGV响应错误");
            return 1;
        }finally {
            apiLogService.save(
                    namespace,