报警列表时间范围查询

zw
tq 4 months ago
parent 0c0944d3c2
commit 593e2dd971

@ -10,4 +10,7 @@ public class QueryAlarmReq : QueryPageModel
public string? ErrorLevel { get; set; }
public DateTime? StartTime { get; set; }
public DateTime? ProcessTime { get; set; }
}

@ -92,8 +92,8 @@ public class EquipAlarmRecordService : BaseServices<EquipAlarmRecord>
.WhereIF(reqTypeCode != -1, it => it.EquipTypeCode == reqTypeCode)
.WhereIF(ObjUtils.IsNotNullOrWhiteSpace(equipCode), it => it.EquipCode == equipCode)
.WhereIF(ObjUtils.IsNotNullOrWhiteSpace(errorLevel), it => it.ErrorLevel == errorLevel)
.WhereIF(req.StartTime.HasValue, it => it.StartTime == req.StartTime)
.OrderBy(it => it.CreatedTime, OrderByType.Desc)
.WhereIF(req.StartTime.HasValue && req.ProcessTime.HasValue,
it => it.StartTime >= req.StartTime && it.ProcessTime <= req.ProcessTime) .OrderBy(it => it.CreatedTime, OrderByType.Desc)
.ToPageList(req.PageNum, req.PageSize, ref totalCount);
PageResult<EquipAlarmProcessRecord> result = new PageResult<EquipAlarmProcessRecord>()

Loading…
Cancel
Save