using Entity.Api.Req; using Entity.Api.Resp; using Entity.DbModel.Station; using HybirdFrameworkCore.Entity; using log4net; using Microsoft.AspNetCore.Mvc; using Repository.Station; using Service.Station; namespace WebStarter.Controllers; /// /// 报警数据编码 /// [ApiController] [Route("api/[controller]")] public class EquipAlarmDefineController: ControllerBase { private static readonly ILog Log = LogManager.GetLogger(typeof(EquipAlarmDefineController)); private readonly EquipAlarmDefineService equipAlarmDefineRepository; public EquipAlarmDefineController(EquipAlarmDefineService equipAlarmDefineRepository) { this.equipAlarmDefineRepository = equipAlarmDefineRepository; } /// /// 查询分页数据 /// /// [HttpPost("QueryPage")] public Result> QueryPage([FromBody] EquipAlarmDefineReq req) { return equipAlarmDefineRepository.QueryEquipAlarmPage(req); } /// /// 导出未处理报警 /// /// [HttpPost] [Route("ExportEquipAlarmRecord")] public async Task ExportEquipAlarmRecord(EquipAlarmDefineReq req) { return await equipAlarmDefineRepository.ExportEquipAlarmRecord(req); } /// /// 新增 /// /// [HttpPost("Add")] public async Task> Add([FromBody] EquipAlarmDefineReq req) { return await equipAlarmDefineRepository.Add(req); } /// /// 修改报警数据编码 /// /// /// [HttpPost("Modify")] public async Task> Modify([FromBody] EquipAlarmDefineReq req) { return await equipAlarmDefineRepository.Modify(req); } /// /// 删除 /// /// ids id列表 /// [HttpPost("DeleteByIds")] public async Task> DeleteByIds([FromBody] EquipAlarmDefineReq req) { return await equipAlarmDefineRepository.DeleteByIds(req); } /// /// 文件导入 /// /// 文件路径 [HttpPost("fileImport")] public string ImportDataFromExcel(string filePath) { return equipAlarmDefineRepository.ImportDataFromExcel(filePath); } }