zy-acs-manager/src/main/java/com/zy/acs/manager/core/constant/AgvGroupConstant.java
@@ -5,68 +5,68 @@ public class AgvGroupConstant { public static final ArrayList<String> FIRST_AGV_GROUP = new ArrayList<String>(){{ add("141"); add("142"); add("143"); add("144"); add("145"); add("146"); add("147"); add("148"); add("149"); add("150"); add("134"); // add("142"); // add("143"); // add("144"); // add("145"); // add("146"); // add("147"); // add("148"); // add("149"); // add("150"); }}; public static final ArrayList<String> SECOND_AGV_GROUP = new ArrayList<String>(){{ add("131"); add("132"); add("133"); add("134"); add("135"); add("136"); add("137"); add("138"); add("139"); add("140"); // add("132"); // add("133"); // add("134"); // add("135"); // add("136"); // add("137"); // add("138"); // add("139"); // add("140"); }}; public static final ArrayList<String> THIRD_AGV_GROUP = new ArrayList<String>(){{ add("121"); add("122"); add("123"); add("124"); add("125"); add("126"); add("127"); add("128"); add("129"); add("130"); add("134"); // add("122"); // add("123"); // add("124"); // add("125"); // add("126"); // add("127"); // add("128"); // add("129"); // add("130"); }}; public static final ArrayList<String> FOURTH_AGV_GROUP = new ArrayList<String>(){{ add("111"); add("112"); add("113"); add("114"); add("115"); add("116"); add("117"); add("118"); add("119"); add("120"); add("134"); // add("112"); // add("113"); // add("114"); // add("115"); // add("116"); // add("117"); // add("118"); // add("119"); // add("120"); }}; public static final ArrayList<String> FIFTH_AGV_GROUP = new ArrayList<String>(){{ add("101"); add("102"); add("103"); add("104"); add("105"); add("106"); add("107"); add("108"); add("109"); add("110"); add("134"); // add("102"); // add("103"); // add("104"); // add("105"); // add("106"); // add("107"); // add("108"); // add("109"); // add("110"); }}; } zy-acs-manager/src/main/java/com/zy/acs/manager/core/service/MainService.java
@@ -1131,7 +1131,7 @@ // 检验方向 FuncSta chargeFuncSta = funcStaService.query(lastCode.getId(), FuncStaType.CHARGE.toString()); Double chargeDirection = Double.parseDouble(chargeFuncSta.getAngle()); if (!lastDirection.equals(chargeDirection)) { if (!lastDirection.equals(chargeDirection)&&lastCode.getCornerBool()) { actionList.add(new Action( null, // 编号 null, // 总线 @@ -1323,10 +1323,8 @@ //String lastCorner = null; Integer index = -1; boolean corner = false; for (int i = pathList.size(); i < 0; i++) { if (i == 0) { continue; } Code nextCode = codeService.getCacheByData(pathList.get(i)); if (nextCode != null && nextCode.getCornerBool()) { //lastCorner = pathList.get(i); @@ -1363,16 +1361,12 @@ // DOTO 添加转弯 Code endCode = codeService.getCacheByData(pathList.get(pathList.size() - 1)); nextDirection = mapService.calculateDirection(lastCode, endCode, angleOffsetVal); if (nextDirection.equals((workDirection + 180) % 360)) { nextDirection = workDirection; reverse = true; } reverse = true; } else { nextDirection = mapService.calculateDirection(lastCode, nextCode, angleOffsetVal); // 第一步:如果下一个方向正好是作业方向的相反方向,则重置下一个方向为作业方向,标记 reverse = true if (nextDirection.equals((workDirection + 180) % 360)) { if (!nextDirection.equals((workDirection+180) % 360)) { nextDirection = workDirection; reverse = true; } @@ -1718,7 +1712,7 @@ // 检验方向 FuncSta chargeFuncSta = funcStaService.query(lastCode.getId(), FuncStaType.CHARGE.toString()); Double chargeDirection = Double.parseDouble(chargeFuncSta.getAngle()); if (!lastDirection.equals(chargeDirection)) { if (!lastDirection.equals(chargeDirection) && lastCode.getCornerBool()) { actionList.add(new Action( null, // 编号 null, // 总线