Browse Source

完善指令之间的互斥

master
白凤吉 2 months ago
parent
commit
66529fa91c
  1. 3
      src/main/java/com/iflytop/gd/app/command/control/SolutionAddCommand.java

3
src/main/java/com/iflytop/gd/app/command/control/SolutionAddCommand.java

@ -33,6 +33,9 @@ public class SolutionAddCommand extends BaseCommandHandler {
@Override
public CompletableFuture<Void> handle(CmdDTO cmdDTO) {
if (deviceStateService.getCommandMutexState().get().isSolutionAddCommandExecuting()) {
throw new AppException(ResultCode.COMMAND_ALREADY_EXECUTING);
}
if (deviceStateService.getCommandMutexState().get().isMoveToHeatAreaCommandExecuting()
|| deviceStateService.getCommandMutexState().get().isMoveToSolutionAreaCommandExecuting()
|| deviceStateService.getCommandMutexState().get().isSolutionAddCommandExecuting()

Loading…
Cancel
Save