|
|
|
@ -33,8 +33,11 @@ public class EquipAlarmRecordService : BaseServices<EquipAlarmRecord>
|
|
|
|
|
int totalCount = 0;
|
|
|
|
|
int reqTypeCode = req.TypeCode;
|
|
|
|
|
var equipCode = req.EquipCode;
|
|
|
|
|
var errorLevel = req.ErrorLevel;
|
|
|
|
|
List<EquipAlarmRecord> list = BaseDal.Queryable().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)
|
|
|
|
|
.ToPageList(req.PageNum, req.PageSize, ref totalCount);
|
|
|
|
|
|
|
|
|
@ -84,9 +87,12 @@ public class EquipAlarmRecordService : BaseServices<EquipAlarmRecord>
|
|
|
|
|
int totalCount = 0;
|
|
|
|
|
int reqTypeCode = req.TypeCode;
|
|
|
|
|
var equipCode = req.EquipCode;
|
|
|
|
|
var errorLevel = req.ErrorLevel;
|
|
|
|
|
List<EquipAlarmProcessRecord> list = ProcessRecordRepository.Queryable()
|
|
|
|
|
.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)
|
|
|
|
|
.ToPageList(req.PageNum, req.PageSize, ref totalCount);
|
|
|
|
|
|
|
|
|
|