#
Junjie
1 天以前 299e745032a32db6395935ac751c0d3f7be292bf
#
4个文件已修改
29 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/ForkMainServiceImpl.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/utils/NavigateUtils.java 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/common/utils/ShuttleOperaUtils.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/ForkMainServiceImpl.java
@@ -1664,7 +1664,7 @@
            assignCommand.setAuto(true);//自动模式
            //获取小车到提升机行走命令
            List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), liftSta.getLocNo(), NavigationMapType.getNormalWithDevice(), assignCommand, shuttleThread);
            List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), liftSta.getLocNo(), NavigationMapType.getMapTypes(NavigationMapType.NORMAL), assignCommand, shuttleThread);
            if (commands == null) {
                News.taskInfo(wrkMast.getWrkNo(), "{}任务,{}小车,路径计算失败", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
                return false;//路径解锁失败
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1658,7 +1658,7 @@
            assignCommand.setAuto(true);//自动模式
            //获取小车到提升机行走命令
            List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), liftLocNo, NavigationMapType.getNormalWithDevice(), assignCommand, shuttleThread, "inLift");
            List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(shuttleProtocol.getCurrentLocNo(), liftLocNo, NavigationMapType.getMapTypes(NavigationMapType.NORMAL), assignCommand, shuttleThread, "inLift");
            if (commands == null) {
                News.taskInfo(wrkMast.getWrkNo(), "{}任务,{}小车,路径计算失败", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
                return false;//路径解锁失败
@@ -1795,7 +1795,7 @@
                return false;
            }
            String targetLocNo = navigateUtils.calcFirstLocation(shuttleProtocol.getCurrentLocNo(), wrkMast.getLocNo(), NavigationMapType.getMapTypes(NavigationMapType.NORMAL), null, null, 5);
            String targetLocNo = navigateUtils.calcFirstLocation(shuttleProtocol.getCurrentLocNo(), wrkMast.getLocNo(), NavigationMapType.getMapTypes(NavigationMapType.NORMAL), null, null, 2);
            if (targetLocNo == null) {//出提升机近点计算失败
                News.taskInfo(wrkMast.getWrkNo(), "{}任务,{}小车,出提升机近点计算失败", wrkMast.getWrkNo(), shuttleProtocol.getShuttleNo());
                return false;
src/main/java/com/zy/common/utils/NavigateUtils.java
@@ -255,8 +255,23 @@
    }
    public String findTargetLocation(List<List<NavigateNode>> partList) {
        List<NavigateNode> nodes = partList.get(partList.size() - 1);
        NavigateNode targetNode = nodes.get(0);
        NavigateNode targetNode = null;
        for (int i = partList.size(); i > 0; i--) {
            List<NavigateNode> nodes = partList.get(i - 1);
            for (NavigateNode node : nodes) {
                if (node.getNodeValue() == MapNodeType.MAIN_PATH.id) {
                    continue;
                }
                targetNode = node;
                break;
            }
            if(targetNode != null){
                break;
            }
        }
        String locNo = NavigatePositionConvert.nodeToLocNo(targetNode);
        return locNo;
    }
src/main/java/com/zy/common/utils/ShuttleOperaUtils.java
@@ -59,8 +59,6 @@
    }
    public synchronized List<ShuttleCommand> getStartToTargetCommands(String startLocNo, String endLocNo, List<NavigationMapType> mapTypes, List<int[]> whites, ShuttleAssignCommand assignCommand, ShuttleThread shuttleThread, String moveType) {
        long getStartTime = System.currentTimeMillis();
        ShuttleProtocol shuttleProtocol = shuttleThread.getStatus();
        if (shuttleProtocol == null) {
            return null;
@@ -68,12 +66,14 @@
        Integer shuttleNo = shuttleProtocol.getShuttleNo();
        //获取小车移动速度
        Integer runSpeed = Optional.ofNullable(basShuttleService.selectOne(new EntityWrapper<BasShuttle>().eq("shuttle_no", shuttleNo)).getRunSpeed()).orElse(1000);
        long calcStartTime = System.currentTimeMillis();
        List<NavigateNode> nodeList = navigateUtils.calc(startLocNo, endLocNo, mapTypes, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startLocNo)), whites);
        if (nodeList == null) {
            News.error("{} dash {} can't find navigate path!", startLocNo, endLocNo);
            shuttleThread.offerSystemMsg("{} dash {} can't find navigate path!", startLocNo, endLocNo);
            return null;
        }
        News.info("[RCS Debug] Calc path time:{}", (System.currentTimeMillis() - calcStartTime));
        List<NavigateNode> allNode = new ArrayList<>();
        List<NavigateNode> lockNode = new ArrayList<>();