人机交互页面
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Infrastructure.Attribute;
|
||||
using Mapster;
|
||||
using SqlSugar;
|
||||
using ZR.Model;
|
||||
using ZR.Model.MES.andon;
|
||||
@@ -23,6 +24,13 @@ namespace ZR.Service.mes.andon
|
||||
{
|
||||
var predicate = Expressionable.Create<AndonAlarmRecordProcess>();
|
||||
|
||||
if (parm != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(parm.AlarmCode))
|
||||
{
|
||||
predicate = predicate.And(it => it.AlarmCode == parm.AlarmCode);
|
||||
}
|
||||
}
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<AndonAlarmRecordProcess, AndonAlarmRecordProcessDto>(parm);
|
||||
@@ -30,6 +38,26 @@ namespace ZR.Service.mes.andon
|
||||
return response;
|
||||
}
|
||||
|
||||
|
||||
//根据报警编码查询
|
||||
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>
|
||||
/// 获取详情
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
using Infrastructure.Attribute;
|
||||
using SqlSugar;
|
||||
using System;
|
||||
using ZR.Model;
|
||||
using ZR.Model.MES.andon;
|
||||
using ZR.Model.MES.andon.Dto;
|
||||
@@ -22,7 +23,17 @@ namespace ZR.Service.mes.andon
|
||||
public PagedInfo<AndonAlarmRecordDto> GetList(AndonAlarmRecordQueryDto parm)
|
||||
{
|
||||
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()
|
||||
.Where(predicate.ToExpression())
|
||||
.ToPage<AndonAlarmRecord, AndonAlarmRecordDto>(parm);
|
||||
|
||||
@@ -12,7 +12,8 @@ namespace ZR.Service.mes.andon.Iservice
|
||||
public interface IAndonAlarmRecordProcessService : IBaseService<AndonAlarmRecordProcess>
|
||||
{
|
||||
PagedInfo<AndonAlarmRecordProcessDto> GetList(AndonAlarmRecordProcessQueryDto parm);
|
||||
|
||||
PagedInfo<AndonAlarmRecordProcessDto> GetListByAlarmCode(AndonAlarmRecordProcessQueryDto parm);
|
||||
|
||||
AndonAlarmRecordProcess GetInfo(int Id);
|
||||
|
||||
AndonAlarmRecordProcess AddAndonAlarmRecordProcess(AndonAlarmRecordProcess parm);
|
||||
|
||||
Reference in New Issue
Block a user