From 2ab1545316fa941cb31c9c3af9fdaf642aff246e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B?= <1063331231@qq.com> Date: Sat, 14 Jun 2025 17:14:37 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E6=A3=80=E5=A2=9E=E5=8A=A0=E4=B8=8A?= =?UTF-8?q?=E6=96=99=E5=8C=BA=E4=BC=A0=E6=84=9F=E5=99=A8=E7=9A=84=E5=88=A4?= =?UTF-8?q?=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/iflytop/sgs/app/cmd/selftest/MoveTestCommand.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/iflytop/sgs/app/cmd/selftest/MoveTestCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/selftest/MoveTestCommand.java index 84d17bb..12774a1 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/selftest/MoveTestCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/selftest/MoveTestCommand.java @@ -55,7 +55,6 @@ public class MoveTestCommand extends BaseCommandHandler { Double solutionModuleMotorDownInTubeExtPositon = devicePositionService.getPosition(DevicePositionCode.solutionModuleMotorDownInTubeExtPositon).getPositon();//加液模块电机下降进入试管抽取位置 Point3D liquidAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D();//获取加液时托盘位置点 Point3D feedAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.feedAreaTrayPoint).getPoint3D();//获取上料区托盘夹爪位置点 - deviceStateService.getCommandMutexState().get().setMoveTest(true); return runAsync(() -> { try { @@ -64,6 +63,11 @@ public class MoveTestCommand extends BaseCommandHandler { webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(cmdDTO.getCommandId(), cmdDTO.getCommand(), "机械臂夹爪存在试管架,请取出!", 0, "error")); throw new AppException(ResultCode.TRANSFER_MODULE_YES_TRAY);//夹爪存在托盘 } + boolean feedTrayExist = deviceSensorService.getSensorStatus(DeviceSensorCode.LIQUID_TRAY_EXIST); + if (feedTrayExist) { + webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(cmdDTO.getCommandId(), cmdDTO.getCommand(), "上料区存在试管架,请取出!", 0, "error")); + throw new AppException(ResultCode.FEED_AREA_EXIST_TRAY);//上料区存在托盘 + } deviceSensorService.collectSensorState();//收集传感器转态 webSocketService.pushSelfMoveTest(SelfMoveTestGenerator.generateJson(cmdDTO.getCommandId(), cmdDTO.getCommand(), "1、各项传感器正常", 25, "success")); solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液机械臂抬升至最高