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