From 1145fb32abab8d811ef9f1b8478181bdc2ece7aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=87=A4=E5=90=89?= Date: Thu, 29 May 2025 16:32:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iflytop/sgs/app/cmd/control/CleanStartCommand.java | 6 +++--- .../com/iflytop/sgs/app/cmd/control/LiquidReduceCommand.java | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/iflytop/sgs/app/cmd/control/CleanStartCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/control/CleanStartCommand.java index 1894f89..10cce7d 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/control/CleanStartCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/control/CleanStartCommand.java @@ -43,7 +43,7 @@ public class CleanStartCommand extends BaseCommandHandler { @Override public CompletableFuture handle(CmdDTO cmdDTO) { - Assert.isTrue(deviceStateService.getDeviceState().getTransferModule().isTrayStatus(), () -> new AppException(ResultCode.TRANSFER_MODULE_NO_TRAY));//判断转运模块托盘状态 + //Assert.isTrue(deviceStateService.getDeviceState().getTransferModule().isTrayStatus(), () -> new AppException(ResultCode.TRANSFER_MODULE_NO_TRAY));//判断转运模块托盘状态 double cleanWaterVolume = systemConfigService.getSystemConfigDoubleByCode(SystemConfigCode.volume_clean);//清洁时加水的量 double waterScale = systemConfigService.getSystemConfigDoubleByCode(SystemConfigCode.scale_water);//水转换系数 double pumpPosition = systemConfigService.getSystemConfigDoubleByCode(SystemConfigCode.number_reduce);//抽液时蠕动泵移动 @@ -58,11 +58,11 @@ public class CleanStartCommand extends BaseCommandHandler { return runAsync(() -> { transferModuleService.transferXMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D.getX());//将X轴移动至加液时托盘位置点 boolean LIQUID_TRAY_EXIST=deviceSensorService.getSensorStatus(DeviceSensorCode.LIQUID_TRAY_EXIST);//监测加液位是否有托盘 - Assert.isTrue(LIQUID_TRAY_EXIST, () -> new AppException(ResultCode.TARGET_HEAT_MODULE_NO_TRAY));//机械臂是否有托盘 + // Assert.isTrue(LIQUID_TRAY_EXIST, () -> new AppException(ResultCode.TARGET_HEAT_MODULE_NO_TRAY));//机械臂是否有托盘 solutionModuleService.liquidValveSwitch(cmdDTO.getCommandId(), cmdDTO.getCommand(), ValveStateCode.waste);//电磁阀对应通道打开 solutionModuleService.solutionMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), solutionModuleMotorDownInTubeExtPositon);//加液模块下降进入试管抽取位置 solutionModuleService.liquidPumpMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), pumpPosition); - solutionModuleService.solutionMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0.0);//加液模块上升 + solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液模块上升 solutionModuleService.liquidValveSwitch(cmdDTO.getCommandId(), cmdDTO.getCommand(), ValveStateCode.water);//电磁阀对应通道打开 for (int i = 0; i < cycle; i++) { for (TubeState tubeState : trayState.getTubes()) { diff --git a/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidReduceCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidReduceCommand.java index 0579371..69b83a1 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidReduceCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidReduceCommand.java @@ -43,7 +43,7 @@ public class LiquidReduceCommand extends BaseCommandHandler { public CompletableFuture handle(CmdDTO cmdDTO) { JSONArray jsonArray = cmdDTO.getJSONArrayParam("columns");//获取参数 - Assert.isTrue(jsonArray.isEmpty(),()->new AppException(ResultCode.INVALID_PARAMETER));//参数校验 + Assert.isTrue(!jsonArray.isEmpty(),()->new AppException(ResultCode.INVALID_PARAMETER));//参数校验 Point3D liquidAreaTrayPoint3D = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D();//获取加液时托盘位置点 Double trayTubeHorizontalSpacingDistance = devicePositionService.getPosition(DevicePositionCode.trayTubeHorizontalSpacingDistance).getDistance();//获取托盘试管水平间距 Double solutionModuleMotorDownInTubeExtPositon = devicePositionService.getPosition(DevicePositionCode.solutionModuleMotorDownInTubeExtPositon).getPositon();//加液模块电机下降进入试管抽取位置 @@ -52,8 +52,8 @@ public class LiquidReduceCommand extends BaseCommandHandler { solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液模块上升 transferModuleService.transferMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D);//将X轴移动至加液时托盘位置点 boolean liquidTrayExist = deviceSensorService.getSensorStatus(DeviceSensorCode.LIQUID_TRAY_EXIST);//获取传感器状态 - Assert.isTrue(liquidTrayExist, () -> new AppException(ResultCode.SOLUTION_MODULE_NO_TRAY));//判断机械臂是否有托盘 - deviceStateService.getDeviceState().getSolutionModule().setIdle(true);//设置占用 + //Assert.isTrue(liquidTrayExist, () -> new AppException(ResultCode.SOLUTION_MODULE_NO_TRAY));//判断机械臂是否有托盘 + deviceStateService.getDeviceState().getSolutionModule().setIdle(false);//设置占用 deviceStateService.getDeviceState().getSolutionModule().setPumping(true);//设置正在加液 solutionModuleService.liquidValveSwitch(cmdDTO.getCommandId(), cmdDTO.getCommand(), ValveStateCode.waste);//电磁阀对应通道打开 for (int i = 0; i < jsonArray.size(); i++) { @@ -61,8 +61,8 @@ public class LiquidReduceCommand extends BaseCommandHandler { if (column > 0 && column < 6) { double distance = (jsonArray.getInt(i) - 1) * trayTubeHorizontalSpacingDistance; transferModuleService.transferXMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint3D.getX()+distance);//机械臂移动到试管位置 - solutionModuleService.solutionMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), solutionModuleMotorDownInTubeExtPositon);//加液模块下降进入试管 - solutionModuleService.liquidPumpMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), -reduceNumber);//抽液 + solutionModuleService.solutionMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 10);//加液模块下降进入试管 solutionModuleMotorDownInTubeExtPositon todo + solutionModuleService.liquidPumpMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0.1);//抽液 reduceNumber0.1 solutionModuleService.solutionMotorMoveZero(cmdDTO.getCommandId(), cmdDTO.getCommand());//加液模块上升 } }