From 18d258c246cb9e4812964968769eb32fa990065a Mon Sep 17 00:00:00 2001 From: whycq <913841844@qq.com> Date: 星期四, 11 七月 2024 16:44:00 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/rcs/thread/impl/NyShuttleThread.java | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 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 10176d4..891794a 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 @@ -373,6 +373,7 @@ NyShuttleHttpCommand httpCommand = JSON.parseObject(command.getBody(), NyShuttleHttpCommand.class); Map<String, Object> body = httpCommand.getRequest().getBody(); Object pathObj = body.get("path"); + int taskId = Integer.parseInt(body.get("taskId").toString()); List<JSONObject> path = JSON.parseArray(JSON.toJSONString(pathObj), JSONObject.class); ArrayList<NyShuttleHttpCommand> commandList = new ArrayList<>(); while (!path.isEmpty()) { @@ -380,7 +381,12 @@ if (path.size() > 10) { List<JSONObject> subList = path.subList(0, 10); list.addAll(subList); - subList.clear(); + + List<JSONObject> tmp = new ArrayList<>(); + for (int i = 10; i < path.size(); i++) { + tmp.add(path.get(i)); + } + path = tmp; }else { list.addAll(path); path.clear(); @@ -391,6 +397,7 @@ NyShuttleHttpCommand.NyRequest request = httpCommandCopy.getRequest(); bodyCopy.put("path", list); + bodyCopy.put("taskId", taskId++); request.setBody(bodyCopy); httpCommandCopy.setRequest(request); @@ -399,9 +406,9 @@ for (NyShuttleHttpCommand requestCommand : commandList) { JSONObject result = requestCommand(requestCommand); - if (result == null) { - return false;//璇锋眰澶辫触 - } +// if (result == null) { +// return false;//璇锋眰澶辫触 +// } this.shuttleProtocol.setSendTime(System.currentTimeMillis());//鎸囦护涓嬪彂鏃堕棿 } return true; -- Gitblit v1.9.1