|
|
@ -171,12 +171,26 @@ public class DeviceController extends BaseController { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Integer initCount = 3; |
|
|
|
@ResponseBody |
|
|
|
@PostMapping("/api/device/init") |
|
|
|
public ApiResponse init() { |
|
|
|
this.deviceService.reset(false); |
|
|
|
return this.success(); |
|
|
|
if ( initCount > 0 ) { |
|
|
|
this.initCount --; |
|
|
|
ApiResponse response = new ApiResponse(); |
|
|
|
response.success = false; |
|
|
|
response.message = ""; |
|
|
|
response.data = List.of( |
|
|
|
Map.of("message","请确认试管帽夹中无试管帽","type","manual"), |
|
|
|
Map.of("message","移液枪复位","type","auto"), |
|
|
|
Map.of("message","机械臂复位","type","auto"), |
|
|
|
Map.of("message","孵育盘复位","type","auto") |
|
|
|
); |
|
|
|
return response; |
|
|
|
} else { |
|
|
|
this.initCount = 3; |
|
|
|
return this.success(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|