/// <summary> /// 查询保养活动车型配置 /// </summary> /// <param name="model"></param> /// <param name="pageIndex"></param> /// <param name="pageSize"></param> /// <returns></returns> public Tuple <List <BaoYangActivityVehicleViewModel>, int> SelectBaoYangActivityVehicle(BaoYangActivityVehicleSearchModel model, int pageIndex, int pageSize) { var result = null as Tuple <List <BaoYangActivityVehicleViewModel>, int>; try { result = dbScopeManagerGungnirRead.Execute(conn => DalBaoYangActivitySetting.SelectBaoYangActivityVehicle(conn, model, pageIndex, pageSize)); var oilLevels = GetAllOilLevel(); if (oilLevels != null && oilLevels.Any() && result != null && result.Item1 != null && result.Item1.Any()) { result.Item1.ForEach(s => s.OilLevel = (string.Join(",", oilLevels.Where(o => s.OilLevel.Split(',').ToList().Contains(o.OilLevel)).Select(r => r.OilType).Distinct().ToList()))); } } catch (Exception ex) { Logger.Error("SelectBaoYangActivityVehicle", ex); } return(result ?? Tuple.Create(null as List <BaoYangActivityVehicleViewModel>, 0)); }