Commit cff3f70e authored by 黄奎's avatar 黄奎

页面修改

parent c076947e
...@@ -623,7 +623,11 @@ namespace Edu.Module.Course ...@@ -623,7 +623,11 @@ namespace Edu.Module.Course
{ {
course_WordsRepository.BatchInsertCourseWordsRepository(wordsList); course_WordsRepository.BatchInsertCourseWordsRepository(wordsList);
} }
chapterRepository.SetBatchUpdateChapterNoRepository(parentList); if (parentList != null && parentList.Count > 0)
{
chapterRepository.SetBatchUpdateChapterNoRepository(parentList);
}
SetBatchAllChapterCurrentHoursModule(query.NewCourseId); SetBatchAllChapterCurrentHoursModule(query.NewCourseId);
return flag; return flag;
} }
......
...@@ -104,11 +104,9 @@ namespace Edu.Module.Customer ...@@ -104,11 +104,9 @@ namespace Edu.Module.Customer
{ {
var newTime = StartTime.AddDays(-1); var newTime = StartTime.AddDays(-1);
string start = Common.ConvertHelper.FormatDate(newTime); string start = Common.ConvertHelper.FormatDate(newTime);
var empList = accountRepository.GetEmployeeListRepository(new Employee_ViewModel() var empList = accountRepository.GetEmployeeListRepository(new Employee_ViewModel()
{ {
//市场部编号4,课程顾问部编号13 //市场部编号4,课程顾问部编号13
QDeptIds = "4",
Group_Id = 100000, Group_Id = 100000,
IsLeave = 1, IsLeave = 1,
UserRole = UserRoleEnum.MarketPersion, UserRole = UserRoleEnum.MarketPersion,
...@@ -553,6 +551,17 @@ namespace Edu.Module.Customer ...@@ -553,6 +551,17 @@ namespace Edu.Module.Customer
DateTime start = Convert.ToDateTime(StartTime); DateTime start = Convert.ToDateTime(StartTime);
DateTime end = Convert.ToDateTime(EndTime); DateTime end = Convert.ToDateTime(EndTime);
var days = (end - start).Days; var days = (end - start).Days;
if (string.IsNullOrEmpty(EmpIds))
{
var empList = accountRepository.GetEmployeeListRepository(new Employee_ViewModel()
{
//市场部编号4,课程顾问部编号13
Group_Id = 100000,
IsLeave = 1,
UserRole = UserRoleEnum.MarketPersion,
});
EmpIds = string.Join(",", empList.Select(qitem => qitem.Id));
}
var lastList = market_DataRepository.GetMarketListRepository(new RB_Market_Data_Extend() var lastList = market_DataRepository.GetMarketListRepository(new RB_Market_Data_Extend()
{ {
StartTime = StartTime, StartTime = StartTime,
...@@ -622,15 +631,13 @@ namespace Edu.Module.Customer ...@@ -622,15 +631,13 @@ 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 && qitem.Date.Day == end.AddDays(-1).Day)?.ToList(); //昨天
var yesDataList = lastList?.Where(qitem => Common.ConvertHelper.FormatDate(qitem.Date) == Common.ConvertHelper.FormatDate(end.AddDays(-1)))?.ToList();
//当前周 //当前周
var curWeekList = lastList?.Where(qitem => Common.ConvertHelper.WeekOfYear(qitem.Date) == Common.ConvertHelper.WeekOfYear(end.AddDays(-1)))?.ToList(); var curWeekList = lastList?.Where(qitem => Common.ConvertHelper.WeekOfYear(qitem.Date) == Common.ConvertHelper.WeekOfYear(end.AddDays(-1)))?.ToList();
//上一周 //上一周
var lastWeekList = lastList?.Where(qitem => Common.ConvertHelper.WeekOfYear(qitem.Date) == Common.ConvertHelper.WeekOfYear(end.AddDays(-1)) - 1)?.ToList(); var lastWeekList = lastList?.Where(qitem => Common.ConvertHelper.WeekOfYear(qitem.Date) == Common.ConvertHelper.WeekOfYear(end.AddDays(-1)) - 1)?.ToList();
var tempDataList = lastList?.Where(qitem => Common.ConvertHelper.FormatDate(qitem.Date) == Common.ConvertHelper.FormatDate(end.AddDays(-1)))?.ToList();
//渠道数据统计 //渠道数据统计
var dataList = studentRepository.GetStudentChannelStaticRepository(new RB_Student_ViewModel() var dataList = studentRepository.GetStudentChannelStaticRepository(new RB_Student_ViewModel()
{ {
...@@ -727,38 +734,38 @@ namespace Edu.Module.Customer ...@@ -727,38 +734,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 = curWeekList?.Sum(qitem => qitem.CurWeekClue) ?? 0, CurWeekClue = curWeekList?.Sum(qitem => qitem.ClueCount) ?? 0,
LastWeekClue = lastWeekList?.Sum(qitem => qitem.LastWeekClue) ?? 0, LastWeekClue = lastWeekList?.Sum(qitem => qitem.YestodayClue) ?? 0,
CurMonthClue = tempDataList?.Sum(qitem => qitem.CurMonthClue) ?? 0, CurMonthClue = yesDataList?.Sum(qitem => qitem.CurMonthClue) ?? 0,
LastMonthClue = tempDataList?.Sum(qitem => qitem.LastMonthClue) ?? 0, LastMonthClue = yesDataList?.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 = curWeekList?.Sum(qitem => qitem.CurWeekFollow) ?? 0, CurWeekFollow = curWeekList?.Sum(qitem => qitem.FollowCount) ?? 0,
LastWeekFollow = lastWeekList?.Sum(qitem => qitem.LastWeekFollow) ?? 0, LastWeekFollow = lastWeekList?.Sum(qitem => qitem.YestodayFollow) ?? 0,
CurMonthFollow = tempDataList?.Sum(qitem => qitem.CurMonthFollow) ?? 0, CurMonthFollow = yesDataList?.Sum(qitem => qitem.CurMonthFollow) ?? 0,
LastMonthFollow = tempDataList?.Sum(qitem => qitem.LastMonthFollow) ?? 0, LastMonthFollow = yesDataList?.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 = curWeekList?.Sum(qitem => qitem.CurWeekVisit) ?? 0, CurWeekVisit = curWeekList?.Sum(qitem => qitem.VisitCount) ?? 0,
LastWeekVisit = lastWeekList?.Sum(qitem => qitem.LastWeekVisit) ?? 0, LastWeekVisit = lastWeekList?.Sum(qitem => qitem.YestodayVisit) ?? 0,
CurMonthVisit = tempDataList?.Sum(qitem => qitem.CurMonthVisit) ?? 0, CurMonthVisit = yesDataList?.Sum(qitem => qitem.CurMonthVisit) ?? 0,
LastMonthVisit = tempDataList?.Sum(qitem => qitem.LastMonthVisit) ?? 0, LastMonthVisit = yesDataList?.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 = curWeekList?.Sum(qitem => qitem.CurWeekTrialLesson) ?? 0, CurWeekTrialLesson = curWeekList?.Sum(qitem => qitem.TrialLessonCount) ?? 0,
LastWeekTrialLesson = lastWeekList?.Sum(qitem => qitem.LastWeekTrialLesson) ?? 0, LastWeekTrialLesson = lastWeekList?.Sum(qitem => qitem.YestodayTrialLesson) ?? 0,
CurMonthTrialLesson = tempDataList?.Sum(qitem => qitem.CurMonthTrialLesson) ?? 0, CurMonthTrialLesson = yesDataList?.Sum(qitem => qitem.CurMonthTrialLesson) ?? 0,
LastMonthTrialLesson = tempDataList?.Sum(qitem => qitem.LastMonthTrialLesson) ?? 0, LastMonthTrialLesson = yesDataList?.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 = curWeekList?.Sum(qitem => qitem.CurWeekSale) ?? 0, CurWeekSale = curWeekList?.Sum(qitem => qitem.SaleMoney) ?? 0,
LastWeekSale = lastWeekList?.Sum(qitem => qitem.LastWeekSale) ?? 0, LastWeekSale = lastWeekList?.Sum(qitem => qitem.YestodaySale) ?? 0,
CurMonrhSale = tempDataList?.Sum(qitem => qitem.CurMonrhSale) ?? 0, CurMonrhSale = yesDataList?.Sum(qitem => qitem.CurMonrhSale) ?? 0,
LastMonthSale = tempDataList?.Sum(qitem => qitem.LastMonthSale) ?? 0, LastMonthSale = yesDataList?.Sum(qitem => qitem.LastMonthSale) ?? 0,
}, },
BarData = new BarData = new
{ {
......
...@@ -2672,8 +2672,9 @@ namespace Edu.WebApi.Controllers.User ...@@ -2672,8 +2672,9 @@ namespace Edu.WebApi.Controllers.User
ExcelDataSource subHeader = new ExcelDataSource() { ExcelRows = new List<ExcelColumn>() }; ExcelDataSource subHeader = new ExcelDataSource() { ExcelRows = new List<ExcelColumn>() };
header.ExcelRows.Add(new ExcelColumn("员工") { Rowspan = 2, CellWidth = 15 }); header.ExcelRows.Add(new ExcelColumn("员工") { Rowspan = 2, CellWidth = 15 });
subHeader.ExcelRows.Add(new ExcelColumn()); subHeader.ExcelRows.Add(new ExcelColumn());
header.ExcelRows.Add(new ExcelColumn("本月名单") { CellWidth = 25, Rowspan = 2 }); header.ExcelRows.Add(new ExcelColumn("名单") { CellWidth = 25, });
subHeader.ExcelRows.Add(new ExcelColumn("")); subHeader.ExcelRows.Add(new ExcelColumn("本周"));
subHeader.ExcelRows.Add(new ExcelColumn("本月"));
header.ExcelRows.Add(new ExcelColumn("试听") { CellWidth = 15, Colspan = 2 }); header.ExcelRows.Add(new ExcelColumn("试听") { CellWidth = 15, Colspan = 2 });
subHeader.ExcelRows.Add(new ExcelColumn("本周")); subHeader.ExcelRows.Add(new ExcelColumn("本周"));
...@@ -2713,10 +2714,10 @@ namespace Edu.WebApi.Controllers.User ...@@ -2713,10 +2714,10 @@ namespace Edu.WebApi.Controllers.User
{ {
var excelRows = new List<ExcelColumn>(); var excelRows = new List<ExcelColumn>();
excelRows.Add(new ExcelColumn(UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName)); excelRows.Add(new ExcelColumn(UserReidsCache.GetUserLoginInfo(item.CreateBy)?.AccountName));
string curWeekStu = string.Join(",", item?.CurWeekStuList?.Select(qitem => qitem.StuName)); string curWeekStu = (item?.CurWeekStuList?.Count ?? 0).ToString();
string curMonthStu = string.Join(",", item?.CurMonthStuList?.Select(qitem => qitem.StuName)); string curMonthStu = (item?.CurMonthStuList?.Count ?? 0).ToString();
excelRows.Add(new ExcelColumn(curWeekStu));
excelRows.Add(new ExcelColumn(curMonthStu)); excelRows.Add(new ExcelColumn(curMonthStu));
//excelRows.Add(new ExcelColumn(curWeekStu));
excelRows.Add(new ExcelColumn(item.CurWeekTrialLesson.ToString())); excelRows.Add(new ExcelColumn(item.CurWeekTrialLesson.ToString()));
excelRows.Add(new ExcelColumn(item.CurMonthTrialLesson.ToString())); excelRows.Add(new ExcelColumn(item.CurMonthTrialLesson.ToString()));
......
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