From cb757218ff35e8b302de2d6cc5a95b842acd8ea2 Mon Sep 17 00:00:00 2001 From: Junjie <fallin.jie@qq.com> Date: 星期三, 20 九月 2023 12:33:05 +0800 Subject: [PATCH] # --- src/main/java/com/zy/asrs/controller/LiftController.java | 20 +++++--------------- 1 files changed, 5 insertions(+), 15 deletions(-) diff --git a/src/main/java/com/zy/asrs/controller/LiftController.java b/src/main/java/com/zy/asrs/controller/LiftController.java index a2199df..0104c32 100644 --- a/src/main/java/com/zy/asrs/controller/LiftController.java +++ b/src/main/java/com/zy/asrs/controller/LiftController.java @@ -234,24 +234,14 @@ //绉诲姩鎵樼洏 int workNo = commonService.getWorkNo(3);//鑾峰彇浠诲姟鍙� - Integer startSta = null; - Integer targetSta = null; - for (LiftStaProtocol liftStaProtocol : liftThread.getLiftStaProtocols()) { - if (liftStaProtocol.getStaNo() == param.getSourceStaNo()) { - startSta = liftStaProtocol.getStaNo(); - } - - if (liftStaProtocol.getLev() == param.getStaNo()) { - targetSta = liftStaProtocol.getStaNo(); - } - } - - if (startSta == null || targetSta == null) { - throw new CoolException("璧风偣鎴栫洰鏍囩偣涓嶅瓨鍦�"); + LiftStaProtocol sourceLiftSta = NyLiftUtils.getLiftStaByStaNo(param.getSourceStaNo()); + LiftStaProtocol liftSta = NyLiftUtils.getLiftStaByStaNo(param.getStaNo()); + if (sourceLiftSta == null || liftSta == null) { + throw new CoolException("婧愮珯鎴栫洰鏍囩珯涓嶅瓨鍦�"); } //鑾峰彇鎻愬崌鏈哄懡浠� - NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, startSta, targetSta, workNo); + NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, sourceLiftSta.getStaNo(), liftSta.getStaNo(), workNo); ArrayList<NyLiftCommand> commands = new ArrayList<>(); commands.add(liftCommand); -- Gitblit v1.9.1