|
|
|
|
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")]
|
|
|
|
|
public async Task<Result<string>> Add(AddEquipInfoReq input)
|
|
|
|
|
{
|
|
|
|
|
return await _equipInfoService.AddEquipInfo(input);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设备信息修改
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("update")]
|
|
|
|
|
public async Task<Result<string>> Update(UpdateEquipInfoReq input)
|
|
|
|
|
{
|
|
|
|
|
return await _equipInfoService.UpdateEquipInfo(input);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设备信息修改删除
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("delete")]
|
|
|
|
|
public async Task<Result<string>> Delete(DeleteEquipInfoReq input)
|
|
|
|
|
{
|
|
|
|
|
return await _equipInfoService.DeleteEquipInfo(input);
|
|
|
|
|
}
|
|
|
|
|
}
|