//记录实体集合—动态组合lambda 表达式
                    Expression<Func<AdEntity, bool>> thirdWhere =
                        p => p.Observer.Split(',').Contains(ortableEntity.CompanyAdtId.ToString()) &&
                             p.AdStartDate <= commonProperty.SystemDateTime &&
                             p.ThirdAdId != ortableEntity.ThirdAdId;
                    //质量管理检查记录 动态组合lambda 表达式
                    Expression<Func<CheckEntity, bool>> checkWhere =
                        p => p.CheckGroupPerson.Split(',').Contains(ortableEntity.CompanyAdtId.ToString()) &&
                             p.CheckStartDate <= commonProperty.SystemDateTime;
                    //判断是否添加开始日期的校验
                    if (orTableWorking != null)
                    {
                        Expression<Func<AdEntity, bool>> starttWhere = p => p.AdStartDate >= orTableWorking.ParenORTable.ReportDate;
                        var invokedExpr = Expression.Invoke(starttWhere, thirdWhere.Parameters);
                        thirdWhere = Expression.Lambda<Func<AdEntity, bool>>
                            (Expression.And(thirdWhere.Body, invokedExpr), thirdWhere.Parameters);

                        Expression<Func<CheckEntity, bool>> startcWhere = p => p.CheckStartDate >= orTableWorking.ParenORTable.ReportDate;
                        invokedExpr = Expression.Invoke(startcWhere, checkWhere.Parameters);
                        checkWhere = Expression.Lambda<Func<CheckEntity, bool>>
                            (Expression.And(checkWhere.Body, invokedExpr), checkWhere.Parameters);
                        strOrTableWorking = orTableWorking.WorkingExperience + "\n";
                    }

 

相关文章:

  • 2022-12-23
  • 2021-11-11
  • 2021-09-01
  • 2021-10-20
  • 2021-10-29
猜你喜欢
  • 2021-07-19
  • 2022-02-02
  • 2022-03-04
  • 2021-06-12
  • 2021-10-26
  • 2021-07-01
相关资源
相似解决方案