ICriteria iCriteria = session.CreateCriteria(typeof(IEPDailyStatic));
iCriteria
.SetProjection(Projections.ProjectionList()
.Add(Projections.GroupProperty("Month"))
.Add(Projections.Property("Month"))
.Add(Projections.Sum("Count"))
.Add(Projections.Sum("Quantity"))
.Add(Projections.Sum("PaidMoney")))
.Add(Restrictions.Between("DeliveryDate", criteria.FromDate.ToString("yyyy-MM-dd"), criteria.ToDate.ToString("yyyy-MM-dd")))
.Add(Restrictions.Eq("SchedulingStatus", 5));
按照 字段 “Month” 进行分组,对字段 “Count”,“Quantity”,“PaidMoney” 进行统计,