diff --git a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmContactController.cs b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmContactController.cs
new file mode 100644
index 00000000..8c7066b0
--- /dev/null
+++ b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmContactController.cs
@@ -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
+{
+ ///
+ /// 报警联系人表
+ ///
+ [Verify]
+ [Route("mes/AndonAlarmContact")]
+ public class AndonAlarmContactController : BaseController
+ {
+ ///
+ /// 报警联系人表接口
+ ///
+ private readonly IAndonAlarmContactService _AndonAlarmContactService;
+
+ public AndonAlarmContactController(IAndonAlarmContactService AndonAlarmContactService)
+ {
+ _AndonAlarmContactService = AndonAlarmContactService;
+ }
+
+ ///
+ /// 查询报警联系人表列表
+ ///
+ ///
+ ///
+ [HttpGet("list")]
+ [ActionPermissionFilter(Permission = "business:andonalarmcontact:list")]
+ public IActionResult QueryAndonAlarmContact([FromQuery] AndonAlarmContactQueryDto parm)
+ {
+ var response = _AndonAlarmContactService.GetList(parm);
+ return SUCCESS(response);
+ }
+
+
+ ///
+ /// 查询报警联系人表详情
+ ///
+ ///
+ ///
+ [HttpGet("{Id}")]
+ [ActionPermissionFilter(Permission = "business:andonalarmcontact:query")]
+ public IActionResult GetAndonAlarmContact(int Id)
+ {
+ var response = _AndonAlarmContactService.GetInfo(Id);
+
+ var info = response.Adapt();
+ return SUCCESS(info);
+ }
+
+ ///
+ /// 添加报警联系人表
+ ///
+ ///
+ [HttpPost]
+ [ActionPermissionFilter(Permission = "business:andonalarmcontact:add")]
+ [Log(Title = "报警联系人表", BusinessType = BusinessType.INSERT)]
+ public IActionResult AddAndonAlarmContact([FromBody] AndonAlarmContactDto parm)
+ {
+ var modal = parm.Adapt().ToCreate(HttpContext);
+
+ var response = _AndonAlarmContactService.AddAndonAlarmContact(modal);
+
+ return SUCCESS(response);
+ }
+
+ ///
+ /// 更新报警联系人表
+ ///
+ ///
+ [HttpPut]
+ [ActionPermissionFilter(Permission = "business:andonalarmcontact:edit")]
+ [Log(Title = "报警联系人表", BusinessType = BusinessType.UPDATE)]
+ public IActionResult UpdateAndonAlarmContact([FromBody] AndonAlarmContactDto parm)
+ {
+ var modal = parm.Adapt().ToUpdate(HttpContext);
+ var response = _AndonAlarmContactService.UpdateAndonAlarmContact(modal);
+
+ return ToResponse(response);
+ }
+
+ ///
+ /// 删除报警联系人表
+ ///
+ ///
+ [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);
+ }
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmLevelController.cs b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmLevelController.cs
new file mode 100644
index 00000000..6fa448a6
--- /dev/null
+++ b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmLevelController.cs
@@ -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
+{
+ ///
+ /// 报警等级表
+ ///
+ [Verify]
+ [Route("mes/AndonAlarmLevel")]
+ public class AndonAlarmLevelController : BaseController
+ {
+ ///
+ /// 报警等级表接口
+ ///
+ private readonly IAndonAlarmLevelService _AndonAlarmLevelService;
+
+ public AndonAlarmLevelController(IAndonAlarmLevelService AndonAlarmLevelService)
+ {
+ _AndonAlarmLevelService = AndonAlarmLevelService;
+ }
+
+ ///
+ /// 查询报警等级表列表
+ ///
+ ///
+ ///
+ [HttpGet("list")]
+ [ActionPermissionFilter(Permission = "business:andonalarmlevel:list")]
+ public IActionResult QueryAndonAlarmLevel([FromQuery] AndonAlarmLevelQueryDto parm)
+ {
+ var response = _AndonAlarmLevelService.GetList(parm);
+ return SUCCESS(response);
+ }
+
+
+ ///
+ /// 查询报警等级表详情
+ ///
+ ///
+ ///
+ [HttpGet("{Id}")]
+ [ActionPermissionFilter(Permission = "business:andonalarmlevel:query")]
+ public IActionResult GetAndonAlarmLevel(int Id)
+ {
+ var response = _AndonAlarmLevelService.GetInfo(Id);
+
+ var info = response.Adapt();
+ return SUCCESS(info);
+ }
+
+ ///
+ /// 添加报警等级表
+ ///
+ ///
+ [HttpPost]
+ [ActionPermissionFilter(Permission = "business:andonalarmlevel:add")]
+ [Log(Title = "报警等级表", BusinessType = BusinessType.INSERT)]
+ public IActionResult AddAndonAlarmLevel([FromBody] AndonAlarmLevelDto parm)
+ {
+ var modal = parm.Adapt().ToCreate(HttpContext);
+
+ var response = _AndonAlarmLevelService.AddAndonAlarmLevel(modal);
+
+ return SUCCESS(response);
+ }
+
+ ///
+ /// 更新报警等级表
+ ///
+ ///
+ [HttpPut]
+ [ActionPermissionFilter(Permission = "business:andonalarmlevel:edit")]
+ [Log(Title = "报警等级表", BusinessType = BusinessType.UPDATE)]
+ public IActionResult UpdateAndonAlarmLevel([FromBody] AndonAlarmLevelDto parm)
+ {
+ var modal = parm.Adapt().ToUpdate(HttpContext);
+ var response = _AndonAlarmLevelService.UpdateAndonAlarmLevel(modal);
+
+ return ToResponse(response);
+ }
+
+ ///
+ /// 删除报警等级表
+ ///
+ ///
+ [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);
+ }
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmRecordController.cs b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmRecordController.cs
new file mode 100644
index 00000000..3a3a2557
--- /dev/null
+++ b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmRecordController.cs
@@ -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
+{
+ ///
+ /// 报警记录
+ ///
+ [Verify]
+ [Route("mes/AndonAlarmRecord")]
+ public class AndonAlarmRecordController : BaseController
+ {
+ ///
+ /// 报警记录接口
+ ///
+ private readonly IAndonAlarmRecordService _AndonAlarmRecordService;
+
+ public AndonAlarmRecordController(IAndonAlarmRecordService AndonAlarmRecordService)
+ {
+ _AndonAlarmRecordService = AndonAlarmRecordService;
+ }
+
+ ///
+ /// 查询报警记录列表
+ ///
+ ///
+ ///
+ [HttpGet("list")]
+ [ActionPermissionFilter(Permission = "business:andonalarmrecord:list")]
+ public IActionResult QueryAndonAlarmRecord([FromQuery] AndonAlarmRecordQueryDto parm)
+ {
+ var response = _AndonAlarmRecordService.GetList(parm);
+ return SUCCESS(response);
+ }
+
+
+ ///
+ /// 查询报警记录详情
+ ///
+ ///
+ ///
+ [HttpGet("{Id}")]
+ [ActionPermissionFilter(Permission = "business:andonalarmrecord:query")]
+ public IActionResult GetAndonAlarmRecord(int Id)
+ {
+ var response = _AndonAlarmRecordService.GetInfo(Id);
+
+ var info = response.Adapt();
+ return SUCCESS(info);
+ }
+
+ ///
+ /// 添加报警记录
+ ///
+ ///
+ [HttpPost]
+ [ActionPermissionFilter(Permission = "business:andonalarmrecord:add")]
+ [Log(Title = "报警记录", BusinessType = BusinessType.INSERT)]
+ public IActionResult AddAndonAlarmRecord([FromBody] AndonAlarmRecordDto parm)
+ {
+ var modal = parm.Adapt().ToCreate(HttpContext);
+
+ var response = _AndonAlarmRecordService.AddAndonAlarmRecord(modal);
+
+ return SUCCESS(response);
+ }
+
+ ///
+ /// 更新报警记录
+ ///
+ ///
+ [HttpPut]
+ [ActionPermissionFilter(Permission = "business:andonalarmrecord:edit")]
+ [Log(Title = "报警记录", BusinessType = BusinessType.UPDATE)]
+ public IActionResult UpdateAndonAlarmRecord([FromBody] AndonAlarmRecordDto parm)
+ {
+ var modal = parm.Adapt().ToUpdate(HttpContext);
+ var response = _AndonAlarmRecordService.UpdateAndonAlarmRecord(modal);
+
+ return ToResponse(response);
+ }
+
+ ///
+ /// 删除报警记录
+ ///
+ ///
+ [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);
+ }
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmTypeDictController.cs b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmTypeDictController.cs
new file mode 100644
index 00000000..92e100b0
--- /dev/null
+++ b/ZR.Admin.WebApi/Controllers/mes/andon/AndonAlarmTypeDictController.cs
@@ -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
+{
+ ///
+ /// 报警类型字典
+ ///
+ [Verify]
+ [Route("mes/AndonAlarmTypeDict")]
+ public class AndonAlarmTypeDictController : BaseController
+ {
+ ///
+ /// 报警类型字典接口
+ ///
+ private readonly IAndonAlarmTypeDictService _AndonAlarmTypeDictService;
+
+ public AndonAlarmTypeDictController(IAndonAlarmTypeDictService AndonAlarmTypeDictService)
+ {
+ _AndonAlarmTypeDictService = AndonAlarmTypeDictService;
+ }
+
+ ///
+ /// 查询报警类型字典列表
+ ///
+ ///
+ ///
+ [HttpGet("list")]
+ [ActionPermissionFilter(Permission = "business:andonalarmtypedict:list")]
+ public IActionResult QueryAndonAlarmTypeDict([FromQuery] AndonAlarmTypeDictQueryDto parm)
+ {
+ var response = _AndonAlarmTypeDictService.GetList(parm);
+ return SUCCESS(response);
+ }
+
+
+ ///
+ /// 查询报警类型字典详情
+ ///
+ ///
+ ///
+ [HttpGet("{Id}")]
+ [ActionPermissionFilter(Permission = "business:andonalarmtypedict:query")]
+ public IActionResult GetAndonAlarmTypeDict(int Id)
+ {
+ var response = _AndonAlarmTypeDictService.GetInfo(Id);
+
+ var info = response.Adapt();
+ return SUCCESS(info);
+ }
+
+ ///
+ /// 添加报警类型字典
+ ///
+ ///
+ [HttpPost]
+ [ActionPermissionFilter(Permission = "business:andonalarmtypedict:add")]
+ [Log(Title = "报警类型字典", BusinessType = BusinessType.INSERT)]
+ public IActionResult AddAndonAlarmTypeDict([FromBody] AndonAlarmTypeDictDto parm)
+ {
+ var modal = parm.Adapt().ToCreate(HttpContext);
+
+ var response = _AndonAlarmTypeDictService.AddAndonAlarmTypeDict(modal);
+
+ return SUCCESS(response);
+ }
+
+ ///
+ /// 更新报警类型字典
+ ///
+ ///
+ [HttpPut]
+ [ActionPermissionFilter(Permission = "business:andonalarmtypedict:edit")]
+ [Log(Title = "报警类型字典", BusinessType = BusinessType.UPDATE)]
+ public IActionResult UpdateAndonAlarmTypeDict([FromBody] AndonAlarmTypeDictDto parm)
+ {
+ var modal = parm.Adapt().ToUpdate(HttpContext);
+ var response = _AndonAlarmTypeDictService.UpdateAndonAlarmTypeDict(modal);
+
+ return ToResponse(response);
+ }
+
+ ///
+ /// 删除报警类型字典
+ ///
+ ///
+ [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);
+ }
+
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Admin.WebApi/ZR.Admin.WebApi.csproj b/ZR.Admin.WebApi/ZR.Admin.WebApi.csproj
index 6a0efb6a..7b7017cd 100644
--- a/ZR.Admin.WebApi/ZR.Admin.WebApi.csproj
+++ b/ZR.Admin.WebApi/ZR.Admin.WebApi.csproj
@@ -50,6 +50,7 @@
+
diff --git a/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警等级表-1210112619.zip b/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警等级表-1210112619.zip
new file mode 100644
index 00000000..ef7faa7b
Binary files /dev/null and b/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警等级表-1210112619.zip differ
diff --git a/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警类型字典-1210112608.zip b/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警类型字典-1210112608.zip
new file mode 100644
index 00000000..5f0d2553
Binary files /dev/null and b/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警类型字典-1210112608.zip differ
diff --git a/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警联系人表-1210112624.zip b/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警联系人表-1210112624.zip
new file mode 100644
index 00000000..266e9a6a
Binary files /dev/null and b/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警联系人表-1210112624.zip differ
diff --git a/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警记录-1210112615.zip b/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警记录-1210112615.zip
new file mode 100644
index 00000000..582f2492
Binary files /dev/null and b/ZR.Admin.WebApi/wwwroot/Generatecode/ZrAdmin.NET-报警记录-1210112615.zip differ
diff --git a/ZR.Model/MES/andon/AndonAlarmContact.cs b/ZR.Model/MES/andon/AndonAlarmContact.cs
new file mode 100644
index 00000000..c2f87cd4
--- /dev/null
+++ b/ZR.Model/MES/andon/AndonAlarmContact.cs
@@ -0,0 +1,86 @@
+
+namespace ZR.Model.MES.andon
+{
+ ///
+ /// 报警联系人表
+ ///
+ [SugarTable("andon_alarm_contact")]
+ public class AndonAlarmContact
+ {
+ ///
+ /// ID
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 联系人ID
+ ///
+ [SugarColumn(ColumnName = "user_id")]
+ public string UserId { get; set; }
+
+ ///
+ /// 联系人姓名
+ ///
+ [SugarColumn(ColumnName = "user_name")]
+ public string UserName { get; set; }
+
+ ///
+ /// 职位
+ ///
+ public string Position { get; set; }
+
+ ///
+ /// 角色
+ ///
+ public string Role { get; set; }
+
+ ///
+ /// 直属上级 ID
+ ///
+ [SugarColumn(ColumnName = "manager_id")]
+ public string ManagerId { get; set; }
+
+ ///
+ /// 直属上级姓名
+ ///
+ [SugarColumn(ColumnName = "manager_name")]
+ public string ManagerName { get; set; }
+
+ ///
+ /// 联系方式
+ ///
+ public string Phone { get; set; }
+
+ ///
+ /// 负责产线
+ ///
+ [SugarColumn(ColumnName = "line_code")]
+ public string LineCode { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "cREATED_BY")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "cREATED_TIME")]
+ public DateTime? CreatedTime { get; set; }
+
+ ///
+ /// 更新人
+ ///
+ [SugarColumn(ColumnName = "uPDATED_BY")]
+ public string UpdatedBy { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "uPDATED_TIME")]
+ public DateTime? UpdatedTime { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/andon/AndonAlarmLevel.cs b/ZR.Model/MES/andon/AndonAlarmLevel.cs
new file mode 100644
index 00000000..ad3111df
--- /dev/null
+++ b/ZR.Model/MES/andon/AndonAlarmLevel.cs
@@ -0,0 +1,65 @@
+
+namespace ZR.Model.MES.andon
+{
+ ///
+ /// 报警等级表
+ ///
+ [SugarTable("andon_alarm_level")]
+ public class AndonAlarmLevel
+ {
+ ///
+ /// 主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 报警等级名称
+ ///
+ [SugarColumn(ColumnName = "level_name")]
+ public string LevelName { get; set; }
+
+ ///
+ /// 三色灯颜色(红色/黄色/绿色)
+ ///
+ [SugarColumn(ColumnName = "light_color")]
+ public string LightColor { get; set; }
+
+ ///
+ /// 处理时限(分钟)
+ ///
+ [SugarColumn(ColumnName = "handle_timeout")]
+ public int? HandleTimeout { get; set; }
+
+ ///
+ /// 适用场景
+ ///
+ [SugarColumn(ColumnName = "apply_scenario")]
+ public string ApplyScenario { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "cREATED_BY")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "cREATED_TIME")]
+ public DateTime? CreatedTime { get; set; }
+
+ ///
+ /// 更新人
+ ///
+ [SugarColumn(ColumnName = "uPDATED_BY")]
+ public string UpdatedBy { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "uPDATED_TIME")]
+ public DateTime? UpdatedTime { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/andon/AndonAlarmRecord.cs b/ZR.Model/MES/andon/AndonAlarmRecord.cs
new file mode 100644
index 00000000..bcd33450
--- /dev/null
+++ b/ZR.Model/MES/andon/AndonAlarmRecord.cs
@@ -0,0 +1,110 @@
+
+namespace ZR.Model.MES.andon
+{
+ ///
+ /// 报警记录
+ ///
+ [SugarTable("andon_alarm_record")]
+ public class AndonAlarmRecord
+ {
+ ///
+ /// 主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 产线
+ ///
+ [SugarColumn(ColumnName = "line_code")]
+ public string LineCode { get; set; }
+
+ ///
+ /// 报警类型
+ ///
+ [SugarColumn(ColumnName = "alarm_type")]
+ public string AlarmType { get; set; }
+
+ ///
+ /// 发送方
+ ///
+ public string Sender { get; set; }
+
+ ///
+ /// 发送时间
+ ///
+ [SugarColumn(ColumnName = "send_time")]
+ public DateTime? SendTime { get; set; }
+
+ ///
+ /// 接收方
+ ///
+ public string Receiver { get; set; }
+
+ ///
+ /// 响应时间
+ ///
+ [SugarColumn(ColumnName = "response_time")]
+ public DateTime? ResponseTime { get; set; }
+
+ ///
+ /// 处理结束时间
+ ///
+ [SugarColumn(ColumnName = "handle_time")]
+ public DateTime? HandleTime { get; set; }
+
+ ///
+ /// 持续时间
+ ///
+ [SugarColumn(ColumnName = "duration_time")]
+ public int? DurationTime { get; set; }
+
+ ///
+ /// 报警级别
+ ///
+ [SugarColumn(ColumnName = "alarm_level")]
+ public string AlarmLevel { get; set; }
+
+ ///
+ /// 报警信息
+ ///
+ [SugarColumn(ColumnName = "alarm_info")]
+ public string AlarmInfo { get; set; }
+
+ ///
+ /// 状态(未处理、已处理、上报、超时)
+ ///
+ public string Status { get; set; }
+
+ ///
+ /// 处理结果
+ ///
+ [SugarColumn(ColumnName = "handle_result")]
+ public string HandleResult { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "cREATED_BY")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "cREATED_TIME")]
+ public DateTime? CreatedTime { get; set; }
+
+ ///
+ /// 更新人
+ ///
+ [SugarColumn(ColumnName = "uPDATED_BY")]
+ public string UpdatedBy { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "uPDATED_TIME")]
+ public DateTime? UpdatedTime { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/andon/AndonAlarmTypeDict.cs b/ZR.Model/MES/andon/AndonAlarmTypeDict.cs
new file mode 100644
index 00000000..0bbba43f
--- /dev/null
+++ b/ZR.Model/MES/andon/AndonAlarmTypeDict.cs
@@ -0,0 +1,53 @@
+
+namespace ZR.Model.MES.andon
+{
+ ///
+ /// 报警类型字典
+ ///
+ [SugarTable("andon_alarm_type_dict")]
+ public class AndonAlarmTypeDict
+ {
+ ///
+ /// 主键
+ ///
+ [SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
+ public int Id { get; set; }
+
+ ///
+ /// 报警类型编码(唯一)
+ ///
+ [SugarColumn(ColumnName = "type_code")]
+ public string TypeCode { get; set; }
+
+ ///
+ /// 报警类型名称
+ ///
+ [SugarColumn(ColumnName = "type_name")]
+ public string TypeName { get; set; }
+
+ ///
+ /// 创建人
+ ///
+ [SugarColumn(ColumnName = "cREATED_BY")]
+ public string CreatedBy { get; set; }
+
+ ///
+ /// 创建时间
+ ///
+ [SugarColumn(ColumnName = "cREATED_TIME")]
+ public DateTime? CreatedTime { get; set; }
+
+ ///
+ /// 更新人
+ ///
+ [SugarColumn(ColumnName = "uPDATED_BY")]
+ public string UpdatedBy { get; set; }
+
+ ///
+ /// 更新时间
+ ///
+ [SugarColumn(ColumnName = "uPDATED_TIME")]
+ public DateTime? UpdatedTime { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/andon/Dto/AndonAlarmContactDto.cs b/ZR.Model/MES/andon/Dto/AndonAlarmContactDto.cs
new file mode 100644
index 00000000..6d548ef3
--- /dev/null
+++ b/ZR.Model/MES/andon/Dto/AndonAlarmContactDto.cs
@@ -0,0 +1,47 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace ZR.Model.MES.andon.Dto
+{
+ ///
+ /// 报警联系人表查询对象
+ ///
+ public class AndonAlarmContactQueryDto : PagerInfo
+ {
+ }
+
+ ///
+ /// 报警联系人表输入输出对象
+ ///
+ public class AndonAlarmContactDto
+ {
+ [Required(ErrorMessage = "ID不能为空")]
+ public int Id { get; set; }
+
+ public string UserId { get; set; }
+
+ public string UserName { get; set; }
+
+ public string Position { get; set; }
+
+ public string Role { get; set; }
+
+ public string ManagerId { get; set; }
+
+ public string ManagerName { get; set; }
+
+ public string Phone { get; set; }
+
+ public string LineCode { get; set; }
+
+ public string CreatedBy { get; set; }
+
+ public DateTime? CreatedTime { get; set; }
+
+ public string UpdatedBy { get; set; }
+
+ public DateTime? UpdatedTime { get; set; }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/andon/Dto/AndonAlarmLevelDto.cs b/ZR.Model/MES/andon/Dto/AndonAlarmLevelDto.cs
new file mode 100644
index 00000000..1f3c2d30
--- /dev/null
+++ b/ZR.Model/MES/andon/Dto/AndonAlarmLevelDto.cs
@@ -0,0 +1,39 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace ZR.Model.MES.andon.Dto
+{
+ ///
+ /// 报警等级表查询对象
+ ///
+ public class AndonAlarmLevelQueryDto : PagerInfo
+ {
+ }
+
+ ///
+ /// 报警等级表输入输出对象
+ ///
+ public class AndonAlarmLevelDto
+ {
+ [Required(ErrorMessage = "主键不能为空")]
+ public int Id { get; set; }
+
+ public string LevelName { get; set; }
+
+ public string LightColor { get; set; }
+
+ public int? HandleTimeout { get; set; }
+
+ public string ApplyScenario { get; set; }
+
+ public string CreatedBy { get; set; }
+
+ public DateTime? CreatedTime { get; set; }
+
+ public string UpdatedBy { get; set; }
+
+ public DateTime? UpdatedTime { get; set; }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/andon/Dto/AndonAlarmRecordDto.cs b/ZR.Model/MES/andon/Dto/AndonAlarmRecordDto.cs
new file mode 100644
index 00000000..8f5ab71c
--- /dev/null
+++ b/ZR.Model/MES/andon/Dto/AndonAlarmRecordDto.cs
@@ -0,0 +1,55 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace ZR.Model.MES.andon.Dto
+{
+ ///
+ /// 报警记录查询对象
+ ///
+ public class AndonAlarmRecordQueryDto : PagerInfo
+ {
+ }
+
+ ///
+ /// 报警记录输入输出对象
+ ///
+ public class AndonAlarmRecordDto
+ {
+ [Required(ErrorMessage = "主键不能为空")]
+ public int Id { get; set; }
+
+ public string LineCode { get; set; }
+
+ public string AlarmType { get; set; }
+
+ public string Sender { get; set; }
+
+ public DateTime? SendTime { get; set; }
+
+ public string Receiver { get; set; }
+
+ public DateTime? ResponseTime { get; set; }
+
+ public DateTime? HandleTime { get; set; }
+
+ public int? DurationTime { get; set; }
+
+ public string AlarmLevel { get; set; }
+
+ public string AlarmInfo { get; set; }
+
+ public string Status { get; set; }
+
+ public string HandleResult { get; set; }
+
+ public string CreatedBy { get; set; }
+
+ public DateTime? CreatedTime { get; set; }
+
+ public string UpdatedBy { get; set; }
+
+ public DateTime? UpdatedTime { get; set; }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/MES/andon/Dto/AndonAlarmTypeDictDto.cs b/ZR.Model/MES/andon/Dto/AndonAlarmTypeDictDto.cs
new file mode 100644
index 00000000..7f14c6d3
--- /dev/null
+++ b/ZR.Model/MES/andon/Dto/AndonAlarmTypeDictDto.cs
@@ -0,0 +1,35 @@
+using System.ComponentModel.DataAnnotations;
+
+namespace ZR.Model.MES.andon.Dto
+{
+ ///
+ /// 报警类型字典查询对象
+ ///
+ public class AndonAlarmTypeDictQueryDto : PagerInfo
+ {
+ }
+
+ ///
+ /// 报警类型字典输入输出对象
+ ///
+ public class AndonAlarmTypeDictDto
+ {
+ [Required(ErrorMessage = "主键不能为空")]
+ public int Id { get; set; }
+
+ public string TypeCode { get; set; }
+
+ public string TypeName { get; set; }
+
+ public string CreatedBy { get; set; }
+
+ public DateTime? CreatedTime { get; set; }
+
+ public string UpdatedBy { get; set; }
+
+ public DateTime? UpdatedTime { get; set; }
+
+
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Model/ZR.Model.csproj b/ZR.Model/ZR.Model.csproj
index 360fce37..acc685cb 100644
--- a/ZR.Model/ZR.Model.csproj
+++ b/ZR.Model/ZR.Model.csproj
@@ -26,6 +26,7 @@
+
diff --git a/ZR.Service/ZR.Service.csproj b/ZR.Service/ZR.Service.csproj
index dcda7a1c..00737af8 100644
--- a/ZR.Service/ZR.Service.csproj
+++ b/ZR.Service/ZR.Service.csproj
@@ -22,6 +22,7 @@
+
diff --git a/ZR.Service/mes/andon/AndonAlarmContactService.cs b/ZR.Service/mes/andon/AndonAlarmContactService.cs
new file mode 100644
index 00000000..3b13e1b2
--- /dev/null
+++ b/ZR.Service/mes/andon/AndonAlarmContactService.cs
@@ -0,0 +1,83 @@
+using Infrastructure.Attribute;
+using SqlSugar;
+using ZR.Model;
+using ZR.Model.MES.andon;
+using ZR.Model.MES.andon.Dto;
+using ZR.Repository;
+using ZR.Service.mes.andon.Iservice;
+
+namespace ZR.Service.mes.andon
+{
+ ///
+ /// 报警联系人表Service业务层处理
+ ///
+ [AppService(ServiceType = typeof(IAndonAlarmContactService), ServiceLifetime = LifeTime.Transient)]
+ public class AndonAlarmContactService : BaseService, IAndonAlarmContactService
+ {
+ ///
+ /// 查询报警联系人表列表
+ ///
+ ///
+ ///
+ public PagedInfo GetList(AndonAlarmContactQueryDto parm)
+ {
+ var predicate = Expressionable.Create();
+
+ var response = Queryable()
+ .Where(predicate.ToExpression())
+ .ToPage(parm);
+
+ return response;
+ }
+
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ public AndonAlarmContact GetInfo(int Id)
+ {
+ var response = Queryable()
+ .Where(x => x.Id == Id)
+ .First();
+
+ return response;
+ }
+
+ ///
+ /// 添加报警联系人表
+ ///
+ ///
+ ///
+ public AndonAlarmContact AddAndonAlarmContact(AndonAlarmContact model)
+ {
+ return Context.Insertable(model).ExecuteReturnEntity();
+ }
+
+ ///
+ /// 修改报警联系人表
+ ///
+ ///
+ ///
+ public int UpdateAndonAlarmContact(AndonAlarmContact model)
+ {
+ //var response = Update(w => w.Id == model.Id, it => new AndonAlarmContact()
+ //{
+ // UserName = model.UserName,
+ // Position = model.Position,
+ // Role = model.Role,
+ // ManagerName = model.ManagerName,
+ // Phone = model.Phone,
+ // LineCode = model.LineCode,
+ // CreatedBy = model.CreatedBy,
+ // CreatedTime = model.CreatedTime,
+ // UpdatedBy = model.UpdatedBy,
+ // UpdatedTime = model.UpdatedTime,
+ //});
+ //return response;
+ return Update(model, true);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Service/mes/andon/AndonAlarmLevelService.cs b/ZR.Service/mes/andon/AndonAlarmLevelService.cs
new file mode 100644
index 00000000..9559e0e0
--- /dev/null
+++ b/ZR.Service/mes/andon/AndonAlarmLevelService.cs
@@ -0,0 +1,81 @@
+using Infrastructure.Attribute;
+using SqlSugar;
+using ZR.Model;
+using ZR.Model.MES.andon;
+using ZR.Model.MES.andon.Dto;
+using ZR.Repository;
+using ZR.Service.mes.andon.Iservice;
+
+namespace ZR.Service.mes.andon
+{
+ ///
+ /// 报警等级表Service业务层处理
+ ///
+ [AppService(ServiceType = typeof(IAndonAlarmLevelService), ServiceLifetime = LifeTime.Transient)]
+ public class AndonAlarmLevelService : BaseService, IAndonAlarmLevelService
+ {
+ ///
+ /// 查询报警等级表列表
+ ///
+ ///
+ ///
+ public PagedInfo GetList(AndonAlarmLevelQueryDto parm)
+ {
+ var predicate = Expressionable.Create();
+
+ var response = Queryable()
+ .Where(predicate.ToExpression())
+ .ToPage(parm);
+
+ return response;
+ }
+
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ public AndonAlarmLevel GetInfo(int Id)
+ {
+ var response = Queryable()
+ .Where(x => x.Id == Id)
+ .First();
+
+ return response;
+ }
+
+ ///
+ /// 添加报警等级表
+ ///
+ ///
+ ///
+ public AndonAlarmLevel AddAndonAlarmLevel(AndonAlarmLevel model)
+ {
+ return Context.Insertable(model).ExecuteReturnEntity();
+ }
+
+ ///
+ /// 修改报警等级表
+ ///
+ ///
+ ///
+ public int UpdateAndonAlarmLevel(AndonAlarmLevel model)
+ {
+ //var response = Update(w => w.Id == model.Id, it => new AndonAlarmLevel()
+ //{
+ // LevelName = model.LevelName,
+ // LightColor = model.LightColor,
+ // HandleTimeout = model.HandleTimeout,
+ // ApplyScenario = model.ApplyScenario,
+ // CreatedBy = model.CreatedBy,
+ // CreatedTime = model.CreatedTime,
+ // UpdatedBy = model.UpdatedBy,
+ // UpdatedTime = model.UpdatedTime,
+ //});
+ //return response;
+ return Update(model, true);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Service/mes/andon/AndonAlarmRecordService.cs b/ZR.Service/mes/andon/AndonAlarmRecordService.cs
new file mode 100644
index 00000000..da87cbb7
--- /dev/null
+++ b/ZR.Service/mes/andon/AndonAlarmRecordService.cs
@@ -0,0 +1,90 @@
+using Infrastructure.Attribute;
+using SqlSugar;
+using ZR.Model;
+using ZR.Model.MES.andon;
+using ZR.Model.MES.andon.Dto;
+using ZR.Repository;
+using ZR.Service.mes.andon.Iservice;
+
+
+namespace ZR.Service.mes.andon
+{
+ ///
+ /// 报警记录Service业务层处理
+ ///
+ [AppService(ServiceType = typeof(IAndonAlarmRecordService), ServiceLifetime = LifeTime.Transient)]
+ public class AndonAlarmRecordService : BaseService, IAndonAlarmRecordService
+ {
+ ///
+ /// 查询报警记录列表
+ ///
+ ///
+ ///
+ public PagedInfo GetList(AndonAlarmRecordQueryDto parm)
+ {
+ var predicate = Expressionable.Create();
+
+ var response = Queryable()
+ .Where(predicate.ToExpression())
+ .ToPage(parm);
+
+ return response;
+ }
+
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ public AndonAlarmRecord GetInfo(int Id)
+ {
+ var response = Queryable()
+ .Where(x => x.Id == Id)
+ .First();
+
+ return response;
+ }
+
+ ///
+ /// 添加报警记录
+ ///
+ ///
+ ///
+ public AndonAlarmRecord AddAndonAlarmRecord(AndonAlarmRecord model)
+ {
+ return Context.Insertable(model).ExecuteReturnEntity();
+ }
+
+ ///
+ /// 修改报警记录
+ ///
+ ///
+ ///
+ public int UpdateAndonAlarmRecord(AndonAlarmRecord model)
+ {
+ //var response = Update(w => w.Id == model.Id, it => new AndonAlarmRecord()
+ //{
+ // LineCode = model.LineCode,
+ // AlarmType = model.AlarmType,
+ // Sender = model.Sender,
+ // SendTime = model.SendTime,
+ // Receiver = model.Receiver,
+ // ResponseTime = model.ResponseTime,
+ // HandleTime = model.HandleTime,
+ // DurationTime = model.DurationTime,
+ // AlarmLevel = model.AlarmLevel,
+ // AlarmInfo = model.AlarmInfo,
+ // Status = model.Status,
+ // HandleResult = model.HandleResult,
+ // CreatedBy = model.CreatedBy,
+ // CreatedTime = model.CreatedTime,
+ // UpdatedBy = model.UpdatedBy,
+ // UpdatedTime = model.UpdatedTime,
+ //});
+ //return response;
+ return Update(model, true);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Service/mes/andon/AndonAlarmTypeDictService.cs b/ZR.Service/mes/andon/AndonAlarmTypeDictService.cs
new file mode 100644
index 00000000..0bbae703
--- /dev/null
+++ b/ZR.Service/mes/andon/AndonAlarmTypeDictService.cs
@@ -0,0 +1,80 @@
+using Infrastructure.Attribute;
+using SqlSugar;
+using ZR.Model;
+using ZR.Model.MES.andon;
+using ZR.Model.MES.andon.Dto;
+using ZR.Repository;
+using ZR.Service.mes.andon.Iservice;
+
+
+namespace ZR.Service.mes.andon
+{
+ ///
+ /// 报警类型字典Service业务层处理
+ ///
+ [AppService(ServiceType = typeof(IAndonAlarmTypeDictService), ServiceLifetime = LifeTime.Transient)]
+ public class AndonAlarmTypeDictService : BaseService, IAndonAlarmTypeDictService
+ {
+ ///
+ /// 查询报警类型字典列表
+ ///
+ ///
+ ///
+ public PagedInfo GetList(AndonAlarmTypeDictQueryDto parm)
+ {
+ var predicate = Expressionable.Create();
+
+ var response = Queryable()
+ .Where(predicate.ToExpression())
+ .ToPage(parm);
+
+ return response;
+ }
+
+
+ ///
+ /// 获取详情
+ ///
+ ///
+ ///
+ public AndonAlarmTypeDict GetInfo(int Id)
+ {
+ var response = Queryable()
+ .Where(x => x.Id == Id)
+ .First();
+
+ return response;
+ }
+
+ ///
+ /// 添加报警类型字典
+ ///
+ ///
+ ///
+ public AndonAlarmTypeDict AddAndonAlarmTypeDict(AndonAlarmTypeDict model)
+ {
+ return Context.Insertable(model).ExecuteReturnEntity();
+ }
+
+ ///
+ /// 修改报警类型字典
+ ///
+ ///
+ ///
+ public int UpdateAndonAlarmTypeDict(AndonAlarmTypeDict model)
+ {
+ //var response = Update(w => w.Id == model.Id, it => new AndonAlarmTypeDict()
+ //{
+ // TypeCode = model.TypeCode,
+ // TypeName = model.TypeName,
+ // CreatedBy = model.CreatedBy,
+ // CreatedTime = model.CreatedTime,
+ // UpdatedBy = model.UpdatedBy,
+ // UpdatedTime = model.UpdatedTime,
+ //});
+ //return response;
+ return Update(model, true);
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/ZR.Service/mes/andon/IService/IAndonAlarmContactService.cs b/ZR.Service/mes/andon/IService/IAndonAlarmContactService.cs
new file mode 100644
index 00000000..aaa37fc6
--- /dev/null
+++ b/ZR.Service/mes/andon/IService/IAndonAlarmContactService.cs
@@ -0,0 +1,23 @@
+using System;
+using ZR.Model;
+using System.Collections.Generic;
+using ZR.Model.MES.andon;
+using ZR.Model.MES.andon.Dto;
+
+namespace ZR.Service.mes.andon.Iservice
+{
+ ///
+ /// 报警联系人表service接口
+ ///
+ public interface IAndonAlarmContactService : IBaseService
+ {
+ PagedInfo GetList(AndonAlarmContactQueryDto parm);
+
+ AndonAlarmContact GetInfo(int Id);
+
+ AndonAlarmContact AddAndonAlarmContact(AndonAlarmContact parm);
+
+ int UpdateAndonAlarmContact(AndonAlarmContact parm);
+
+ }
+}
diff --git a/ZR.Service/mes/andon/IService/IAndonAlarmLevelService.cs b/ZR.Service/mes/andon/IService/IAndonAlarmLevelService.cs
new file mode 100644
index 00000000..32d8cf6f
--- /dev/null
+++ b/ZR.Service/mes/andon/IService/IAndonAlarmLevelService.cs
@@ -0,0 +1,23 @@
+using System;
+using ZR.Model;
+using System.Collections.Generic;
+using ZR.Model.MES.andon;
+using ZR.Model.MES.andon.Dto;
+
+namespace ZR.Service.mes.andon.Iservice
+{
+ ///
+ /// 报警等级表service接口
+ ///
+ public interface IAndonAlarmLevelService : IBaseService
+ {
+ PagedInfo GetList(AndonAlarmLevelQueryDto parm);
+
+ AndonAlarmLevel GetInfo(int Id);
+
+ AndonAlarmLevel AddAndonAlarmLevel(AndonAlarmLevel parm);
+
+ int UpdateAndonAlarmLevel(AndonAlarmLevel parm);
+
+ }
+}
diff --git a/ZR.Service/mes/andon/IService/IAndonAlarmRecordService.cs b/ZR.Service/mes/andon/IService/IAndonAlarmRecordService.cs
new file mode 100644
index 00000000..01ed2472
--- /dev/null
+++ b/ZR.Service/mes/andon/IService/IAndonAlarmRecordService.cs
@@ -0,0 +1,23 @@
+using System;
+using ZR.Model;
+using System.Collections.Generic;
+using ZR.Model.MES.andon;
+using ZR.Model.MES.andon.Dto;
+
+namespace ZR.Service.mes.andon.Iservice
+{
+ ///
+ /// 报警记录service接口
+ ///
+ public interface IAndonAlarmRecordService : IBaseService
+ {
+ PagedInfo GetList(AndonAlarmRecordQueryDto parm);
+
+ AndonAlarmRecord GetInfo(int Id);
+
+ AndonAlarmRecord AddAndonAlarmRecord(AndonAlarmRecord parm);
+
+ int UpdateAndonAlarmRecord(AndonAlarmRecord parm);
+
+ }
+}
diff --git a/ZR.Service/mes/andon/IService/IAndonAlarmTypeDictService.cs b/ZR.Service/mes/andon/IService/IAndonAlarmTypeDictService.cs
new file mode 100644
index 00000000..78128231
--- /dev/null
+++ b/ZR.Service/mes/andon/IService/IAndonAlarmTypeDictService.cs
@@ -0,0 +1,23 @@
+using System;
+using ZR.Model;
+using System.Collections.Generic;
+using ZR.Model.MES.andon;
+using ZR.Model.MES.andon.Dto;
+
+namespace ZR.Service.mes.andon.Iservice
+{
+ ///
+ /// 报警类型字典service接口
+ ///
+ public interface IAndonAlarmTypeDictService : IBaseService
+ {
+ PagedInfo GetList(AndonAlarmTypeDictQueryDto parm);
+
+ AndonAlarmTypeDict GetInfo(int Id);
+
+ AndonAlarmTypeDict AddAndonAlarmTypeDict(AndonAlarmTypeDict parm);
+
+ int UpdateAndonAlarmTypeDict(AndonAlarmTypeDict parm);
+
+ }
+}