You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

71 lines
1.9 KiB

5 months ago
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.Cloud.Client;
5 months ago
using Service.Cloud.Msg.Host.Req.OutCharger;
5 months ago
using Service.Cloud.Msg.Host.Resp.OutCharger;
5 months ago
using Service.Execute.Api;
5 months ago
using Service.Init;
namespace WebStarter.Controllers;
/// <summary>
/// 站外充电机管理
/// </summary>
[Produces("application/json")]
[ApiController]
[Route("api/[controller]")]
public class OutChargerController
{
/// <summary>
/// 9.2.1.2 站控应答开始充电操作
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("ResStartOutCharger")]
public Result<bool> ResStartOutCharger([FromBody] PileStartChargeResp req)
{
CloudClientMgr.CloudClient?.Publish(req);
return Result<bool>.Success(true);
}
/// <summary>
/// 9.2.1.8 站控响应充电枪停止充电操作
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("ResStopOutCharger")]
public Result<bool> ResStopOutCharger([FromBody] PileStopChargeResp req)
{
CloudClientMgr.CloudClient?.Publish(req);
return Result<bool>.Success(true);
}
5 months ago
/// <summary>
/// 9.2.1.3 站控上报充电枪充电结束事件
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("SendPileEndCharge")]
public Result<bool> SendPileEndCharge([FromBody] PileEndCharge req)
{
CloudApi.SendPileEndCharge(req);
return Result<bool>.Success(true);
}
/// <summary>
/// 9.2.1.7 站控上报充电枪充电遥测数据
/// </summary>
/// <param name="req"></param>
/// <returns></returns>
[HttpPost]
[Route("SendPileChargeRealtime")]
public Result<bool> SendPileChargeRealtime([FromBody] PileChargeRealtime req)
{
CloudApi.SendPileChargeRealtime(req);
return Result<bool>.Success(true);
}
5 months ago
}