From c4355edf683197a67e127c796e8f93650cc2a302 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期一, 19 六月 2023 19:02:38 +0800 Subject: [PATCH] 充电任务优化 --- src/main/java/com/zy/core/thread/ShuttleThread.java | 13 ++++++------- 1 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/zy/core/thread/ShuttleThread.java b/src/main/java/com/zy/core/thread/ShuttleThread.java index 9aa000f..f8e571e 100644 --- a/src/main/java/com/zy/core/thread/ShuttleThread.java +++ b/src/main/java/com/zy/core/thread/ShuttleThread.java @@ -364,14 +364,13 @@ //鎸囦护缁撴潫浣� array[16] = command.getCommandEnd(); - try { - Thread.sleep(1000);//鍛戒护涓嬪彂鍓嶄紤鐪�1s - } catch (InterruptedException e) { - throw new RuntimeException(e); - } - OperateResult result = modbusTcpNet.Write("0", array);; if (result != null && result.IsSuccess) { + try { + Thread.sleep(3000);//鍛戒护涓嬪彂鍚庝紤鐪�1s + } catch (InterruptedException e) { + throw new RuntimeException(e); + } News.info("鍥涘悜绌挎杞﹀懡浠や笅鍙慬id:{}] >>>>> {}", slave.getId(), JSON.toJSON(command)); OutputQueue.SHUTTLE.offer(MessageFormat.format("銆恵0}銆慬id:{1}] >>>>> 鍛戒护涓嬪彂锛� {2}", DateUtils.convert(new Date()), slave.getId(), JSON.toJSON(command))); return true; @@ -856,7 +855,7 @@ }else { shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.CHARGING_WAITING); } - News.info("鍥涘悜绌挎杞︿换鍔℃墽琛屽畬鎴愮瓑寰呯‘璁や腑锛岀┛姊溅鍙�={}锛屼换鍔℃暟鎹�={}", shuttleProtocol.getShuttleNo(), JSON.toJSON(command)); + News.info("鍥涘悜绌挎杞︿换鍔℃墽琛屼笅鍙戝畬鎴愮瓑寰呮墽琛岀粨鏉燂紝绌挎杞﹀彿={}锛屼换鍔℃暟鎹�={}", shuttleProtocol.getShuttleNo(), JSON.toJSON(command)); } } -- Gitblit v1.9.1