//第三方审核记录实体集合—动态组合lambda 表达式 Expression<Func<ThirdAdEntity, bool>> thirdWhere = p => p.Observer.Split(‘,‘).Contains(ortableEntity.CompanyAdtId.ToString()) && p.AdStartDate <= commonProperty.SystemDateTime && p.ThirdAdId != ortableEntity.ThirdAdId; //质量管理检查记录 动态组合lambda 表达式 Expression<Func<QMSCheckEntity, bool>> checkWhere = p => p.CheckGroupPerson.Split(‘,‘).Contains(ortableEntity.CompanyAdtId.ToString()) && p.CheckStartDate <= commonProperty.SystemDateTime; //判断是否添加开始日期的校验 if (orTableWorking != null) { Expression<Func<ThirdAdEntity, bool>> starttWhere = p => p.AdStartDate >= orTableWorking.ParenORTable.ReportDate; var invokedExpr = Expression.Invoke(starttWhere, thirdWhere.Parameters); thirdWhere = Expression.Lambda<Func<ThirdAdEntity, bool>> (Expression.And(thirdWhere.Body, invokedExpr), thirdWhere.Parameters); Expression<Func<QMSCheckEntity, bool>> startcWhere = p => p.CheckStartDate >= orTableWorking.ParenORTable.ReportDate; invokedExpr = Expression.Invoke(startcWhere, checkWhere.Parameters); checkWhere = Expression.Lambda<Func<QMSCheckEntity, bool>> (Expression.And(checkWhere.Body, invokedExpr), checkWhere.Parameters); strOrTableWorking = orTableWorking.WorkingExperience + "\n"; }
时间: 2024-10-26 21:57:46