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.

72 lines
1.8 KiB

using Entity.DbModel.Station;
using Entity.Dto.Req;
using Entity.Dto.Resp;
using HybirdFrameworkCore.Entity;
using Microsoft.AspNetCore.Mvc;
using Service.Station;
namespace WebStarter.Controllers;
/// <summary>
/// 设备信息表
/// </summary>
[ApiController]
[Route("api/[controller]")]
public class EquipInfoController
{
private readonly EquipInfoService _equipInfoService;
/// <summary>
/// 设备信息表
/// </summary>
/// <param name="equipInfoService"></param>
public EquipInfoController(EquipInfoService equipInfoService)
{
_equipInfoService = equipInfoService;
}
/// <summary>
/// 设备信息分页列表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("page")]
public async Task<Result<PageResult<EquipInfoResp>>> Page(PageEquipInfoReq input)
{
return Result<PageResult<EquipInfoResp>>.Success(await _equipInfoService.Page(input));
}
/// <summary>
/// 设备信息增加
/// </summary>
/// <param name="input"></param>
[HttpPost]
[Route("add")]
6 months ago
public async Task<Result<string>> Add(AddEquipInfoReq input)
{
6 months ago
return await _equipInfoService.AddEquipInfo(input);
}
/// <summary>
/// 设备信息修改
/// </summary>
/// <param name="input"></param>
[HttpPost]
[Route("update")]
6 months ago
public async Task<Result<string>> Update(UpdateEquipInfoReq input)
{
6 months ago
return await _equipInfoService.UpdateEquipInfo(input);
}
/// <summary>
/// 设备信息修改删除
/// </summary>
/// <param name="input"></param>
[HttpPost]
[Route("delete")]
6 months ago
public async Task<Result<string>> Delete(DeleteEquipInfoReq input)
{
6 months ago
return await _equipInfoService.DeleteEquipInfo(input);
}
}