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.

141 lines
3.4 KiB

using Entity.Api.Req;
using Entity.Api.Resp;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
namespace WebStarter.Controllers;
/// <summary>
/// 换电大屏
/// </summary>
[ApiController]
[Route("api/[controller]")]
public class SwapMonitorController : ControllerBase
{
/// <summary>
/// 首页换电状态信息
/// </summary>
/// <returns></returns>
[HttpPost("GetSwapMonitorData")]
public async Task<Result<SwapMonitorScreenResp>> GetSwapMonitorData()
{
return Result<SwapMonitorScreenResp>.Success(null);
}
/// <summary>
/// 获取充电监控大屏 充电次数 每五分钟获取一次
/// </summary>
[HttpPost("GetSwapAndChargingCount")]
public async Task<Result<SwapAndChargingCountResp>> SwapAndChargingCount()
{
return Result<SwapAndChargingCountResp>.Success(null);
}
/// <summary>
/// 锁清零
/// </summary>
/// <returns></returns>
[HttpPost("LockReset")]
public async Task<Result<bool>> LockReset()
{
return Result<bool>.Success(true);
}
/// <summary>
/// 设置换电模式。1:远程换电带有云平台2:本地换电
/// </summary>
[HttpPost("SetSwapModel/{swapModel}")]
public async Task<Result<bool>> SetSwapModel(int swapModel)
{
return Result<bool>.Success();
}
/// <summary>
/// 获取换电模式。1:远程换电带有云平台2:本地换电
/// </summary>
[HttpPost("GetStationSwapModel")]
public async Task<Result<int>> GetStationSwapModel()
{
return Result<int>.Success(1);
}
/// <summary>
/// 设置换电方式信息。1:无感换电;2:本地按钮;3:云平台确认
/// </summary>
[HttpPost("SetSwapWay/{swapWay}")]
public async Task<Result<bool>> SetSwapWay(int stationSwapWay)
{
return Result<bool>.Success();
}
/// <summary>
/// 获取换电方式信息。1:无感换电;2:本地按钮;3:云平台确认
/// </summary>
[HttpPost("GetSwapWay")]
public async Task<Result<int>> GetSwapWay()
{
return Result<int>.Success();
}
/// <summary>
/// 换电复位
/// </summary>
[HttpPost("SwapReset")]
public async Task<Result<bool>> SwapReset()
{
return Result<bool>.Success();
}
/// <summary>
/// 红绿灯操控
/// </summary>
/// <param name="lampCmd"></param>
/// <returns></returns>
[HttpPost("OperateOutstationLamp")]
public async Task<Result<bool>>OperateOutstationLamp(ushort lampCmd)
{
return Result<bool>.Success(true);
}
/// <summary>
/// 换电大屏 换电成功 按钮 status :1成功 2失败
/// </summary>
/// <param name="swapNo"></param>
/// <returns></returns>
[HttpGet("ManualSwapStatus/{swapNo}/{status}")]
public async Task<Result<bool>> ManualChangeSuccess(string swapNo,int status)
{
return Result<bool>.Success();
}
/// <summary>
/// 切换成 手动换电
/// </summary>
[HttpPost("ManualSwapping")]
public Result<bool> ManualSwapping()
{
return Result<bool>.Success();
}
/// <summary>
/// 切换成 自动换电
/// </summary>
[HttpPost("AutoSwapping")]
public Result<bool> AutoSwapping(){
return Result<bool>.Success();
}
}