|
|
|
|
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")]
|
|
|
|
|
public async Task<Result<string>> Add(AddEquipNetInfoReq input)
|
|
|
|
|
{
|
|
|
|
|
return await _equipNetInfoService.AddEquipNetInfo(input);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设备通信修改
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("update")]
|
|
|
|
|
public async Task<Result<string>> Update(UpdateEquipNetInfoReq input)
|
|
|
|
|
{
|
|
|
|
|
return await _equipNetInfoService.UpdateEquipNetInfo(input);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 设备通信修改删除
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="input"></param>
|
|
|
|
|
[HttpPost]
|
|
|
|
|
[Route("delete")]
|
|
|
|
|
public async Task<Result<string>> Delete(DeleteEquipNetInfoReq input)
|
|
|
|
|
{
|
|
|
|
|
return await _equipNetInfoService.DeleteEquipNetInfo(input);
|
|
|
|
|
}
|
|
|
|
|
}
|