using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.Charger;
namespace WebStarter.Controllers;
///
/// 充电机管理
///
[Produces("application/json")]
[ApiController]
[Route("/api[controller]")]
public class ChargeController : ControllerBase
{
private ChargerService _chargerService;
public ChargeController(ChargerService chargerService)
{
_chargerService = chargerService;
}
///
/// 通过仓号启动充电
///
/// 仓号
///
[HttpGet]
[Route("/StartChargeByBinNo/{binNo}")]
public Result StartChargeByBinNo(string binNo)
{
return _chargerService.StartChargeByBinNo(binNo);
}
///
/// 通过仓号停止充电
///
/// 仓号
///
[HttpGet]
[Route("/StopChargeByBinNo/{binNo}")]
public Result StopChargeByBinNo(string binNo)
{
return _chargerService.StartChargeByBinNo(binNo);
}
}