Browse Source

现场代码同步

master
白凤吉 3 months ago
parent
commit
d23a55bd41
  1. 3
      src/main/java/com/iflytop/gd/app/cmd/MoveToHeatAreaCommand.java
  2. 3
      src/main/java/com/iflytop/gd/app/cmd/MoveToSolutionAreaCommand.java

3
src/main/java/com/iflytop/gd/app/cmd/MoveToHeatAreaCommand.java

@ -41,6 +41,7 @@ public class MoveToHeatAreaCommand extends BaseCommandHandler {
if (isExecuting.get()) {
throw new AppException(ResultCode.COMMAND_ALREADY_EXECUTING);
}
deviceStateService.setGantryArmStateIdle(true);
isExecuting.set(true);
String heatId = cmdDTO.getStringParam("heatId");
HeatModuleCode heatModuleId = HeatModuleCode.valueOf(heatId);
@ -51,6 +52,7 @@ public class MoveToHeatAreaCommand extends BaseCommandHandler {
throw new AppException(ResultCode.TARGET_HEAT_MODULE_NO_TRAY);
}
}finally {
deviceStateService.setGantryArmStateIdle(false);
isExecuting.set(false);
}
return runAsync(() -> {
@ -98,6 +100,7 @@ public class MoveToHeatAreaCommand extends BaseCommandHandler {
deviceCommandUtilService.heaterMotorMove(cmdDTO.getCommandId(), cmdDTO.getCommand(), heatModuleId, trayLower);//下降加热位托盘
deviceStateService.setHeatModuleStateTrayStatus(heatModuleId, 1);
} finally {
deviceStateService.setGantryArmStateIdle(false);
isExecuting.set(false);
}
});

3
src/main/java/com/iflytop/gd/app/cmd/MoveToSolutionAreaCommand.java

@ -40,6 +40,7 @@ public class MoveToSolutionAreaCommand extends BaseCommandHandler {
if (isExecuting.get()) {
throw new AppException(ResultCode.COMMAND_ALREADY_EXECUTING);
}
deviceStateService.setGantryArmStateIdle(true);
isExecuting.set(true);
String heatId = cmdDTO.getStringParam("heatId");
HeatModuleCode heatModuleId = HeatModuleCode.valueOf(heatId);
@ -50,6 +51,7 @@ public class MoveToSolutionAreaCommand extends BaseCommandHandler {
throw new AppException(ResultCode.TARGET_HEAT_MODULE_OCCUPIED);
}
}finally {
deviceStateService.setGantryArmStateIdle(false);
isExecuting.set(false);
}
return runAsync(() -> {
@ -100,6 +102,7 @@ public class MoveToSolutionAreaCommand extends BaseCommandHandler {
trayState.setInSolutionModule(true);
deviceCommandUtilService.gantryZMoveBy(cmdDTO.getCommandId(), cmdDTO.getCommand(), -clawDescend);//抬升机械臂至托盘上方
}finally {
deviceStateService.setGantryArmStateIdle(false);
isExecuting.set(false);
}
});

Loading…
Cancel
Save