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);