报警记录处理过程
This commit is contained in:
@@ -4,14 +4,15 @@ using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Model.MES.andon;
|
||||
using ZR.Model.MES.andon.Dto;
|
||||
using ZR.Service.mes.andon.Iservice;
|
||||
//创建时间:2025-12-10
|
||||
|
||||
//创建时间:2025-12-11
|
||||
namespace ZR.Admin.WebApi.Controllers.andon
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警记录
|
||||
/// </summary>
|
||||
[Route("mes/AndonAlarmRecord")]
|
||||
[AllowAnonymous]
|
||||
[Verify]
|
||||
[Route("business/AndonAlarmRecord")]
|
||||
public class AndonAlarmRecordController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -0,0 +1,109 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using ZR.Admin.WebApi.Extensions;
|
||||
using ZR.Admin.WebApi.Filters;
|
||||
using ZR.Model.MES.andon;
|
||||
using ZR.Model.MES.andon.Dto;
|
||||
using ZR.Service.mes.andon.Iservice;
|
||||
|
||||
//创建时间:2025-12-11
|
||||
namespace ZR.Admin.WebApi.Controllers.andon
|
||||
{
|
||||
/// <summary>
|
||||
/// 安灯报警处理过程
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("business/AndonAlarmRecordProcess")]
|
||||
public class AndonAlarmRecordProcessController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 安灯报警处理过程接口
|
||||
/// </summary>
|
||||
private readonly IAndonAlarmRecordProcessService _AndonAlarmRecordProcessService;
|
||||
|
||||
public AndonAlarmRecordProcessController(IAndonAlarmRecordProcessService AndonAlarmRecordProcessService)
|
||||
{
|
||||
_AndonAlarmRecordProcessService = AndonAlarmRecordProcessService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询安灯报警处理过程列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmrecordprocess:list")]
|
||||
public IActionResult QueryAndonAlarmRecordProcess([FromQuery] AndonAlarmRecordProcessQueryDto parm)
|
||||
{
|
||||
var response = _AndonAlarmRecordProcessService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询安灯报警处理过程详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmrecordprocess:query")]
|
||||
public IActionResult GetAndonAlarmRecordProcess(int Id)
|
||||
{
|
||||
var response = _AndonAlarmRecordProcessService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<AndonAlarmRecordProcess>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加安灯报警处理过程
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmrecordprocess:add")]
|
||||
[Log(Title = "安灯报警处理过程", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddAndonAlarmRecordProcess([FromBody] AndonAlarmRecordProcessDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmRecordProcess>().ToCreate(HttpContext);
|
||||
|
||||
var response = _AndonAlarmRecordProcessService.AddAndonAlarmRecordProcess(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新安灯报警处理过程
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmrecordprocess:edit")]
|
||||
[Log(Title = "安灯报警处理过程", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateAndonAlarmRecordProcess([FromBody] AndonAlarmRecordProcessDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmRecordProcess>().ToUpdate(HttpContext);
|
||||
var response = _AndonAlarmRecordProcessService.UpdateAndonAlarmRecordProcess(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除安灯报警处理过程
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmrecordprocess:delete")]
|
||||
[Log(Title = "安灯报警处理过程", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteAndonAlarmRecordProcess(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _AndonAlarmRecordProcessService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user