Commit 8b91ef42 authored by 黄奎's avatar 黄奎

页面修改

parent 1f1aa9fb
...@@ -616,6 +616,7 @@ namespace Edu.Module.Customer ...@@ -616,6 +616,7 @@ namespace Edu.Module.Customer
dayList.Add(tempObj); dayList.Add(tempObj);
} }
var yesDataList = lastList?.Where(qitem => qitem.Date.Year == end.AddDays(-1).Year && qitem.Date.Month == end.AddDays(-1).Month)?.ToList(); var yesDataList = lastList?.Where(qitem => qitem.Date.Year == end.AddDays(-1).Year && qitem.Date.Month == end.AddDays(-1).Month)?.ToList();
var tempDataList = lastList?.Where(qitem => Common.ConvertHelper.FormatDate(qitem.Date) == Common.ConvertHelper.FormatDate(end.AddDays(-1)))?.ToList();
obj = new obj = new
{ {
dayList, dayList,
...@@ -626,38 +627,38 @@ namespace Edu.Module.Customer ...@@ -626,38 +627,38 @@ namespace Edu.Module.Customer
ClueCount = yesDataList?.Sum(qitem => qitem.ClueCount) ?? 0, ClueCount = yesDataList?.Sum(qitem => qitem.ClueCount) ?? 0,
YestodayClue = yesDataList?.Sum(qitem => qitem.YestodayClue) ?? 0, YestodayClue = yesDataList?.Sum(qitem => qitem.YestodayClue) ?? 0,
CurWeekClue = yesDataList?.Sum(qitem => qitem.CurWeekClue) ?? 0, CurWeekClue = tempDataList?.Sum(qitem => qitem.CurWeekClue) ?? 0,
LastWeekClue = yesDataList?.Sum(qitem => qitem.LastWeekClue) ?? 0, LastWeekClue = tempDataList?.Sum(qitem => qitem.LastWeekClue) ?? 0,
CurMonthClue = yesDataList?.Sum(qitem => qitem.CurMonthClue) ?? 0, CurMonthClue = tempDataList?.Sum(qitem => qitem.CurMonthClue) ?? 0,
LastMonthClue = yesDataList?.Sum(qitem => qitem.LastMonthClue) ?? 0, LastMonthClue = tempDataList?.Sum(qitem => qitem.LastMonthClue) ?? 0,
FollowCount = yesDataList?.Sum(qitem => qitem.FollowCount) ?? 0, FollowCount = yesDataList?.Sum(qitem => qitem.FollowCount) ?? 0,
YestodayFollow = yesDataList?.Sum(qitem => qitem.YestodayFollow) ?? 0, YestodayFollow = yesDataList?.Sum(qitem => qitem.YestodayFollow) ?? 0,
CurWeekFollow = yesDataList?.Sum(qitem => qitem.CurWeekFollow) ?? 0, CurWeekFollow = tempDataList?.Sum(qitem => qitem.CurWeekFollow) ?? 0,
LastWeekFollow = yesDataList?.Sum(qitem => qitem.LastWeekFollow) ?? 0, LastWeekFollow = tempDataList?.Sum(qitem => qitem.LastWeekFollow) ?? 0,
CurMonthFollow = yesDataList?.Sum(qitem => qitem.CurMonthFollow) ?? 0, CurMonthFollow = tempDataList?.Sum(qitem => qitem.CurMonthFollow) ?? 0,
LastMonthFollow = yesDataList?.Sum(qitem => qitem.LastMonthFollow) ?? 0, LastMonthFollow = tempDataList?.Sum(qitem => qitem.LastMonthFollow) ?? 0,
VisitCount = yesDataList?.Sum(qitem => qitem.VisitCount) ?? 0, VisitCount = yesDataList?.Sum(qitem => qitem.VisitCount) ?? 0,
YestodayVisit = yesDataList?.Sum(qitem => qitem.YestodayVisit) ?? 0, YestodayVisit = yesDataList?.Sum(qitem => qitem.YestodayVisit) ?? 0,
CurWeekVisit = yesDataList?.Sum(qitem => qitem.CurWeekVisit) ?? 0, CurWeekVisit = tempDataList?.Sum(qitem => qitem.CurWeekVisit) ?? 0,
LastWeekVisit = yesDataList?.Sum(qitem => qitem.LastWeekVisit) ?? 0, LastWeekVisit = tempDataList?.Sum(qitem => qitem.LastWeekVisit) ?? 0,
CurMonthVisit = yesDataList?.Sum(qitem => qitem.CurMonthVisit) ?? 0, CurMonthVisit = tempDataList?.Sum(qitem => qitem.CurMonthVisit) ?? 0,
LastMonthVisit = yesDataList?.Sum(qitem => qitem.LastMonthVisit) ?? 0, LastMonthVisit = tempDataList?.Sum(qitem => qitem.LastMonthVisit) ?? 0,
TrialLessonCount = yesDataList?.Sum(qitem => qitem.TrialLessonCount) ?? 0, TrialLessonCount = yesDataList?.Sum(qitem => qitem.TrialLessonCount) ?? 0,
YestodayTrialLesson = yesDataList?.Sum(qitem => qitem.YestodayTrialLesson) ?? 0, YestodayTrialLesson = yesDataList?.Sum(qitem => qitem.YestodayTrialLesson) ?? 0,
CurWeekTrialLesson = yesDataList?.Sum(qitem => qitem.CurWeekTrialLesson) ?? 0, CurWeekTrialLesson = tempDataList?.Sum(qitem => qitem.CurWeekTrialLesson) ?? 0,
LastWeekTrialLesson = yesDataList?.Sum(qitem => qitem.LastWeekTrialLesson) ?? 0, LastWeekTrialLesson = tempDataList?.Sum(qitem => qitem.LastWeekTrialLesson) ?? 0,
CurMonthTrialLesson = yesDataList?.Sum(qitem => qitem.CurMonthTrialLesson) ?? 0, CurMonthTrialLesson = tempDataList?.Sum(qitem => qitem.CurMonthTrialLesson) ?? 0,
LastMonthTrialLesson = yesDataList?.Sum(qitem => qitem.LastMonthTrialLesson) ?? 0, LastMonthTrialLesson = tempDataList?.Sum(qitem => qitem.LastMonthTrialLesson) ?? 0,
SaleMoney = yesDataList?.Sum(qitem => qitem.SaleMoney) ?? 0, SaleMoney = yesDataList?.Sum(qitem => qitem.SaleMoney) ?? 0,
YestodaySale = yesDataList?.Sum(qitem => qitem.YestodaySale) ?? 0, YestodaySale = yesDataList?.Sum(qitem => qitem.YestodaySale) ?? 0,
CurWeekSale = yesDataList?.Sum(qitem => qitem.CurWeekSale) ?? 0, CurWeekSale = tempDataList?.Sum(qitem => qitem.CurWeekSale) ?? 0,
LastWeekSale = yesDataList?.Sum(qitem => qitem.LastWeekSale) ?? 0, LastWeekSale = tempDataList?.Sum(qitem => qitem.LastWeekSale) ?? 0,
CurMonrhSale = yesDataList?.Sum(qitem => qitem.CurMonrhSale) ?? 0, CurMonrhSale = tempDataList?.Sum(qitem => qitem.CurMonrhSale) ?? 0,
LastMonthSale = yesDataList?.Sum(qitem => qitem.LastMonthSale) ?? 0, LastMonthSale = tempDataList?.Sum(qitem => qitem.LastMonthSale) ?? 0,
} }
}; };
return obj; return obj;
...@@ -681,57 +682,58 @@ namespace Edu.Module.Customer ...@@ -681,57 +682,58 @@ namespace Edu.Module.Customer
}); });
var consultantGoal = GetConsultantGoalListModule(new RB_Consultant_Goal_Extend() { Group_Id = 100000, Dept_Id = 13, YearStr = end.Year, MonthStr = end.Month })?.FirstOrDefault(); var consultantGoal = GetConsultantGoalListModule(new RB_Consultant_Goal_Extend() { Group_Id = 100000, Dept_Id = 13, YearStr = end.Year, MonthStr = end.Month })?.FirstOrDefault();
var yesDataList = lastList?.Where(qitem => qitem.Date.Year == end.AddDays(-1).Year && qitem.Date.Month == end.AddDays(-1).Month)?.ToList(); var yesDataList = lastList?.Where(qitem => qitem.Date.Year == end.AddDays(-1).Year && qitem.Date.Month == end.AddDays(-1).Month)?.ToList();
var tempDataList = lastList?.Where(qitem => Common.ConvertHelper.FormatDate(qitem.Date) == Common.ConvertHelper.FormatDate(end.AddDays(-1)))?.ToList();
obj = new obj = new
{ {
DayStr = Common.ConvertHelper.FormatMonthDay(end.AddDays(-1)), DayStr = Common.ConvertHelper.FormatMonthDay(end.AddDays(-1)),
WeekStr = Common.Plugin.StringHelper.GetWeek(end.AddDays(-1)), WeekStr = Common.Plugin.StringHelper.GetWeek(end.AddDays(-1)),
TrialLessonCount = yesDataList?.Sum(qitem => qitem.TrialLessonCount) ?? 0, TrialLessonCount = yesDataList?.Sum(qitem => qitem.TrialLessonCount) ?? 0,
YestodayTrialLesson = yesDataList?.Sum(qitem => qitem.YestodayTrialLesson) ?? 0, YestodayTrialLesson = yesDataList?.Sum(qitem => qitem.YestodayTrialLesson) ?? 0,
CurWeekTrialLesson = yesDataList?.Sum(qitem => qitem.CurWeekTrialLesson) ?? 0, CurWeekTrialLesson = tempDataList?.Sum(qitem => qitem.CurWeekTrialLesson) ?? 0,
LastWeekTrialLesson = yesDataList?.Sum(qitem => qitem.LastWeekTrialLesson) ?? 0, LastWeekTrialLesson = tempDataList?.Sum(qitem => qitem.LastWeekTrialLesson) ?? 0,
CurMonthTrialLesson = yesDataList?.Sum(qitem => qitem.CurMonthTrialLesson) ?? 0, CurMonthTrialLesson = tempDataList?.Sum(qitem => qitem.CurMonthTrialLesson) ?? 0,
LastMonthTrialLesson = yesDataList?.Sum(qitem => qitem.LastMonthTrialLesson) ?? 0, LastMonthTrialLesson = tempDataList?.Sum(qitem => qitem.LastMonthTrialLesson) ?? 0,
VisitCount = yesDataList?.Sum(qitem => qitem.VisitCount) ?? 0, VisitCount = yesDataList?.Sum(qitem => qitem.VisitCount) ?? 0,
YestodayVisit = yesDataList?.Sum(qitem => qitem.YestodayVisit) ?? 0, YestodayVisit = yesDataList?.Sum(qitem => qitem.YestodayVisit) ?? 0,
CurWeekVisit = yesDataList?.Sum(qitem => qitem.CurWeekVisit) ?? 0, CurWeekVisit = tempDataList?.Sum(qitem => qitem.CurWeekVisit) ?? 0,
LastWeekVisit = yesDataList?.Sum(qitem => qitem.LastWeekVisit) ?? 0, LastWeekVisit = tempDataList?.Sum(qitem => qitem.LastWeekVisit) ?? 0,
CurMonthVisit = yesDataList?.Sum(qitem => qitem.CurMonthVisit) ?? 0, CurMonthVisit = tempDataList?.Sum(qitem => qitem.CurMonthVisit) ?? 0,
LastMonthVisit = yesDataList?.Sum(qitem => qitem.LastMonthVisit) ?? 0, LastMonthVisit = tempDataList?.Sum(qitem => qitem.LastMonthVisit) ?? 0,
Rates = yesDataList?.Sum(qitem => qitem.Rates) ?? 0, Rates = yesDataList?.Sum(qitem => qitem.Rates) ?? 0,
YestodayRates = yesDataList?.Sum(qitem => qitem.YestodayRates) ?? 0, YestodayRates = yesDataList?.Sum(qitem => qitem.YestodayRates) ?? 0,
CurWeekRates = yesDataList?.Sum(qitem => qitem.CurWeekRates) ?? 0, CurWeekRates = tempDataList?.Sum(qitem => qitem.CurWeekRates) ?? 0,
LastWeekRates = yesDataList?.Sum(qitem => qitem.LastWeekRates) ?? 0, LastWeekRates = tempDataList?.Sum(qitem => qitem.LastWeekRates) ?? 0,
CurMonthRates = yesDataList?.Sum(qitem => qitem.CurMonthRates) ?? 0, CurMonthRates = tempDataList?.Sum(qitem => qitem.CurMonthRates) ?? 0,
LastMonthRates = yesDataList?.Sum(qitem => qitem.LastMonthRates) ?? 0, LastMonthRates = tempDataList?.Sum(qitem => qitem.LastMonthRates) ?? 0,
FollowCount = yesDataList?.Sum(qitem => qitem.FollowCount) ?? 0, FollowCount = yesDataList?.Sum(qitem => qitem.FollowCount) ?? 0,
YestodayFollow = yesDataList?.Sum(qitem => qitem.YestodayFollow) ?? 0, YestodayFollow = yesDataList?.Sum(qitem => qitem.YestodayFollow) ?? 0,
CurWeekFollow = yesDataList?.Sum(qitem => qitem.CurWeekFollow) ?? 0, CurWeekFollow = tempDataList?.Sum(qitem => qitem.CurWeekFollow) ?? 0,
LastWeekFollow = yesDataList?.Sum(qitem => qitem.LastWeekFollow) ?? 0, LastWeekFollow = tempDataList?.Sum(qitem => qitem.LastWeekFollow) ?? 0,
CurMonthFollow = yesDataList?.Sum(qitem => qitem.CurMonthFollow) ?? 0, CurMonthFollow = tempDataList?.Sum(qitem => qitem.CurMonthFollow) ?? 0,
LastMonthFollow = yesDataList?.Sum(qitem => qitem.LastMonthFollow) ?? 0, LastMonthFollow = tempDataList?.Sum(qitem => qitem.LastMonthFollow) ?? 0,
AgFollow = yesDataList?.Average(qitem => qitem.AgFollow) ?? 0, AgFollow = Math.Round(yesDataList?.Average(qitem => qitem.AgFollow) ?? 0, 2),
YestodayAgFollow = yesDataList?.Average(qitem => qitem.YestodayAgFollow) ?? 0, YestodayAgFollow = Math.Round(yesDataList?.Average(qitem => qitem.YestodayAgFollow) ?? 0, 2),
CurWeekAgFollow = yesDataList?.Average(qitem => qitem.CurWeekAgFollow) ?? 0, CurWeekAgFollow = Math.Round(tempDataList?.Average(qitem => qitem.CurWeekAgFollow) ?? 0, 2),
LastWeekAgFollow = yesDataList?.Average(qitem => qitem.LastWeekAgFollow) ?? 0, LastWeekAgFollow = Math.Round(tempDataList?.Average(qitem => qitem.LastWeekAgFollow) ?? 0, 2),
CurMonthAgFollow = yesDataList?.Average(qitem => qitem.CurMonthAgFollow) ?? 0, CurMonthAgFollow = Math.Round(tempDataList?.Average(qitem => qitem.CurMonthAgFollow) ?? 0, 2),
LastMonthAgFollow = yesDataList?.Average(qitem => qitem.LastMonthAgFollow) ?? 0, LastMonthAgFollow = Math.Round(tempDataList?.Average(qitem => qitem.LastMonthAgFollow) ?? 0, 2),
CurWeekOrderNum = yesDataList?.Sum(qitem => qitem.CurWeekOrderNum) ?? 0, CurWeekOrderNum = tempDataList?.Sum(qitem => qitem.CurWeekOrderNum) ?? 0,
LastWeekOrderNum = yesDataList?.Sum(qitem => qitem.LastWeekOrderNum) ?? 0, LastWeekOrderNum = tempDataList?.Sum(qitem => qitem.LastWeekOrderNum) ?? 0,
CurWeekOrderSale = yesDataList?.Sum(qitem => qitem.CurWeekOrderSale) ?? 0, CurWeekOrderSale = tempDataList?.Sum(qitem => qitem.CurWeekOrderSale) ?? 0,
LastWeekOrderSale = yesDataList?.Sum(qitem => qitem.LastWeekOrderSale) ?? 0, LastWeekOrderSale = tempDataList?.Sum(qitem => qitem.LastWeekOrderSale) ?? 0,
CurMonthOrderSale = yesDataList?.Sum(qitem => qitem.CurMonthOrderSale) ?? 0, CurMonthOrderSale = tempDataList?.Sum(qitem => qitem.CurMonthOrderSale) ?? 0,
LastMonthOrderSale = yesDataList?.Sum(qitem => qitem.LastMonthOrderSale) ?? 0, LastMonthOrderSale = tempDataList?.Sum(qitem => qitem.LastMonthOrderSale) ?? 0,
CurMonthOrderGoal = consultantGoal?.GoalMoney ?? 0, CurMonthOrderGoal = consultantGoal?.GoalMoney ?? 0,
CurMonthOrderNum = yesDataList?.Sum(qitem => qitem.CurMonthOrderNum) ?? 0, CurMonthOrderNum = tempDataList?.Sum(qitem => qitem.CurMonthOrderNum) ?? 0,
LastMonthOrderNum = yesDataList?.Sum(qitem => qitem.LastMonthOrderNum) ?? 0, LastMonthOrderNum = tempDataList?.Sum(qitem => qitem.LastMonthOrderNum) ?? 0,
}; };
return obj; return obj;
...@@ -1021,7 +1023,7 @@ namespace Edu.Module.Customer ...@@ -1021,7 +1023,7 @@ namespace Edu.Module.Customer
List<RB_Customer_Extend> customerList = new List<RB_Customer_Extend>(); List<RB_Customer_Extend> customerList = new List<RB_Customer_Extend>();
if (!string.IsNullOrEmpty(cusIds)) if (!string.IsNullOrEmpty(cusIds))
{ {
customerList= customerRepository.GetCustomerListRepository(new RB_Customer_Extend() { CustomerIds = cusIds }); customerList = customerRepository.GetCustomerListRepository(new RB_Customer_Extend() { CustomerIds = cusIds });
} }
var sourceTypeList = dataList?.Where(qitem => qitem.CreateType == StuCreateTypeEnum.CustomerInput) var sourceTypeList = dataList?.Where(qitem => qitem.CreateType == StuCreateTypeEnum.CustomerInput)
?.GroupBy(qitem => new { qitem.CustomerSourceType }) ?.GroupBy(qitem => new { qitem.CustomerSourceType })
...@@ -1096,7 +1098,7 @@ namespace Edu.Module.Customer ...@@ -1096,7 +1098,7 @@ namespace Edu.Module.Customer
List<RB_Student_ViewModel> stuList = new List<RB_Student_ViewModel>(); List<RB_Student_ViewModel> stuList = new List<RB_Student_ViewModel>();
if (!string.IsNullOrEmpty(stuIds)) if (!string.IsNullOrEmpty(stuIds))
{ {
stuList = studentRepository.GetStudentListRepository(new RB_Student_ViewModel() { StuIds= stuIds }); stuList = studentRepository.GetStudentListRepository(new RB_Student_ViewModel() { StuIds = stuIds });
} }
var sourceTypeList = dataList?.Where(qitem => qitem.CreateType == StuCreateTypeEnum.InternalIntroduction) var sourceTypeList = dataList?.Where(qitem => qitem.CreateType == StuCreateTypeEnum.InternalIntroduction)
?.GroupBy(qitem => new { qitem.StuSourceId }) ?.GroupBy(qitem => new { qitem.StuSourceId })
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment