zhaowenyu
2025-12-24 19763ebd20ad16435f3c1ccfdc8abd1518712cc1
ard-admin/src/main/java/com/ard/web/controller/route/RouteController.java
@@ -49,8 +49,8 @@
     */
    @ApiOperation("获取设备当前航线状态")
    @GetMapping("/{boxSn}/state")
    public RouteState getRouteState(@PathVariable String boxSn) {
        return stateMachineService.getCurrentState(boxSn);
    public AjaxResult getRouteState(@PathVariable String boxSn) {
        return AjaxResult.success(stateMachineService.getCurrentState(boxSn));
    }
    /**
@@ -58,8 +58,8 @@
     */
    @ApiOperation("重置设备航线状态")
    @PostMapping("/{boxSn}/reset")
    public String resetRouteState(@PathVariable String boxSn) {
    public AjaxResult resetRouteState(@PathVariable String boxSn) {
        stateMachineService.resetStateMachine(boxSn);
        return "设备" + boxSn + "航线状态已重置为:" + RouteState.IDLE;
        return AjaxResult.success( "设备" + boxSn + "航线状态已重置为:" + RouteState.IDLE);
    }
}