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