diff --git a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmContactController.cs b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmContactController.cs
index 8c7066b0..159d0858 100644
--- a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmContactController.cs
+++ b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmContactController.cs
@@ -11,8 +11,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
///
/// 报警联系人表
///
- [Verify]
[Route("mes/AndonAlarmContact")]
+ [AllowAnonymous]
public class AndonAlarmContactController : BaseController
{
///
diff --git a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmLevelController.cs b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmLevelController.cs
index 6fa448a6..1925cffe 100644
--- a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmLevelController.cs
+++ b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmLevelController.cs
@@ -11,8 +11,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
///
/// 报警等级表
///
- [Verify]
[Route("mes/AndonAlarmLevel")]
+ [AllowAnonymous]
public class AndonAlarmLevelController : BaseController
{
///
diff --git a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmRecordController.cs b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmRecordController.cs
index 3a3a2557..50d0bd44 100644
--- a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmRecordController.cs
+++ b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmRecordController.cs
@@ -10,8 +10,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
///
/// 报警记录
///
- [Verify]
[Route("mes/AndonAlarmRecord")]
+ [AllowAnonymous]
public class AndonAlarmRecordController : BaseController
{
///
diff --git a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmTypeDictController.cs b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmTypeDictController.cs
index 92e100b0..94340e97 100644
--- a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmTypeDictController.cs
+++ b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmTypeDictController.cs
@@ -11,8 +11,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
///
/// 报警类型字典
///
- [Verify]
[Route("mes/AndonAlarmTypeDict")]
+ [AllowAnonymous]
public class AndonAlarmTypeDictController : BaseController
{
///
@@ -102,7 +102,16 @@ namespace ZR.Admin.WebApi.Controllers.andon
return ToResponse(response);
}
-
+ ///
+ /// 查询报警类型下拉列表
+ ///
+ ///
+ [HttpGet("getPullDown")]
+ public ApiResult getPullDown()
+ {
+ var response = _AndonAlarmTypeDictService.getPullDown();
+ return response;
+ }
}
diff --git a/ZR.Model/MES/andon/Dto/AndonAlarmTypeDictDto.cs b/ZR.Model/MES/andon/Dto/AndonAlarmTypeDictDto.cs
index 7f14c6d3..2700dfe7 100644
--- a/ZR.Model/MES/andon/Dto/AndonAlarmTypeDictDto.cs
+++ b/ZR.Model/MES/andon/Dto/AndonAlarmTypeDictDto.cs
@@ -32,4 +32,10 @@ namespace ZR.Model.MES.andon.Dto
}
+
+ public class AlarmTypePullDownDto
+ {
+ public string label { get; set; }
+ public string value { get; set; }
+ }
}
\ No newline at end of file
diff --git a/ZR.Service/mes/andon/AndonAlarmTypeDictService.cs b/ZR.Service/mes/andon/AndonAlarmTypeDictService.cs
index 0bbae703..69313b72 100644
--- a/ZR.Service/mes/andon/AndonAlarmTypeDictService.cs
+++ b/ZR.Service/mes/andon/AndonAlarmTypeDictService.cs
@@ -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);
+ }
+ }
}
}
\ No newline at end of file
diff --git a/ZR.Service/mes/andon/IService/IAndonAlarmTypeDictService.cs b/ZR.Service/mes/andon/IService/IAndonAlarmTypeDictService.cs
index 78128231..59fcfa6e 100644
--- a/ZR.Service/mes/andon/IService/IAndonAlarmTypeDictService.cs
+++ b/ZR.Service/mes/andon/IService/IAndonAlarmTypeDictService.cs
@@ -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();
}
}