#
luxiaotao1123
7 天以前 c536ca4d61bd123023b2f23567e8c52b7845be85
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -936,7 +936,6 @@
                if (!lastCode.getData().equals(code.getData())) {
                    // 走行路径节点
//                    List<String> pathList = mapService.checkoutPath(agv.getUuid(), lastCode, code);
                    List<String> pathListPart = pathList.subList(pathList.indexOf(lastCode.getData()), pathList.indexOf(code.getData()) + 1);
                    for (int i = 0; i < pathListPart.size(); i++) {
@@ -988,30 +987,25 @@
                                        now    // 工作时间
                                ));
                                lastDirection = nextLaneDir;
                                if (nextDirection.equals(oppNextLaneDir)) {
                                    reverse = true;
                                }
                            } else {
                                if (nextDirection.equals(oppNextLaneDir)) {
                                    nextDirection = nextLaneDir;
                                    reverse = true;
                                }
                            }
                            nextDirection = nextLaneDir;
                        } else if (null != lastLaneDir) {
                            final double oppLastLaneDir = (lastLaneDir + 180) % 360;
                            if (nextDirection.equals(oppLastLaneDir)) {
                            if (nextDirection.equals(oppNextLaneDir)) {
                                reverse = true;
                            }
                            nextDirection = lastLaneDir;
                            nextDirection = nextLaneDir; // 防止 第一个动作一定是 turn 出问题
                        } else if (null != lastLaneDir) {
                            final double oppLastLaneDir = (lastLaneDir + 180) % 360;
                            if (!lastDirection.equals(nextDirection)) {
                            if (!lastDirection.equals(nextDirection)) { // lastLaneDir
                                if (!lastCode.getCornerBool()) {
                                    throw new CoolException(agvNo + "号小车离开巷道需调整方向为 " + nextDirection + "°,请推至转弯点手动调整");
                                }
                            }
                            if (nextDirection.equals(oppLastLaneDir)) {
                                reverse = true;
                            }
                            nextDirection = lastLaneDir; // 防止 第一个动作一定是 turn 出问题
                        } else {
                            // 如果下一个方向正好是作业方向的相反方向,则重置下一个方向为作业方向,标记 reverse = true