人机交互页面
This commit is contained in:
@@ -102,6 +102,18 @@ namespace ZR.Admin.WebApi.Controllers.andon
|
|||||||
return ToResponse(response);
|
return ToResponse(response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 根据报警记录编码查询安灯报警处理过程列表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="parm"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpGet("getListByAlarmCode")]
|
||||||
|
[ActionPermissionFilter(Permission = "business:andonalarmrecordprocess:list")]
|
||||||
|
public IActionResult GetListByAlarmCode([FromQuery] AndonAlarmRecordProcessQueryDto parm)
|
||||||
|
{
|
||||||
|
var response = _AndonAlarmRecordProcessService.GetListByAlarmCode(parm);
|
||||||
|
return SUCCESS(response);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ namespace ZR.Model.MES.andon.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class AndonAlarmRecordQueryDto : PagerInfo
|
public class AndonAlarmRecordQueryDto : PagerInfo
|
||||||
{
|
{
|
||||||
|
public DateTime startTime { get; set; }
|
||||||
|
public DateTime endTime { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ namespace ZR.Model.MES.andon.Dto
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public class AndonAlarmRecordProcessQueryDto : PagerInfo
|
public class AndonAlarmRecordProcessQueryDto : PagerInfo
|
||||||
{
|
{
|
||||||
|
public string AlarmCode { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Infrastructure.Attribute;
|
using Infrastructure.Attribute;
|
||||||
|
using Mapster;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
using ZR.Model;
|
using ZR.Model;
|
||||||
using ZR.Model.MES.andon;
|
using ZR.Model.MES.andon;
|
||||||
@@ -23,6 +24,13 @@ namespace ZR.Service.mes.andon
|
|||||||
{
|
{
|
||||||
var predicate = Expressionable.Create<AndonAlarmRecordProcess>();
|
var predicate = Expressionable.Create<AndonAlarmRecordProcess>();
|
||||||
|
|
||||||
|
if (parm != null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(parm.AlarmCode))
|
||||||
|
{
|
||||||
|
predicate = predicate.And(it => it.AlarmCode == parm.AlarmCode);
|
||||||
|
}
|
||||||
|
}
|
||||||
var response = Queryable()
|
var response = Queryable()
|
||||||
.Where(predicate.ToExpression())
|
.Where(predicate.ToExpression())
|
||||||
.ToPage<AndonAlarmRecordProcess, AndonAlarmRecordProcessDto>(parm);
|
.ToPage<AndonAlarmRecordProcess, AndonAlarmRecordProcessDto>(parm);
|
||||||
@@ -31,6 +39,26 @@ namespace ZR.Service.mes.andon
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//根据报警编码查询
|
||||||
|
public PagedInfo<AndonAlarmRecordProcessDto> GetListByAlarmCode(AndonAlarmRecordProcessQueryDto parm)
|
||||||
|
{
|
||||||
|
var predicate = Expressionable.Create<AndonAlarmRecordProcess>();
|
||||||
|
string strAlarmCode = "";
|
||||||
|
if (parm != null)
|
||||||
|
{
|
||||||
|
if (!string.IsNullOrEmpty(parm.AlarmCode))
|
||||||
|
{
|
||||||
|
strAlarmCode = parm.AlarmCode;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
predicate = predicate.And(it => it.AlarmCode == strAlarmCode);
|
||||||
|
var response = Queryable()
|
||||||
|
.Where(predicate.ToExpression())
|
||||||
|
.ToPage<AndonAlarmRecordProcess, AndonAlarmRecordProcessDto>(parm);
|
||||||
|
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取详情
|
/// 获取详情
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
using Infrastructure.Attribute;
|
using Infrastructure.Attribute;
|
||||||
using SqlSugar;
|
using SqlSugar;
|
||||||
|
using System;
|
||||||
using ZR.Model;
|
using ZR.Model;
|
||||||
using ZR.Model.MES.andon;
|
using ZR.Model.MES.andon;
|
||||||
using ZR.Model.MES.andon.Dto;
|
using ZR.Model.MES.andon.Dto;
|
||||||
@@ -22,7 +23,17 @@ namespace ZR.Service.mes.andon
|
|||||||
public PagedInfo<AndonAlarmRecordDto> GetList(AndonAlarmRecordQueryDto parm)
|
public PagedInfo<AndonAlarmRecordDto> GetList(AndonAlarmRecordQueryDto parm)
|
||||||
{
|
{
|
||||||
var predicate = Expressionable.Create<AndonAlarmRecord>();
|
var predicate = Expressionable.Create<AndonAlarmRecord>();
|
||||||
|
if (parm != null)
|
||||||
|
{
|
||||||
|
if (parm.startTime != null && parm.startTime > DateTime.MinValue)
|
||||||
|
{
|
||||||
|
predicate = predicate.And(it => it.CreatedTime >= parm.startTime);
|
||||||
|
}
|
||||||
|
if (parm.endTime != null && parm.endTime > DateTime.MaxValue)
|
||||||
|
{
|
||||||
|
predicate = predicate.And(it => it.CreatedTime <= parm.endTime);
|
||||||
|
}
|
||||||
|
}
|
||||||
var response = Queryable()
|
var response = Queryable()
|
||||||
.Where(predicate.ToExpression())
|
.Where(predicate.ToExpression())
|
||||||
.ToPage<AndonAlarmRecord, AndonAlarmRecordDto>(parm);
|
.ToPage<AndonAlarmRecord, AndonAlarmRecordDto>(parm);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ namespace ZR.Service.mes.andon.Iservice
|
|||||||
public interface IAndonAlarmRecordProcessService : IBaseService<AndonAlarmRecordProcess>
|
public interface IAndonAlarmRecordProcessService : IBaseService<AndonAlarmRecordProcess>
|
||||||
{
|
{
|
||||||
PagedInfo<AndonAlarmRecordProcessDto> GetList(AndonAlarmRecordProcessQueryDto parm);
|
PagedInfo<AndonAlarmRecordProcessDto> GetList(AndonAlarmRecordProcessQueryDto parm);
|
||||||
|
PagedInfo<AndonAlarmRecordProcessDto> GetListByAlarmCode(AndonAlarmRecordProcessQueryDto parm);
|
||||||
|
|
||||||
AndonAlarmRecordProcess GetInfo(int Id);
|
AndonAlarmRecordProcess GetInfo(int Id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user