skyouc
6 天以前 7b88030b2ba2adc69a2100e0b52f7d19a0fa8233
zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -976,12 +976,20 @@
                    if (Cools.isEmpty(actionList) || !actionList.get(0).getActionType().equals(ActionTypeType.TurnCorner.val())) {
                        Double turnDirection = workDirection;
                        Code nextCode = codeService.getCacheByData(lastCode.getData());
                        boolean reverse = true;
//                        Double nextDirection = mapService.calculateDirection(lastCode, nextCode, angleOffsetVal);
                        // if (isStation && turnCodes.contains(lastCode.getData())) {
                        if ((turnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000050")) || (isLoc && locTurnCodes.contains(nextCode.getData()) && lastCode.getData().equals("00000080"))) {
                        // if ((isStation && turnCodes.contains(lastCode.getData())) || (isLoc && locTurnCodes.contains(lastCode.getData()))) {
                            turnDirection = workDirection + 180.0;
                            reverse = false;
                        }
                        // run
                        ActionTypeType actionType = ActionTypeType.StraightAheadTurnable;
                        if (reverse) {
                            actionType = ActionTypeType.StraightBackTurnable;
                        }
                        if (lastCode.getCornerBool()) {
                            // turn
                            actionList.add(new Action(
@@ -990,7 +998,7 @@
                                    task.getId(),    // 任务
                                    null,    // 动作号
                                    null,    // 优先级
                                    ActionTypeType.TurnCorner.desc,    // 名称
                                    actionType.desc,    // 名称
                                    mapService.isTurnCorner(lastCode.getData()) ? 1D : 0D,    // 属性值
                                    lastCode.getData(),    // 地面码
                                    String.valueOf(turnDirection),   // 动作参数