|
|
using Entity.Api.Req;
|
|
|
using Entity.DbModel.Station;
|
|
|
using HybirdFrameworkCore.Entity;
|
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
using Service.Station;
|
|
|
|
|
|
namespace WebStarter.Controllers;
|
|
|
|
|
|
/// <summary>
|
|
|
/// 换电设备报警
|
|
|
/// </summary>
|
|
|
[ApiController]
|
|
|
[Route("api/[controller]")]
|
|
|
public class EquipAlarmRecordController : ControllerBase
|
|
|
{
|
|
|
private readonly EquipAlarmRecordService equipAlarmRecordService;
|
|
|
|
|
|
public EquipAlarmRecordController(EquipAlarmRecordService equipAlarmRecordService)
|
|
|
{
|
|
|
this.equipAlarmRecordService = equipAlarmRecordService;
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 查询未处理报警列表
|
|
|
/// </summary>
|
|
|
/// <param name="typeCode">设备类型:-1-查询全部;0-充电机;1-电表;2-水冷机;3-plc<</param>
|
|
|
/// <param name="equipCode">设备编码</param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("QueryEquipAlarmPage")]
|
|
|
public Result<PageResult<EquipAlarmRecord>> QueryEquipAlarmPage([FromBody] QueryAlarmReq req)
|
|
|
{
|
|
|
return equipAlarmRecordService.QueryEquipAlarmPage(req);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 导出未处理报警
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[Route("ExportEquipAlarmRecord")]
|
|
|
public async Task<IActionResult> ExportEquipAlarmRecord()
|
|
|
{
|
|
|
return await equipAlarmRecordService.ExportEquipAlarmRecord();
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// 查询已处理报警列表
|
|
|
/// </summary>
|
|
|
/// <param name="typeCode">设备类型:-1-查询全部;0-充电机;1-电表;2-水冷机;3-plc</param>
|
|
|
/// <param name="equipCode">设备编码</param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost("QueryEquipAlarmProcessPage")]
|
|
|
public Result<PageResult<EquipAlarmProcessRecord>> QueryEquipAlarmProcessPage([FromBody] QueryAlarmReq req)
|
|
|
{
|
|
|
return equipAlarmRecordService.QueryEquipAlarmProcessPage(req);
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
/// 导出已处理报警
|
|
|
/// </summary>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[Route("ExportEquipAlarmProcessRecord")]
|
|
|
public async Task<IActionResult> ExportEquipAlarmProcessRecord()
|
|
|
{
|
|
|
return await equipAlarmRecordService.ExportEquipAlarmProcessRecord();
|
|
|
}
|
|
|
}
|