充电服务接口调整

zw
smartwyy 6 months ago
parent 9ca5b244f3
commit 926f5655d1

@ -15,7 +15,7 @@ namespace WebStarter.Controllers;
/// </summary>
[Produces("application/json")]
[ApiController]
[Route("/api/[controller]")]
[Route("api/[controller]")]
public class ChargeController : ControllerBase
{
private ChargerService _chargerService;
@ -33,7 +33,7 @@ public class ChargeController : ControllerBase
/// </summary>
/// <returns>仓位信息列表</returns>
[HttpGet]
[Route("/api/ChrgMonitor/GetChargMonitorChargBinData")]
[Route("GetChargMonitorChargBinData")]
public Result<List<BinInfoResp>> GetChargMonitorChargBinData()
{
List<BinInfo> binInfos = _binInfoRepository.Query();
@ -61,7 +61,7 @@ public class ChargeController : ControllerBase
/// <param name="data">需要禁用仓id</param>
/// <returns>仓位信息列表</returns>
[HttpGet]
[Route("/api/TBsChargingBinInfo/ChargingBinDisable{data}")]
[Route("ChargingBinDisable/{data}")]
public Result<bool> ChargingBinDisable(int data)
{
return Result<bool>.Success(_binInfoRepository.UpdateStatus(data));
@ -72,7 +72,7 @@ public class ChargeController : ControllerBase
/// </summary>
/// <returns>仓位实时功率列表</returns>
[HttpPost]
[Route("/api/ChrgMonitor/GetBinPowers")]
[Route("GetBinPowers")]
public Result<float[]> GetBinPowers()
{
float[] results = ClientMgr.Dictionary.Values
@ -87,7 +87,7 @@ public class ChargeController : ControllerBase
/// <param name="binNo">仓号</param>
/// <returns></returns>
[HttpGet]
[Route("/api/ChrgMonitor/StartChargeByBinNo/{binNo}")]
[Route("StartChargeByBinNo/{binNo}")]
public Result<bool> StartChargeByBinNo(string binNo)
{
return _chargerService.StartChargeByBinNo(binNo);
@ -99,7 +99,7 @@ public class ChargeController : ControllerBase
/// <param name="binNo">仓号</param>
/// <returns></returns>
[HttpGet]
[Route("/api/ChrgMonitor/StopChargeByBinNo/{binNo}")]
[Route("StopChargeByBinNo/{binNo}")]
public Result<bool> StopChargeByBinNo(string binNo)
{
return _chargerService.StartChargeByBinNo(binNo);

Loading…
Cancel
Save