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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Controllers\mes\andon\" />
|
||||
<Folder Include="Properties\PublishProfiles\" />
|
||||
<Folder Include="wwwroot\export\" />
|
||||
<Folder Include="wwwroot\Generatecode\" />
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
86
ZR.Model/MES/andon/AndonAlarmContact.cs
Normal file
86
ZR.Model/MES/andon/AndonAlarmContact.cs
Normal file
@@ -0,0 +1,86 @@
|
||||
|
||||
namespace ZR.Model.MES.andon
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警联系人表
|
||||
/// </summary>
|
||||
[SugarTable("andon_alarm_contact")]
|
||||
public class AndonAlarmContact
|
||||
{
|
||||
/// <summary>
|
||||
/// ID
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 联系人ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "user_id")]
|
||||
public string UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 联系人姓名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "user_name")]
|
||||
public string UserName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 职位
|
||||
/// </summary>
|
||||
public string Position { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 角色
|
||||
/// </summary>
|
||||
public string Role { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 直属上级 ID
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "manager_id")]
|
||||
public string ManagerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 直属上级姓名
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "manager_name")]
|
||||
public string ManagerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 联系方式
|
||||
/// </summary>
|
||||
public string Phone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 负责产线
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "line_code")]
|
||||
public string LineCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
65
ZR.Model/MES/andon/AndonAlarmLevel.cs
Normal file
65
ZR.Model/MES/andon/AndonAlarmLevel.cs
Normal file
@@ -0,0 +1,65 @@
|
||||
|
||||
namespace ZR.Model.MES.andon
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警等级表
|
||||
/// </summary>
|
||||
[SugarTable("andon_alarm_level")]
|
||||
public class AndonAlarmLevel
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警等级名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "level_name")]
|
||||
public string LevelName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 三色灯颜色(红色/黄色/绿色)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "light_color")]
|
||||
public string LightColor { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理时限(分钟)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "handle_timeout")]
|
||||
public int? HandleTimeout { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 适用场景
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "apply_scenario")]
|
||||
public string ApplyScenario { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
110
ZR.Model/MES/andon/AndonAlarmRecord.cs
Normal file
110
ZR.Model/MES/andon/AndonAlarmRecord.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
|
||||
namespace ZR.Model.MES.andon
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警记录
|
||||
/// </summary>
|
||||
[SugarTable("andon_alarm_record")]
|
||||
public class AndonAlarmRecord
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产线
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "line_code")]
|
||||
public string LineCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警类型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "alarm_type")]
|
||||
public string AlarmType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发送方
|
||||
/// </summary>
|
||||
public string Sender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发送时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "send_time")]
|
||||
public DateTime? SendTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 接收方
|
||||
/// </summary>
|
||||
public string Receiver { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 响应时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "response_time")]
|
||||
public DateTime? ResponseTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理结束时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "handle_time")]
|
||||
public DateTime? HandleTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 持续时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "duration_time")]
|
||||
public int? DurationTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警级别
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "alarm_level")]
|
||||
public string AlarmLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警信息
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "alarm_info")]
|
||||
public string AlarmInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态(未处理、已处理、上报、超时)
|
||||
/// </summary>
|
||||
public string Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理结果
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "handle_result")]
|
||||
public string HandleResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
53
ZR.Model/MES/andon/AndonAlarmTypeDict.cs
Normal file
53
ZR.Model/MES/andon/AndonAlarmTypeDict.cs
Normal file
@@ -0,0 +1,53 @@
|
||||
|
||||
namespace ZR.Model.MES.andon
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警类型字典
|
||||
/// </summary>
|
||||
[SugarTable("andon_alarm_type_dict")]
|
||||
public class AndonAlarmTypeDict
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
[SugarColumn(IsPrimaryKey = true, IsIdentity = true)]
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警类型编码(唯一)
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "type_code")]
|
||||
public string TypeCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 报警类型名称
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "type_name")]
|
||||
public string TypeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_BY")]
|
||||
public string CreatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "cREATED_TIME")]
|
||||
public DateTime? CreatedTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新人
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_BY")]
|
||||
public string UpdatedBy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新时间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnName = "uPDATED_TIME")]
|
||||
public DateTime? UpdatedTime { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
47
ZR.Model/MES/andon/Dto/AndonAlarmContactDto.cs
Normal file
47
ZR.Model/MES/andon/Dto/AndonAlarmContactDto.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ZR.Model.MES.andon.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警联系人表查询对象
|
||||
/// </summary>
|
||||
public class AndonAlarmContactQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 报警联系人表输入输出对象
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
39
ZR.Model/MES/andon/Dto/AndonAlarmLevelDto.cs
Normal file
39
ZR.Model/MES/andon/Dto/AndonAlarmLevelDto.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ZR.Model.MES.andon.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警等级表查询对象
|
||||
/// </summary>
|
||||
public class AndonAlarmLevelQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 报警等级表输入输出对象
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
55
ZR.Model/MES/andon/Dto/AndonAlarmRecordDto.cs
Normal file
55
ZR.Model/MES/andon/Dto/AndonAlarmRecordDto.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ZR.Model.MES.andon.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警记录查询对象
|
||||
/// </summary>
|
||||
public class AndonAlarmRecordQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 报警记录输入输出对象
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
35
ZR.Model/MES/andon/Dto/AndonAlarmTypeDictDto.cs
Normal file
35
ZR.Model/MES/andon/Dto/AndonAlarmTypeDictDto.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace ZR.Model.MES.andon.Dto
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警类型字典查询对象
|
||||
/// </summary>
|
||||
public class AndonAlarmTypeDictQueryDto : PagerInfo
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 报警类型字典输入输出对象
|
||||
/// </summary>
|
||||
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; }
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -26,6 +26,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="MES\andon\Dto\" />
|
||||
<Folder Include="MES\qc\defectReport\" />
|
||||
<Folder Include="MES\qc\qualificationRateReport\" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="mes\andon\IService\" />
|
||||
<Folder Include="mes\qc\defectReport\" />
|
||||
</ItemGroup>
|
||||
|
||||
|
||||
83
ZR.Service/mes/andon/AndonAlarmContactService.cs
Normal file
83
ZR.Service/mes/andon/AndonAlarmContactService.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警联系人表Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IAndonAlarmContactService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class AndonAlarmContactService : BaseService<AndonAlarmContact>, IAndonAlarmContactService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询报警联系人表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<AndonAlarmContactDto> GetList(AndonAlarmContactQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<AndonAlarmContact>();
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<AndonAlarmContact, AndonAlarmContactDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public AndonAlarmContact GetInfo(int Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加报警联系人表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public AndonAlarmContact AddAndonAlarmContact(AndonAlarmContact model)
|
||||
{
|
||||
return Context.Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改报警联系人表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
81
ZR.Service/mes/andon/AndonAlarmLevelService.cs
Normal file
81
ZR.Service/mes/andon/AndonAlarmLevelService.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警等级表Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IAndonAlarmLevelService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class AndonAlarmLevelService : BaseService<AndonAlarmLevel>, IAndonAlarmLevelService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询报警等级表列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<AndonAlarmLevelDto> GetList(AndonAlarmLevelQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<AndonAlarmLevel>();
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<AndonAlarmLevel, AndonAlarmLevelDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public AndonAlarmLevel GetInfo(int Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加报警等级表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public AndonAlarmLevel AddAndonAlarmLevel(AndonAlarmLevel model)
|
||||
{
|
||||
return Context.Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改报警等级表
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
90
ZR.Service/mes/andon/AndonAlarmRecordService.cs
Normal file
90
ZR.Service/mes/andon/AndonAlarmRecordService.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警记录Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IAndonAlarmRecordService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class AndonAlarmRecordService : BaseService<AndonAlarmRecord>, IAndonAlarmRecordService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询报警记录列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<AndonAlarmRecordDto> GetList(AndonAlarmRecordQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<AndonAlarmRecord>();
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<AndonAlarmRecord, AndonAlarmRecordDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public AndonAlarmRecord GetInfo(int Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加报警记录
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public AndonAlarmRecord AddAndonAlarmRecord(AndonAlarmRecord model)
|
||||
{
|
||||
return Context.Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改报警记录
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
80
ZR.Service/mes/andon/AndonAlarmTypeDictService.cs
Normal file
80
ZR.Service/mes/andon/AndonAlarmTypeDictService.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警类型字典Service业务层处理
|
||||
/// </summary>
|
||||
[AppService(ServiceType = typeof(IAndonAlarmTypeDictService), ServiceLifetime = LifeTime.Transient)]
|
||||
public class AndonAlarmTypeDictService : BaseService<AndonAlarmTypeDict>, IAndonAlarmTypeDictService
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询报警类型字典列表
|
||||
/// </summary>
|
||||
/// <param name="parm"></param>
|
||||
/// <returns></returns>
|
||||
public PagedInfo<AndonAlarmTypeDictDto> GetList(AndonAlarmTypeDictQueryDto parm)
|
||||
{
|
||||
var predicate = Expressionable.Create<AndonAlarmTypeDict>();
|
||||
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<AndonAlarmTypeDict, AndonAlarmTypeDictDto>(parm);
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取详情
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public AndonAlarmTypeDict GetInfo(int Id)
|
||||
{
|
||||
var response = Queryable()
|
||||
.Where(x => x.Id == Id)
|
||||
.First();
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加报警类型字典
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
public AndonAlarmTypeDict AddAndonAlarmTypeDict(AndonAlarmTypeDict model)
|
||||
{
|
||||
return Context.Insertable(model).ExecuteReturnEntity();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改报警类型字典
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
23
ZR.Service/mes/andon/IService/IAndonAlarmContactService.cs
Normal file
23
ZR.Service/mes/andon/IService/IAndonAlarmContactService.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警联系人表service接口
|
||||
/// </summary>
|
||||
public interface IAndonAlarmContactService : IBaseService<AndonAlarmContact>
|
||||
{
|
||||
PagedInfo<AndonAlarmContactDto> GetList(AndonAlarmContactQueryDto parm);
|
||||
|
||||
AndonAlarmContact GetInfo(int Id);
|
||||
|
||||
AndonAlarmContact AddAndonAlarmContact(AndonAlarmContact parm);
|
||||
|
||||
int UpdateAndonAlarmContact(AndonAlarmContact parm);
|
||||
|
||||
}
|
||||
}
|
||||
23
ZR.Service/mes/andon/IService/IAndonAlarmLevelService.cs
Normal file
23
ZR.Service/mes/andon/IService/IAndonAlarmLevelService.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警等级表service接口
|
||||
/// </summary>
|
||||
public interface IAndonAlarmLevelService : IBaseService<AndonAlarmLevel>
|
||||
{
|
||||
PagedInfo<AndonAlarmLevelDto> GetList(AndonAlarmLevelQueryDto parm);
|
||||
|
||||
AndonAlarmLevel GetInfo(int Id);
|
||||
|
||||
AndonAlarmLevel AddAndonAlarmLevel(AndonAlarmLevel parm);
|
||||
|
||||
int UpdateAndonAlarmLevel(AndonAlarmLevel parm);
|
||||
|
||||
}
|
||||
}
|
||||
23
ZR.Service/mes/andon/IService/IAndonAlarmRecordService.cs
Normal file
23
ZR.Service/mes/andon/IService/IAndonAlarmRecordService.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警记录service接口
|
||||
/// </summary>
|
||||
public interface IAndonAlarmRecordService : IBaseService<AndonAlarmRecord>
|
||||
{
|
||||
PagedInfo<AndonAlarmRecordDto> GetList(AndonAlarmRecordQueryDto parm);
|
||||
|
||||
AndonAlarmRecord GetInfo(int Id);
|
||||
|
||||
AndonAlarmRecord AddAndonAlarmRecord(AndonAlarmRecord parm);
|
||||
|
||||
int UpdateAndonAlarmRecord(AndonAlarmRecord parm);
|
||||
|
||||
}
|
||||
}
|
||||
23
ZR.Service/mes/andon/IService/IAndonAlarmTypeDictService.cs
Normal file
23
ZR.Service/mes/andon/IService/IAndonAlarmTypeDictService.cs
Normal file
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 报警类型字典service接口
|
||||
/// </summary>
|
||||
public interface IAndonAlarmTypeDictService : IBaseService<AndonAlarmTypeDict>
|
||||
{
|
||||
PagedInfo<AndonAlarmTypeDictDto> GetList(AndonAlarmTypeDictQueryDto parm);
|
||||
|
||||
AndonAlarmTypeDict GetInfo(int Id);
|
||||
|
||||
AndonAlarmTypeDict AddAndonAlarmTypeDict(AndonAlarmTypeDict parm);
|
||||
|
||||
int UpdateAndonAlarmTypeDict(AndonAlarmTypeDict parm);
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user