From 9372f61dcb41eeb2e09871caefce0f764d6ab021 Mon Sep 17 00:00:00 2001 From: zjj <3272660260@qq.com> Date: 星期五, 21 六月 2024 15:17:04 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java | 20 ++++++++++++++------ 1 files changed, 14 insertions(+), 6 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java index 262d869..d532cc1 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java @@ -100,17 +100,15 @@ BufferedReader reader = new BufferedReader(new InputStreamReader(this.socket.getInputStream())); // 璇诲彇鏈嶅姟鍣ㄧ殑鍝嶅簲 StringBuffer sb = new StringBuffer(); - String response = null; char[] chars = new char[2048];//缂撳啿鍖� - do { + while (true) { reader.read(chars); - String trim = new String(chars).trim(); + String trim = new String(chars); sb.append(trim); - if (sb.lastIndexOf("\r\n") != -1) { + if (trim.lastIndexOf("\r\n") != -1) { break; } - } while (response != null); -// System.out.println("Received response from server: " + sb); + } JSONObject result = JSON.parseObject(sb.toString());//寰楀埌鍝嶅簲缁撴灉闆� if (!socketResults.isEmpty() && socketResults.size() >= 5) { @@ -453,6 +451,11 @@ } @Override + public boolean updateLocation(ShuttleCommand param) { + return true;//杩樻病绉绘杩囨潵 + } + + @Override public boolean isIdle() { return this.isIdle(null); } @@ -792,6 +795,11 @@ return command; } + @Override + public ShuttleCommand getUpdateLocationCommand(Integer taskNo, String locNo) { + return null;//杩樻病绉绘杩囨潵 + } + //鑾峰彇灏忚溅澶嶄綅鍝嶅簲鍛戒护 public ShuttleCommand getInitCommand(Integer taskNo, Integer code) { LocService locService = SpringUtils.getBean(LocService.class); -- Gitblit v1.9.1