报警等级
This commit is contained in:
@@ -11,8 +11,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 报警联系人表
|
/// 报警联系人表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Verify]
|
|
||||||
[Route("mes/AndonAlarmContact")]
|
[Route("mes/AndonAlarmContact")]
|
||||||
|
[AllowAnonymous]
|
||||||
public class AndonAlarmContactController : BaseController
|
public class AndonAlarmContactController : BaseController
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 报警等级表
|
/// 报警等级表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Verify]
|
|
||||||
[Route("mes/AndonAlarmLevel")]
|
[Route("mes/AndonAlarmLevel")]
|
||||||
|
[AllowAnonymous]
|
||||||
public class AndonAlarmLevelController : BaseController
|
public class AndonAlarmLevelController : BaseController
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 报警记录
|
/// 报警记录
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Verify]
|
|
||||||
[Route("mes/AndonAlarmRecord")]
|
[Route("mes/AndonAlarmRecord")]
|
||||||
|
[AllowAnonymous]
|
||||||
public class AndonAlarmRecordController : BaseController
|
public class AndonAlarmRecordController : BaseController
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ namespace ZR.Admin.WebApi.Controllers.andon
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// 报警类型字典
|
/// 报警类型字典
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Verify]
|
|
||||||
[Route("mes/AndonAlarmTypeDict")]
|
[Route("mes/AndonAlarmTypeDict")]
|
||||||
|
[AllowAnonymous]
|
||||||
public class AndonAlarmTypeDictController : BaseController
|
public class AndonAlarmTypeDictController : BaseController
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -102,7 +102,16 @@ namespace ZR.Admin.WebApi.Controllers.andon
|
|||||||
return ToResponse(response);
|
return ToResponse(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 查询报警类型下拉列表
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("getPullDown")]
|
||||||
|
public ApiResult getPullDown()
|
||||||
|
{
|
||||||
|
var response = _AndonAlarmTypeDictService.getPullDown();
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,4 +32,10 @@ namespace ZR.Model.MES.andon.Dto
|
|||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class AlarmTypePullDownDto
|
||||||
|
{
|
||||||
|
public string label { get; set; }
|
||||||
|
public string value { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
using Infrastructure.Attribute;
|
using Infrastructure.Attribute;
|
||||||
|
using Infrastructure.Model;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
using ZR.Model;
|
using ZR.Model;
|
||||||
using ZR.Model.MES.andon;
|
using ZR.Model.MES.andon;
|
||||||
using ZR.Model.MES.andon.Dto;
|
using ZR.Model.MES.andon.Dto;
|
||||||
@@ -76,5 +78,22 @@ namespace ZR.Service.mes.andon
|
|||||||
return Update(model, true);
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3,6 +3,7 @@ using ZR.Model;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using ZR.Model.MES.andon;
|
using ZR.Model.MES.andon;
|
||||||
using ZR.Model.MES.andon.Dto;
|
using ZR.Model.MES.andon.Dto;
|
||||||
|
using Infrastructure.Model;
|
||||||
|
|
||||||
namespace ZR.Service.mes.andon.Iservice
|
namespace ZR.Service.mes.andon.Iservice
|
||||||
{
|
{
|
||||||
@@ -18,6 +19,6 @@ namespace ZR.Service.mes.andon.Iservice
|
|||||||
AndonAlarmTypeDict AddAndonAlarmTypeDict(AndonAlarmTypeDict parm);
|
AndonAlarmTypeDict AddAndonAlarmTypeDict(AndonAlarmTypeDict parm);
|
||||||
|
|
||||||
int UpdateAndonAlarmTypeDict(AndonAlarmTypeDict parm);
|
int UpdateAndonAlarmTypeDict(AndonAlarmTypeDict parm);
|
||||||
|
ApiResult getPullDown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user