自动化立体仓库 - WMS系统
#
1
11 小时以前 8257d89c461f6553d66fad1e5e3df3d172a00924
src/main/java/com/zy/asrs/service/impl/OpenServiceImpl.java
@@ -706,7 +706,8 @@
                        .eq("status", 1)
        );
        if (Cools.isEmpty(basArmMast)){
            throw new CoolException("未查询到相关机械臂拆码垛任务!!!"+ JSON.toJSONString(param));
            return;
//            throw new CoolException("未查询到相关机械臂拆码垛任务!!!"+ JSON.toJSONString(param));
        }
        if (Integer.parseInt(param.getPick_num()) !=1){
            basArmMast.setStatus(9);
@@ -871,23 +872,18 @@
        agvBindCtnrAndBinParam.setReqCode(String.valueOf(System.currentTimeMillis()));
        agvBindCtnrAndBinParam.setCtnrCode(param.getBarcode());
        agvBindCtnrAndBinParam.setCtnrTyp("1");
        agvBindCtnrAndBinParam.setPositionCode(
                basAgvLocNoSou != null && basAgvLocNoSou.getAgvLocNo() != null
                        ? basAgvLocNoSou.getAgvLocNo()
                        : ""
        );
        agvBindCtnrAndBinParam.setStgBinCode(
                basAgvLocNoEnd != null && basAgvLocNoEnd.getAgvLocNo() != null
                        ? basAgvLocNoEnd.getAgvLocNo()
                        : ""
        );
        if(basAgvLocNoEnd != null && basAgvLocNoEnd.getAgvLocNo() != null){
            agvBindCtnrAndBinParam.setStgBinCode(basAgvLocNoEnd.getAgvLocNo());
        }
        if(basAgvLocNoSou != null && basAgvLocNoSou.getAgvLocNo() != null){
            agvBindCtnrAndBinParam.setStgBinCode(basAgvLocNoSou.getAgvLocNo());
        }
        agvBindCtnrAndBinParam.setIndBind(param.getIndBind());
        try {
            String URL = "http://10.10.10.200:8181/rcms/services/rest/hikRpcService"; // AGV接口地址
            String mesPath = "bindCtnrAndBin"; // 接口路径
            String response = "";
            boolean success = false;
            try {
                log.info("AGV绑定容器接口请求参数: {}", JSON.toJSONString(agvBindCtnrAndBinParam));
@@ -928,6 +924,45 @@
        return false;
    }
    @Override
    @Transactional
    public boolean agvApplicationPassedTheGrating(AgvGoTheArnParam param) {
        String URL = "http://10.10.10.200:8181/rcms/services/rest/hikRpcService"; // AGV接口地址
        String AGVPath = "continueTask"; // 接口路径
        AgvGoParam agvGoParam = new AgvGoParam();
        agvGoParam.setCode("0");
        agvGoParam.setMessage("继续执行");
        agvGoParam.setReqCode(param.getReqCode());
        ReturnT<String> result = new PostMesDataUtils().postMesDataArmGrating("光栅下发后继续任务:", URL, AGVPath, param);
        if (result.getCode()==200){
            return true;
        }
        return false;
    }
    @Override
    @Transactional
    public boolean agvBindAndBin(String taskNo) {
        String URL = "http://10.10.10.200:8181/"; // AGV接口地址
        String AGVPath = "rcms/services/rest/hikRpcService/bindCtnrAndBin"; // 接口路径
        BasAgvMast basAgvMast = basAgvMastService.selectOne(new EntityWrapper<BasAgvMast>().eq("task_no",taskNo));
        BasAgvLocNoService basAgvLocNoService = SpringUtils.getBean(BasAgvLocNoService.class);
        BasAgvLocNo basAgvLocNoEnd = basAgvLocNoService.selectOne(
                new EntityWrapper<BasAgvLocNo>().eq("sta_no", basAgvMast.getStaNo())
        );
        AgvBindCtnrAndBinParam agvBindCtnrAndBinParam = new AgvBindCtnrAndBinParam();
        agvBindCtnrAndBinParam.setReqCode(basAgvMast.getTaskNo() + "-" + basAgvMast.getTimestamp());
        agvBindCtnrAndBinParam.setCtnrCode(basAgvMast.getTimestamp().toString());
        agvBindCtnrAndBinParam.setCtnrTyp("1");
        agvBindCtnrAndBinParam.setStgBinCode(basAgvLocNoEnd.getAgvLocNo());
        agvBindCtnrAndBinParam.setIndBind("0");
        ReturnT<String> resultBind = new PostMesDataUtils().postMesDataArmGrating("AGV容器绑定解绑", URL,AGVPath, agvBindCtnrAndBinParam);
        if (resultBind.getCode()!=200){
            return true;
        }
        return false;
    }
}