From 6c5e976ef7e36db765753f4abe0580434b77fb50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=99=BD=E5=87=A4=E5=90=89?= Date: Thu, 15 May 2025 19:19:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8E=B0=E5=9C=BA=E4=BB=A3=E7=A0=81=E5=90=8C?= =?UTF-8?q?=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/iflytop/gd/app/cmd/MoveToHeatAreaCommand.java | 5 +---- src/main/java/com/iflytop/gd/app/cmd/MoveToSolutionAreaCommand.java | 5 +---- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/iflytop/gd/app/cmd/MoveToHeatAreaCommand.java b/src/main/java/com/iflytop/gd/app/cmd/MoveToHeatAreaCommand.java index 1a1e880..4b1ec35 100644 --- a/src/main/java/com/iflytop/gd/app/cmd/MoveToHeatAreaCommand.java +++ b/src/main/java/com/iflytop/gd/app/cmd/MoveToHeatAreaCommand.java @@ -15,7 +15,6 @@ import com.iflytop.gd.common.exception.AppException; import com.iflytop.gd.common.result.ResultCode; import com.iflytop.gd.hardware.service.GDDeviceStatusService; import com.iflytop.gd.hardware.type.IO.InputIOMId; -import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -35,13 +34,11 @@ public class MoveToHeatAreaCommand extends BaseCommandHandler { private final DevicePositionService devicePositionService; private final GantryArmService gantryArmService; private final DeviceStateService deviceStateService; - private final MoveToSolutionAreaCommand moveToSolutionAreaCommand; - @Getter private final AtomicBoolean isExecuting = new AtomicBoolean(false); @Override public CompletableFuture handle(CmdDTO cmdDTO) throws Exception { - if (isExecuting.get() || moveToSolutionAreaCommand.getIsExecuting().get()) { + if (isExecuting.get()) { throw new AppException(ResultCode.COMMAND_ALREADY_EXECUTING); } isExecuting.set(true); diff --git a/src/main/java/com/iflytop/gd/app/cmd/MoveToSolutionAreaCommand.java b/src/main/java/com/iflytop/gd/app/cmd/MoveToSolutionAreaCommand.java index 58ee4b7..bc6c688 100644 --- a/src/main/java/com/iflytop/gd/app/cmd/MoveToSolutionAreaCommand.java +++ b/src/main/java/com/iflytop/gd/app/cmd/MoveToSolutionAreaCommand.java @@ -14,7 +14,6 @@ import com.iflytop.gd.common.enums.data.DevicePositionCode; import com.iflytop.gd.common.exception.AppException; import com.iflytop.gd.common.result.ResultCode; import com.iflytop.gd.hardware.exception.HardwareException; -import lombok.Getter; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Component; @@ -34,13 +33,11 @@ public class MoveToSolutionAreaCommand extends BaseCommandHandler { private final DevicePositionService devicePositionService; private final GantryArmService gantryArmService; private final DeviceStateService deviceStateService; - private final MoveToHeatAreaCommand moveToHeatAreaCommand; - @Getter private final AtomicBoolean isExecuting = new AtomicBoolean(false); @Override public CompletableFuture handle(CmdDTO cmdDTO) throws Exception { - if (isExecuting.get() || moveToHeatAreaCommand.getIsExecuting().get()) { + if (isExecuting.get()) { throw new AppException(ResultCode.COMMAND_ALREADY_EXECUTING); } isExecuting.set(true);