From 6daf900a09adcca981f620744bf89851654d88e0 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期二, 05 八月 2025 09:58:08 +0800 Subject: [PATCH] # --- src/main/java/com/zy/core/thread/impl/NyShuttleThread.java | 63 ++++++++++++++++--------------- 1 files changed, 33 insertions(+), 30 deletions(-) diff --git a/src/main/java/com/zy/core/thread/impl/NyShuttleThread.java b/src/main/java/com/zy/core/thread/impl/NyShuttleThread.java index 312b527..e311708 100644 --- a/src/main/java/com/zy/core/thread/impl/NyShuttleThread.java +++ b/src/main/java/com/zy/core/thread/impl/NyShuttleThread.java @@ -89,35 +89,35 @@ }); readThread.start(); - //璁惧鎵ц - Thread executeThread = new Thread(() -> { - while (true) { - try { - if (shuttleAction == null) { - try { - shuttleAction = SpringUtils.getBean(ShuttleAction.class); - }catch (Exception e){ - } - continue; - } - - Object object = redisUtil.get(RedisKeyType.SHUTTLE_FLAG.key + deviceConfig.getDeviceNo()); - if (object == null) { - continue; - } - - Integer taskNo = Integer.valueOf(String.valueOf(object)); - if (taskNo != 0) { - //瀛樺湪浠诲姟闇�瑕佹墽琛� - boolean result = shuttleAction.executeWork(deviceConfig.getDeviceNo(), taskNo); - } - Thread.sleep(100); - } catch (Exception e) { - e.printStackTrace(); - } - } - }); - executeThread.start(); +// //璁惧鎵ц +// Thread executeThread = new Thread(() -> { +// while (true) { +// try { +// if (shuttleAction == null) { +// try { +// shuttleAction = SpringUtils.getBean(ShuttleAction.class); +// }catch (Exception e){ +// } +// continue; +// } +// +// Object object = redisUtil.get(RedisKeyType.SHUTTLE_FLAG.key + deviceConfig.getDeviceNo()); +// if (object == null) { +// continue; +// } +// +// Integer taskNo = Integer.valueOf(String.valueOf(object)); +// if (taskNo != 0) { +// //瀛樺湪浠诲姟闇�瑕佹墽琛� +// boolean result = shuttleAction.executeWork(deviceConfig.getDeviceNo(), taskNo); +// } +// Thread.sleep(100); +// } catch (Exception e) { +// e.printStackTrace(); +// } +// } +// }); +// executeThread.start(); } private void listenMessageFromRedis() { @@ -927,8 +927,11 @@ return false; } + List<NavigationMapType> restartCalcMapTypes = new ArrayList<>(mapTypes); + restartCalcMapTypes.add(NavigationMapType.SHUTTLE); + String currentLocNo = shuttleProtocol.getCurrentLocNo(); - List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(currentLocNo, locNo, mapTypes, assignCommand, this); + List<ShuttleCommand> commands = shuttleOperaUtils.getStartToTargetCommands(currentLocNo, locNo, restartCalcMapTypes, assignCommand, this); if (commands == null) { return false; } -- Gitblit v1.9.1