报警响应
This commit is contained in:
@@ -9,6 +9,9 @@ namespace ZR.Model.MES.andon.Dto
|
||||
{
|
||||
public DateTime startTime { get; set; }
|
||||
public DateTime endTime { get; set; }
|
||||
|
||||
public string AlarmCode { get; set; }
|
||||
public string AlarmTypeCode { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -40,6 +40,14 @@ namespace ZR.Service.mes.andon
|
||||
{
|
||||
predicate = predicate.And(it => it.CreatedTime <= parm.endTime);
|
||||
}
|
||||
if (!string.IsNullOrEmpty(parm.AlarmCode))
|
||||
{
|
||||
predicate = predicate.And(it => it.AlarmCode.Contains(parm.AlarmCode));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(parm.AlarmTypeCode))
|
||||
{
|
||||
predicate = predicate.And(it => it.AlarmTypeCode == parm.AlarmTypeCode);
|
||||
}
|
||||
}
|
||||
var response = Queryable()
|
||||
.Where(predicate.ToExpression())
|
||||
|
||||
Reference in New Issue
Block a user