ActionResultModel<List<X6_V_Personnel_BasicInfo>> model = new ActionResultModel<List<X6_V_Personnel_BasicInfo>>(); _.apiService.DynamicApi<List<X6_V_Personnel_BasicInfo>>((db,pars)=>{ var data = db.Queryable<X6_V_Personnel_BasicInfo>() .Where(_.apiService.GetFilterQueryWhere()) .OrderBy(_.apiService.GetOrder()); if (this.Request.HttpMethod == "POST") { data.Where(PostMethodFilterGetTool.GetFilterQueryWhere(pars)); } if (pars.ContainsKey("EmployeeStatus") && pars["EmployeeStatus"].IsValuable()) { data = data.Where(string.Format("EmployeeStatus in ({0})", pars["EmployeeStatus"])); } if (pars.ContainsKey("CompanyId") && pars["CompanyId"].IsValuable()) { //data = data.Where(string.Format(" CompanyId = ‘{0}‘", pars["CompanyId"])); var CompanyId = pars["CompanyId"].TrimEnd(‘,‘); data = data.Where(@"DepartmentId in (" + CompanyId + ")"); } model.responseInfo = data.ToPageList(pars["pagenum"].TryToInt() + 1, pars["pagesize"].TryToInt()); model.totalRows = data.Count(); }, "FilterOrgContainCompanyReturnTreeIds");