43 lines
1.2 KiB
Java
Raw Normal View History

2025-04-22 16:04:15 +08:00
package com.cdzy.ebikemaintenance.controller;
import com.cdzy.common.model.JsonResult;
import com.cdzy.ebikemaintenance.service.EbikeBikeOrderService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* 工单控制层
* @author attiya
* @since 2025-04-22
*/
@RestController
@RequestMapping("/ebikeOrder")
public class EbikeOrderController {
@Resource
EbikeBikeOrderService ebikeBikeOrderService;
/**
* 生成换电工单
2025-05-19 09:42:50 +08:00
* @return 结果
2025-04-22 16:04:15 +08:00
*/
@GetMapping("changeBattery")
public JsonResult<?> changeBattery(@RequestParam("ecuSn") String ecuSn) {
ebikeBikeOrderService.changeBattery(ecuSn);
return JsonResult.success();
}
2025-05-19 09:42:50 +08:00
/**
* 领取换电工单
* @return 结果
*/
@GetMapping("receiveBatteryOrder")
public JsonResult<?> receiveBatteryOrder(@RequestParam("bikeId") Long bikeId) {
ebikeBikeOrderService.receiveBatteryOrder(bikeId);
return JsonResult.success();
}
2025-04-22 16:04:15 +08:00
}