|
|
|
@ -0,0 +1,52 @@
|
|
|
|
|
using System.ComponentModel.DataAnnotations;
|
|
|
|
|
using Entity.DbModel.Station;
|
|
|
|
|
using Entity.Dto.Req;
|
|
|
|
|
using HybirdFrameworkCore.Entity;
|
|
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
|
using Service.Station;
|
|
|
|
|
|
|
|
|
|
namespace WebStarter.Controllers;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 电池运营模型
|
|
|
|
|
/// </summary>
|
|
|
|
|
[ApiController]
|
|
|
|
|
[Route("api/[controller]")]
|
|
|
|
|
public class BatteryOpModelDetailController
|
|
|
|
|
{
|
|
|
|
|
private readonly BatteryOpModelDetailService _batteryOpModelDetailService;
|
|
|
|
|
|
|
|
|
|
public BatteryOpModelDetailController(BatteryOpModelDetailService batteryOpModelService)
|
|
|
|
|
{
|
|
|
|
|
_batteryOpModelDetailService = batteryOpModelService;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 获取电池运营模型分页列表
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("page")]
|
|
|
|
|
public async Task<PageResult<BatteryOpModelDetail>> BatteryOpModelPageList(
|
|
|
|
|
[FromBody] PageBatteryOpModelDetailReq input)
|
|
|
|
|
{
|
|
|
|
|
return await _batteryOpModelDetailService.Page(input);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 删除电池运营模型
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("delete")]
|
|
|
|
|
public async Task<Result<bool>> DeleteBatteryOpModel([FromBody] [Required] DeleteBatteryOpModelDetailReq input)
|
|
|
|
|
{
|
|
|
|
|
var data = await _batteryOpModelDetailService.DeleteBatteryOpModelDetail(input);
|
|
|
|
|
if (data)
|
|
|
|
|
return Result<bool>.Success(data);
|
|
|
|
|
else
|
|
|
|
|
return Result<bool>.Fail(data);
|
|
|
|
|
}
|
|
|
|
|
}
|