andon项目
This commit is contained in:
@@ -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-10
|
||||
namespace ZR.Admin.WebApi.Controllers.andon
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警联系人表
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("mes/AndonAlarmContact")]
|
||||
public class AndonAlarmContactController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警联系人表接口
|
||||
/// </summary>
|
||||
private readonly IAndonAlarmContactService _AndonAlarmContactService;
|
||||
|
||||
public AndonAlarmContactController(IAndonAlarmContactService AndonAlarmContactService)
|
||||
{
|
||||
_AndonAlarmContactService = AndonAlarmContactService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询报警联系人表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmcontact:list")]
|
||||
public IActionResult QueryAndonAlarmContact([FromQuery] AndonAlarmContactQueryDto parm)
|
||||
{
|
||||
var response = _AndonAlarmContactService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询报警联系人表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmcontact:query")]
|
||||
public IActionResult GetAndonAlarmContact(int Id)
|
||||
{
|
||||
var response = _AndonAlarmContactService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<AndonAlarmContact>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加报警联系人表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmcontact:add")]
|
||||
[Log(Title = "报警联系人表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddAndonAlarmContact([FromBody] AndonAlarmContactDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmContact>().ToCreate(HttpContext);
|
||||
|
||||
var response = _AndonAlarmContactService.AddAndonAlarmContact(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新报警联系人表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmcontact:edit")]
|
||||
[Log(Title = "报警联系人表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateAndonAlarmContact([FromBody] AndonAlarmContactDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmContact>().ToUpdate(HttpContext);
|
||||
var response = _AndonAlarmContactService.UpdateAndonAlarmContact(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除报警联系人表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmcontact:delete")]
|
||||
[Log(Title = "报警联系人表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteAndonAlarmContact(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _AndonAlarmContactService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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-10
|
||||
namespace ZR.Admin.WebApi.Controllers.andon
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警等级表
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("mes/AndonAlarmLevel")]
|
||||
public class AndonAlarmLevelController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警等级表接口
|
||||
/// </summary>
|
||||
private readonly IAndonAlarmLevelService _AndonAlarmLevelService;
|
||||
|
||||
public AndonAlarmLevelController(IAndonAlarmLevelService AndonAlarmLevelService)
|
||||
{
|
||||
_AndonAlarmLevelService = AndonAlarmLevelService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询报警等级表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmlevel:list")]
|
||||
public IActionResult QueryAndonAlarmLevel([FromQuery] AndonAlarmLevelQueryDto parm)
|
||||
{
|
||||
var response = _AndonAlarmLevelService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询报警等级表详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmlevel:query")]
|
||||
public IActionResult GetAndonAlarmLevel(int Id)
|
||||
{
|
||||
var response = _AndonAlarmLevelService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<AndonAlarmLevel>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加报警等级表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmlevel:add")]
|
||||
[Log(Title = "报警等级表", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddAndonAlarmLevel([FromBody] AndonAlarmLevelDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmLevel>().ToCreate(HttpContext);
|
||||
|
||||
var response = _AndonAlarmLevelService.AddAndonAlarmLevel(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新报警等级表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmlevel:edit")]
|
||||
[Log(Title = "报警等级表", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateAndonAlarmLevel([FromBody] AndonAlarmLevelDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmLevel>().ToUpdate(HttpContext);
|
||||
var response = _AndonAlarmLevelService.UpdateAndonAlarmLevel(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除报警等级表
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmlevel:delete")]
|
||||
[Log(Title = "报警等级表", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteAndonAlarmLevel(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _AndonAlarmLevelService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
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-10
|
||||
namespace ZR.Admin.WebApi.Controllers.andon
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警记录
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("mes/AndonAlarmRecord")]
|
||||
public class AndonAlarmRecordController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警记录接口
|
||||
/// </summary>
|
||||
private readonly IAndonAlarmRecordService _AndonAlarmRecordService;
|
||||
|
||||
public AndonAlarmRecordController(IAndonAlarmRecordService AndonAlarmRecordService)
|
||||
{
|
||||
_AndonAlarmRecordService = AndonAlarmRecordService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询报警记录列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmrecord:list")]
|
||||
public IActionResult QueryAndonAlarmRecord([FromQuery] AndonAlarmRecordQueryDto parm)
|
||||
{
|
||||
var response = _AndonAlarmRecordService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询报警记录详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmrecord:query")]
|
||||
public IActionResult GetAndonAlarmRecord(int Id)
|
||||
{
|
||||
var response = _AndonAlarmRecordService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<AndonAlarmRecord>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加报警记录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmrecord:add")]
|
||||
[Log(Title = "报警记录", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddAndonAlarmRecord([FromBody] AndonAlarmRecordDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmRecord>().ToCreate(HttpContext);
|
||||
|
||||
var response = _AndonAlarmRecordService.AddAndonAlarmRecord(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新报警记录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmrecord:edit")]
|
||||
[Log(Title = "报警记录", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateAndonAlarmRecord([FromBody] AndonAlarmRecordDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmRecord>().ToUpdate(HttpContext);
|
||||
var response = _AndonAlarmRecordService.UpdateAndonAlarmRecord(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除报警记录
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmrecord:delete")]
|
||||
[Log(Title = "报警记录", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteAndonAlarmRecord(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _AndonAlarmRecordService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -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-10
|
||||
namespace ZR.Admin.WebApi.Controllers.andon
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警类型字典
|
||||
/// </summary>
|
||||
[Verify]
|
||||
[Route("mes/AndonAlarmTypeDict")]
|
||||
public class AndonAlarmTypeDictController : BaseController
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警类型字典接口
|
||||
/// </summary>
|
||||
private readonly IAndonAlarmTypeDictService _AndonAlarmTypeDictService;
|
||||
|
||||
public AndonAlarmTypeDictController(IAndonAlarmTypeDictService AndonAlarmTypeDictService)
|
||||
{
|
||||
_AndonAlarmTypeDictService = AndonAlarmTypeDictService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询报警类型字典列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("list")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmtypedict:list")]
|
||||
public IActionResult QueryAndonAlarmTypeDict([FromQuery] AndonAlarmTypeDictQueryDto parm)
|
||||
{
|
||||
var response = _AndonAlarmTypeDictService.GetList(parm);
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 查询报警类型字典详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{Id}")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmtypedict:query")]
|
||||
public IActionResult GetAndonAlarmTypeDict(int Id)
|
||||
{
|
||||
var response = _AndonAlarmTypeDictService.GetInfo(Id);
|
||||
|
||||
var info = response.Adapt<AndonAlarmTypeDict>();
|
||||
return SUCCESS(info);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加报警类型字典
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmtypedict:add")]
|
||||
[Log(Title = "报警类型字典", BusinessType = BusinessType.INSERT)]
|
||||
public IActionResult AddAndonAlarmTypeDict([FromBody] AndonAlarmTypeDictDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmTypeDict>().ToCreate(HttpContext);
|
||||
|
||||
var response = _AndonAlarmTypeDictService.AddAndonAlarmTypeDict(modal);
|
||||
|
||||
return SUCCESS(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新报警类型字典
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPut]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmtypedict:edit")]
|
||||
[Log(Title = "报警类型字典", BusinessType = BusinessType.UPDATE)]
|
||||
public IActionResult UpdateAndonAlarmTypeDict([FromBody] AndonAlarmTypeDictDto parm)
|
||||
{
|
||||
var modal = parm.Adapt<AndonAlarmTypeDict>().ToUpdate(HttpContext);
|
||||
var response = _AndonAlarmTypeDictService.UpdateAndonAlarmTypeDict(modal);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除报警类型字典
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{ids}")]
|
||||
[ActionPermissionFilter(Permission = "business:andonalarmtypedict:delete")]
|
||||
[Log(Title = "报警类型字典", BusinessType = BusinessType.DELETE)]
|
||||
public IActionResult DeleteAndonAlarmTypeDict(string ids)
|
||||
{
|
||||
int[] idsArr = Tools.SpitIntArrary(ids);
|
||||
if (idsArr.Length <= 0) { return ToResponse(ApiResult.Error($"删除失败Id 不能为空")); }
|
||||
|
||||
var response = _AndonAlarmTypeDictService.Delete(idsArr);
|
||||
|
||||
return ToResponse(response);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user