充电服务接口调整

master
smartwyy 6 months ago
parent 9ca5b244f3
commit 926f5655d1

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

Loading…
Cancel
Save