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.

71 lines
1.8 KiB

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 EquipNetInfoController
{
private readonly EquipNetInfoService _equipNetInfoService;
/// <summary>
/// 设备通信信息表
/// </summary>
/// <param name="equipNetInfoService"></param>
public EquipNetInfoController(EquipNetInfoService equipNetInfoService)
{
_equipNetInfoService = equipNetInfoService;
}
/// <summary>
/// 设备通信分页列表
/// </summary>
/// <param name="input"></param>
/// <returns></returns>
[HttpPost]
[Route("page")]
public async Task<Result<PageResult<EquipNetInfo>>> Page(PageEquipNetInfoReq input)
{
return Result<PageResult<EquipNetInfo>>.Success(await _equipNetInfoService.Page(input));
}
/// <summary>
/// 设备通信增加
/// </summary>
/// <param name="input"></param>
[HttpPost]
[Route("add")]
6 months ago
public async Task<Result<string>> Add(AddEquipNetInfoReq input)
{
6 months ago
return await _equipNetInfoService.AddEquipNetInfo(input);
}
/// <summary>
/// 设备通信修改
/// </summary>
/// <param name="input"></param>
[HttpPost]
[Route("update")]
6 months ago
public async Task<Result<string>> Update(UpdateEquipNetInfoReq input)
{
6 months ago
return await _equipNetInfoService.UpdateEquipNetInfo(input);
}
/// <summary>
/// 设备通信修改删除
/// </summary>
/// <param name="input"></param>
[HttpPost]
[Route("delete")]
6 months ago
public async Task<Result<string>> Delete(DeleteEquipNetInfoReq input)
{
6 months ago
return await _equipNetInfoService.DeleteEquipNetInfo(input);
}
}