|
@@ -51,7 +51,7 @@ WHERE |
|
|
{ |
|
|
{ |
|
|
Total = data.Sum(t => t.Money).ToString(), |
|
|
Total = data.Sum(t => t.Money).ToString(), |
|
|
OrderCount = data.Count().ToString(), |
|
|
OrderCount = data.Count().ToString(), |
|
|
MoneyM = data.Where(t => t.Time.Month == DateTime.Now.Month).Sum(t => t.Money).ToString(), |
|
|
|
|
|
|
|
|
MoneyM = data.Where(t => t.Time.Year == DateTime.Now.Year && t.Time.Month == DateTime.Now.Month).Sum(t => t.Money).ToString(), |
|
|
MoneyD = data.Where(t => t.Time >= DateTime.Parse(DateTime.Now.ToShortDateString()) && t.Time < DateTime.Parse(DateTime.Now.ToShortDateString()).AddDays(1)).Sum(t => t.Money).ToString(), |
|
|
MoneyD = data.Where(t => t.Time >= DateTime.Parse(DateTime.Now.ToShortDateString()) && t.Time < DateTime.Parse(DateTime.Now.ToShortDateString()).AddDays(1)).Sum(t => t.Money).ToString(), |
|
|
StoreCount = data.GroupBy(t => t.Id).Count() |
|
|
StoreCount = data.GroupBy(t => t.Id).Count() |
|
|
}; |
|
|
}; |
|
@@ -193,11 +193,11 @@ WHERE |
|
|
var sql = sb.ToString(); |
|
|
var sql = sb.ToString(); |
|
|
var data = db.SqlQueryable<OrderNumberDto>(sql).ToList(); |
|
|
var data = db.SqlQueryable<OrderNumberDto>(sql).ToList(); |
|
|
int Year = data.Where(t => t.CreatedAt.Year == DateTime.Now.Year).Count(); |
|
|
int Year = data.Where(t => t.CreatedAt.Year == DateTime.Now.Year).Count(); |
|
|
int Month = data.Where(t => t.CreatedAt.Month == DateTime.Now.Month).Count(); |
|
|
|
|
|
int Day = data.Where(t => t.CreatedAt.Day == DateTime.Now.Day).Count(); |
|
|
|
|
|
|
|
|
int Month = data.Where(t => t.CreatedAt.Year == DateTime.Now.Year && t.CreatedAt.Month == DateTime.Now.Month).Count(); |
|
|
|
|
|
int Day = data.Where(t => t.CreatedAt.Year == DateTime.Now.Year && t.CreatedAt.Month == DateTime.Now.Month && t.CreatedAt.Day == DateTime.Now.Day).Count(); |
|
|
int L_Year = data.Where(t => t.CreatedAt.Year == DateTime.Now.AddYears(-1).Year).Count(); |
|
|
int L_Year = data.Where(t => t.CreatedAt.Year == DateTime.Now.AddYears(-1).Year).Count(); |
|
|
int L_Month = data.Where(t => t.CreatedAt.Month == DateTime.Now.AddMonths(-1).Month).Count(); |
|
|
|
|
|
int L_Day = data.Where(t => t.CreatedAt.Day == DateTime.Now.AddDays(-1).Day).Count(); |
|
|
|
|
|
|
|
|
int L_Month = data.Where(t => t.CreatedAt.Year == DateTime.Now.Year && t.CreatedAt.Month == DateTime.Now.AddMonths(-1).Month).Count(); |
|
|
|
|
|
int L_Day = data.Where(t => t.CreatedAt.Year == DateTime.Now.Year && t.CreatedAt.Month == DateTime.Now.Month && t.CreatedAt.Day == DateTime.Now.AddDays(-1).Day).Count(); |
|
|
|
|
|
|
|
|
return new |
|
|
return new |
|
|
{ |
|
|
{ |
|
|