/// <summary> /// 获取数据列表 /// </summary> /// <param name="carType">车辆类型</param> /// <param name="pagination">分页,排序参数</param> /// <param name="keyword">检索关键字</param> /// <returns></returns> public List <ProfileSanitationCarEntity> GetList(ProfileCarTypeEnum carType, Pagination pagination, string keyword) { int carTypeInt = carType.GetIntValue(); var expression = ExtLinq.True <ProfileSanitationCarEntity>(); expression = expression.And(t => t.CarType == carTypeInt); if (!string.IsNullOrEmpty(keyword)) { expression = expression.And(t => t.F_EnCode.Contains(keyword)); expression = expression.Or(t => t.TeamName.Contains(keyword)); expression = expression.Or(t => t.CarId.Contains(keyword)); } return(service.FindList(expression, pagination)); }
public static int GetIntValue(this ProfileCarTypeEnum type) { return((int)type); }