From aab74f9728236408a573b6502d623eca2e8fff5b Mon Sep 17 00:00:00 2001 From: Junjie <540245094@qq.com> Date: 星期二, 18 六月 2024 15:06:36 +0800 Subject: [PATCH] # --- zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java | 26 +++++++++++++++++++------- 1 files changed, 19 insertions(+), 7 deletions(-) diff --git a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java index 2669988..62e16cb 100644 --- a/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java +++ b/zy-asrs-wcs/src/main/java/com/zy/asrs/wcs/core/kernel/command/ShuttleCommandService.java @@ -73,9 +73,19 @@ if (null == shuttleProtocol) { return false; } - if (!shuttleThread.isIdle()) {//璁惧涓嶇┖闂� + + if (!shuttleThread.isIdle(new ExecuteSupport() { + @Override + public Boolean judgement() { + if (Objects.equals(MotionCtgType.get(motion.getMotionCtgEl()), MotionCtgType.SHUTTLE_CHARGE_OFF)) {//闈炲叧闂厖鐢祄otion锛岄渶瑕佸垽鏂澶囩姸鎬� + return false;//涓嶉渶瑕佸垽鏂姸鎬� + } + return true;//闇�瑕佸垽鏂姸鎬� + } + })) {//璁惧涓嶇┖闂� return false; } + if (motionService.count(new LambdaQueryWrapper<Motion>() .eq(Motion::getDeviceCtg, DeviceCtgType.SHUTTLE.val()) .eq(Motion::getDevice, motion.getDevice()) @@ -275,11 +285,13 @@ //鍏呯數浠诲姟 if (Objects.requireNonNull(MotionCtgType.get(motion.getMotionCtgEl())).equals(MotionCtgType.SHUTTLE_CHARGE_ON)) { - // 澶嶄綅绌挎杞� - shuttleThread.setSyncTaskNo(0); - shuttleThread.setProtocolStatus(ShuttleProtocolStatusType.IDLE); - shuttleThread.setPakMk(true); - return true; + if (shuttleProtocol.getHasCharge() || shuttleProtocol.getProtocolStatusType().equals(ShuttleProtocolStatusType.CHARGING_WAITING)) { + // 澶嶄綅绌挎杞� + shuttleThread.setSyncTaskNo(0); + shuttleThread.setProtocolStatus(ShuttleProtocolStatusType.IDLE); + shuttleThread.setPakMk(true); + return true; + } } if (!shuttleProtocol.getProtocolStatusType().equals(ShuttleProtocolStatusType.WAITING) @@ -514,7 +526,7 @@ //閫氳繃xy鍧愭爣灏忚溅浜岀淮鐮� String distCodeNum = NavigatePositionConvert.xyToPosition(endPath.getX(), endPath.getY(), endPath.getZ(), hostId); //鑾峰彇绉诲姩鍛戒护 - ShuttleCommand command = shuttleThread.getMoveCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed); + ShuttleCommand command = shuttleThread.getMoveCommand(assignCommand.getDeviceTaskNo(), startCodeNum, distCodeNum, allDistance, ShuttleRunDirection.get(startPath.getDirection()).id.intValue(), runSpeed, nodes); command.setNodes(nodes);//灏嗚璧拌妭鐐规坊鍔犲埌姣忎竴姝ュ懡浠や腑 commands.add(command); } -- Gitblit v1.9.1