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.

58 lines
2.0 KiB

using Entity.Api.Req;
using Entity.Api.Resp;
using Entity.DbModel.Station;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.Station;
namespace WebStarter.Controllers
{
/// <summary>
/// 换电站日运行统计结果
/// </summary>
[ApiController]
[Route("api/[controller]")]
public class ExStationDayRunResultController : ControllerBase
{
private readonly ExStationDayRunResultService _exStationDayRunResultService;
public ExStationDayRunResultController(ExStationDayRunResultService exStationDayRunResultService)
{
_exStationDayRunResultService = exStationDayRunResultService;
}
/// <summary>
/// 展示换电站日运行统计结果
/// </summary>
/// <returns></returns>
[HttpPost("GetExStationDaySwapRunRes")]
public async Task<Result<PageResult<ExchangeStationDayRunResult>>> GetExStationDaySwapRunRes([FromBody] QueryPageModel queryPageModel)
{
return Result<PageResult<ExchangeStationDayRunResult>>.Success(await _exStationDayRunResultService.ExStationDaySwapRunRes(queryPageModel));
}
/// <summary>
/// 删除换电站日运行统计结果
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
[HttpPost("DeleteDaySwapRunRes/{id}")]
public async Task<Result<bool>> DeleteDaySwapRunRes(int id)
{
return Result<bool>.Success(await _exStationDayRunResultService.DeleteDaySwapRunRes(id));
}
/// <summary>
/// 批量删除换电站日运行统计结果
/// </summary>
/// <param name="ids"></param>
/// <returns></returns>
[HttpPost("BatchDeleteDaySwapRunRes")]
public async Task<Result<bool>> BatchDeleteDaySwapRunRes(List<int> ids)
{
return Result<bool>.Success(await _exStationDayRunResultService.BatchDeleteDaySwapRunRes(ids));
}
}
}