Junjie
2024-01-26 efc2dfd36276053966c582691d2cdd19aeae24a6
#跑库程序
2个文件已修改
27 ■■■■■ 已修改文件
src/main/java/com/zy/core/thread/NyShuttleThread.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/webapp/views/shuttle2.html 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/thread/NyShuttleThread.java
@@ -830,7 +830,7 @@
                    shuttleProtocol.setXCurrent(shuttleProtocol.getXCurrent() + 1);
                }
            }
        } else if (shuttleProtocol.getMoveType() == 2) {//循环跑
        } else if (shuttleProtocol.getMoveType() == 2) {//母轨道循环跑
            Integer xCurrent = shuttleProtocol.getXCurrent();
            Integer yCurrent = shuttleProtocol.getYCurrent();
@@ -852,6 +852,28 @@
                    }
                }
            }
        } else if (shuttleProtocol.getMoveType() == 3) {//子轨道循环跑
            Integer xCurrent = shuttleProtocol.getXCurrent();
            Integer yCurrent = shuttleProtocol.getYCurrent();
            String locNo = Utils.getLocNo(xCurrent, yCurrent, lev);
            //调度去目标位置
            if (shuttleProtocol.getCurrentLocNo().equals(locNo)) {
                if (xCurrent.equals(shuttleProtocol.getXStart())) {
                    shuttleProtocol.setXCurrent(shuttleProtocol.getXTarget());//小车和目标位置一致,切换库位
                }else {
                    shuttleProtocol.setXCurrent(shuttleProtocol.getXStart());//小车和目标位置一致,切换库位
                }
            } else {
                boolean result = shuttleDispatchUtils.dispatchShuttle(commonService.getWorkNo(3), locNo);
                if (result) {//调度成功
                    if (xCurrent.equals(shuttleProtocol.getXStart())) {
                        shuttleProtocol.setXCurrent(shuttleProtocol.getXTarget());//切换库位
                    }else {
                        shuttleProtocol.setXCurrent(shuttleProtocol.getXStart());//切换库位
                    }
                }
            }
        }
    }
src/main/webapp/views/shuttle2.html
@@ -167,7 +167,8 @@
                                        <div>
                                            <label><input type="radio" name="moveType" value="0">&nbsp;跑轨道</label>
                                            <label><input type="radio" name="moveType" value="1">&nbsp;跑库位</label>
                                            <label><input type="radio" name="moveType" value="2">&nbsp;循环跑</label>
                                            <label><input type="radio" name="moveType" value="2">&nbsp;母轨道循环跑</label>
                                            <label><input type="radio" name="moveType" value="3">&nbsp;子轨道循环跑</label>
                                        </div>
                                        <div style="margin-top: 10px;">
                                            <button class="item" onclick="moveLoc()">跑库</button>