diff --git a/src/main/java/com/iflytop/gd/app/controller/SelfTestController.java b/src/main/java/com/iflytop/gd/app/controller/SelfTestController.java index ddba9f4..e84f17c 100644 --- a/src/main/java/com/iflytop/gd/app/controller/SelfTestController.java +++ b/src/main/java/com/iflytop/gd/app/controller/SelfTestController.java @@ -30,10 +30,23 @@ public class SelfTestController { return Result.success(selfTestService.getSelfTestState()); } - @Operation(summary = "是否自检完毕") + @Operation(summary = "自检完毕") @PostMapping("/finish") - public Result selfTestFinish(Boolean mode) throws Exception { - deviceStateService.setSelfTest(mode); + public Result selfTestFinish() throws Exception { + deviceStateService.setSelfTest(true); + new Thread(() -> { + try { + deviceCommandUtilService.capMotorMove(21); + } catch (Exception e) { + log.error("拍子存放区初始化上升失败", e); + } + }).start(); + return Result.success(); + } + @Operation(summary = "改变自检状态") + @PostMapping("/isFinish") + public Result selfTestFinish(boolean isFinish) throws Exception { + deviceStateService.setSelfTest(isFinish); new Thread(() -> { try { deviceCommandUtilService.capMotorMove(21);