From bffee10d486c881984295a921b59e5293c6a5c07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=A2=A6=E8=BF=9C?= <1063331231@qq.com> Date: Wed, 28 May 2025 19:43:41 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BC=98=E5=8C=96=E4=B8=9A=E5=8A=A1?= =?UTF-8?q?=E6=8C=87=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/iflytop/sgs/app/cmd/control/AnnealStartCommand.java | 4 ---- src/main/java/com/iflytop/sgs/app/cmd/control/DoorCloseCommand.java | 2 +- src/main/java/com/iflytop/sgs/app/cmd/control/DoorOpenCommand.java | 2 +- src/main/java/com/iflytop/sgs/app/cmd/control/FanStartCommand.java | 2 +- src/main/java/com/iflytop/sgs/app/cmd/control/LiquidAddCommand.java | 2 +- .../com/iflytop/sgs/app/cmd/control/LiquidPreFillStartCommand.java | 5 +---- 6 files changed, 5 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/iflytop/sgs/app/cmd/control/AnnealStartCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/control/AnnealStartCommand.java index 748a6db..4b32c33 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/control/AnnealStartCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/control/AnnealStartCommand.java @@ -3,10 +3,8 @@ package com.iflytop.sgs.app.cmd.control; import com.iflytop.sgs.app.core.BaseCommandHandler; import com.iflytop.sgs.app.model.bo.status.device.HeatModuleState; import com.iflytop.sgs.app.model.dto.CmdDTO; -import com.iflytop.sgs.app.service.api.DevicePositionService; import com.iflytop.sgs.app.service.device.DeviceStateService; import com.iflytop.sgs.app.service.device.module.HeatModuleService; -import com.iflytop.sgs.app.service.device.module.TransferModuleService; import com.iflytop.sgs.common.annotation.CommandMapping; import com.iflytop.sgs.common.enums.HeatModuleCode; import com.iflytop.sgs.common.enums.HeatingType; @@ -26,10 +24,8 @@ import java.util.concurrent.CompletableFuture; @RequiredArgsConstructor @CommandMapping("anneal_start")//业务指令注解 public class AnnealStartCommand extends BaseCommandHandler { - private final TransferModuleService transferModuleService; private final HeatModuleService heatModuleService; private final DeviceStateService deviceStateService; - private final DevicePositionService devicePositionService; @Override public CompletableFuture handle(CmdDTO cmdDTO) { diff --git a/src/main/java/com/iflytop/sgs/app/cmd/control/DoorCloseCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/control/DoorCloseCommand.java index 4d15784..d7adfb9 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/control/DoorCloseCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/control/DoorCloseCommand.java @@ -25,8 +25,8 @@ public class DoorCloseCommand extends BaseCommandHandler { @Override public CompletableFuture handle(CmdDTO cmdDTO) { return runAsync(() -> { - deviceStateService.getDeviceState().getDoorModule().setOpen(false); //将门状态设置为false doorModuleService.doorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(),0); + deviceStateService.getDeviceState().getDoorModule().setOpen(false); //将门状态设置为false }); } } diff --git a/src/main/java/com/iflytop/sgs/app/cmd/control/DoorOpenCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/control/DoorOpenCommand.java index d6f5237..ed1d441 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/control/DoorOpenCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/control/DoorOpenCommand.java @@ -31,8 +31,8 @@ public class DoorOpenCommand extends BaseCommandHandler { Double doorOpenPosition = devicePositionService.getPosition(DevicePositionCode.doorOpenPosition).getDistance();//获取开门位置 return runAsync(() -> { - deviceStateService.getDeviceState().getDoorModule().setOpen(true);//将门状态设置为true doorModuleService.doorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), doorOpenPosition); + deviceStateService.getDeviceState().getDoorModule().setOpen(true);//将门状态设置为true }); } } diff --git a/src/main/java/com/iflytop/sgs/app/cmd/control/FanStartCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/control/FanStartCommand.java index 0816d20..c97e985 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/control/FanStartCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/control/FanStartCommand.java @@ -33,7 +33,7 @@ public class FanStartCommand extends BaseCommandHandler { HeatModuleState heatModuleState = deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode); return runAsync(() -> { - if (!heatModuleState.getHeatingType().equals(HeatingType.stop)) {//加热棒不是停止加热状态 + if (!heatModuleState.getHeatingType().equals(HeatingType.stop)) {//加热棒加热状态 heatModuleService.heatRodClose(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleCode);//关闭加热棒 deviceStateService.getDeviceState().getHeatModuleByCode(heatModuleCode).setHeatingType(HeatingType.stop);//同步状态 } diff --git a/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidAddCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidAddCommand.java index 48d0ca7..9505392 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidAddCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidAddCommand.java @@ -56,7 +56,7 @@ public class LiquidAddCommand extends BaseCommandHandler { Assert.isTrue(!jsonArray.isEmpty(), () -> new AppException(ResultCode.INVALID_PARAMETER));//确定选中了列 TransferModuleState transferModuleState = deviceStateService.getDeviceState().getTransferModule();//获取机械臂状态 Assert.isTrue(transferModuleState.isTrayStatus(), () -> new AppException(ResultCode.OPERATION_NOT_ALLOWED));//判断机械臂是否有托盘 - Point3D liquidAreaTrayPoint = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D(); //获取加液区上方点位 + Point3D liquidAreaTrayPoint = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D(); //获取加液区上方托盘点位 Double solutionModuleMotorDownInTubeAddPositon = devicePositionService.getPosition(DevicePositionCode.solutionModuleMotorDownInTubeAddPositon).getPositon(); //加液模块电机下降进入试管加液位置 Double trayTubeHorizontalSpacingDistance = devicePositionService.getPosition(DevicePositionCode.trayTubeHorizontalSpacingDistance).getDistance(); //托盘试管水平间距 solutionModuleService.solutionMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//加液机械臂上升 diff --git a/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidPreFillStartCommand.java b/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidPreFillStartCommand.java index 865dfd0..3509417 100644 --- a/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidPreFillStartCommand.java +++ b/src/main/java/com/iflytop/sgs/app/cmd/control/LiquidPreFillStartCommand.java @@ -46,7 +46,7 @@ public class LiquidPreFillStartCommand extends BaseCommandHandler { Assert.notNull(solutions, () -> new AppException(ResultCode.OPERATION_NOT_ALLOWED));//检验参数 ValveStateCode valveStateCode = ValveStateCode.valueOf(solutions.getCode());//获取对应的电磁阀通道 Point3D liquidAreaTrayPoint = devicePositionService.getPosition(DevicePositionCode.liquidAreaTrayPoint).getPoint3D(); //获取加液区上方点位 - double position=devicePositionService.getPosition(DevicePositionCode.solutionPreFillDistance).getDistance(); + double position=devicePositionService.getPosition(DevicePositionCode.solutionPreFillDistance).getDistance();//溶液首次预充距离 return runAsync(() -> { deviceStateService.getDeviceState().getSolutionModule().setIdle(true);//设置占用 deviceStateService.getDeviceState().getSolutionModule().setPumping(true);//设置正在加液 @@ -54,9 +54,6 @@ public class LiquidPreFillStartCommand extends BaseCommandHandler { solutionModuleService.solutionMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), 0);//加液机械臂上升 transferModuleService.transferMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), liquidAreaTrayPoint);//移动至加液位置 solutionModuleService.liquidPumpMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), position);//预充开始 - - SolutionContainerState solutionContainerState=deviceStateService.getDeviceState().getSolutionModule().getContainerStateByCode(valveStateCode.getContainerCode());//设置容器预充状态 - solutionContainerState.setFull(true);//容器状态满 }); } }