报警等级

This commit is contained in:
quowingwang 2025-12-10 15:31:37 +08:00
parent 7ccc4eeb68
commit 467f71a150
7 changed files with 41 additions and 6 deletions

View File

@ -11,8 +11,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
/// <summary>
/// 报警联系人表
/// </summary>
[Verify]
[Route("mes/AndonAlarmContact")]
[AllowAnonymous]
public class AndonAlarmContactController : BaseController
{
/// <summary>

View File

@ -11,8 +11,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
/// <summary>
/// 报警等级表
/// </summary>
[Verify]
[Route("mes/AndonAlarmLevel")]
[AllowAnonymous]
public class AndonAlarmLevelController : BaseController
{
/// <summary>

View File

@ -10,8 +10,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
/// <summary>
/// 报警记录
/// </summary>
[Verify]
[Route("mes/AndonAlarmRecord")]
[AllowAnonymous]
public class AndonAlarmRecordController : BaseController
{
/// <summary>

View File

@ -11,8 +11,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
/// <summary>
/// 报警类型字典
/// </summary>
[Verify]
[Route("mes/AndonAlarmTypeDict")]
[AllowAnonymous]
public class AndonAlarmTypeDictController : BaseController
{
/// <summary>
@ -102,7 +102,16 @@ namespace ZR.Admin.WebApi.Controllers.andon
return ToResponse(response);
}
/// <summary>
/// 查询报警类型下拉列表
/// </summary>
/// <returns></returns>
[HttpGet("getPullDown")]
public ApiResult getPullDown()
{
var response = _AndonAlarmTypeDictService.getPullDown();
return response;
}
}

View File

@ -32,4 +32,10 @@ namespace ZR.Model.MES.andon.Dto
}
public class AlarmTypePullDownDto
{
public string label { get; set; }
public string value { get; set; }
}
}

View File

@ -1,5 +1,7 @@
using Infrastructure.Attribute;
using Infrastructure.Model;
using SqlSugar;
using System;
using ZR.Model;
using ZR.Model.MES.andon;
using ZR.Model.MES.andon.Dto;
@ -76,5 +78,22 @@ namespace ZR.Service.mes.andon
return Update(model, true);
}
public ApiResult getPullDown()
{
try
{
var response = Queryable()
.Select(it => new AlarmTypePullDownDto
{
label = it.TypeCode,
value = it.TypeName
}).ToList();
return ApiResult.Success("成功", response);
}
catch (Exception ex)
{
return ApiResult.Error(ex.Message);
}
}
}
}

View File

@ -3,6 +3,7 @@ using ZR.Model;
using System.Collections.Generic;
using ZR.Model.MES.andon;
using ZR.Model.MES.andon.Dto;
using Infrastructure.Model;
namespace ZR.Service.mes.andon.Iservice
{
@ -18,6 +19,6 @@ namespace ZR.Service.mes.andon.Iservice
AndonAlarmTypeDict AddAndonAlarmTypeDict(AndonAlarmTypeDict parm);
int UpdateAndonAlarmTypeDict(AndonAlarmTypeDict parm);
ApiResult getPullDown();
}
}