|
|
|
@ -1423,15 +1423,24 @@ namespace LanShengService
|
|
|
|
|
return Task.FromResult(result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public async Task<IEnumerable<DeviceError>> GetErrorList() {
|
|
|
|
|
return await Db.Queryable<DeviceError>()
|
|
|
|
|
public async Task<IEnumerable<DeviceError>> GetErrorList(string search) {
|
|
|
|
|
var _Query = Db.Queryable<DeviceError>()
|
|
|
|
|
.WhereIF(!string.IsNullOrWhiteSpace(search), x => x.ErrCode!.Contains(search) || x.ErrMsg!.Contains(search))
|
|
|
|
|
.Distinct()
|
|
|
|
|
.Select(x => new DeviceError
|
|
|
|
|
{
|
|
|
|
|
ErrCode = x.ErrCode,
|
|
|
|
|
ErrMsg = x.ErrMsg
|
|
|
|
|
}).Distinct()
|
|
|
|
|
})
|
|
|
|
|
.SplitTable(DateTime.Now.AddYears(-1), DateTime.Now)
|
|
|
|
|
.ToListAsync();
|
|
|
|
|
.Distinct()
|
|
|
|
|
.Select(x => new DeviceError
|
|
|
|
|
{
|
|
|
|
|
ErrCode = x.ErrCode,
|
|
|
|
|
ErrMsg = x.ErrMsg
|
|
|
|
|
});
|
|
|
|
|
var _Sql = _Query.ToSqlString();
|
|
|
|
|
return await _Query.ToListAsync();
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|