|
|
@ -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<Void> handle(CmdDTO cmdDTO) throws Exception { |
|
|
|
if (isExecuting.get() || moveToSolutionAreaCommand.getIsExecuting().get()) { |
|
|
|
if (isExecuting.get()) { |
|
|
|
throw new AppException(ResultCode.COMMAND_ALREADY_EXECUTING); |
|
|
|
} |
|
|
|
isExecuting.set(true); |
|
|
|