Commit cdfa701e authored by liudong1993's avatar liudong1993

1

parent 7c906149
...@@ -284,7 +284,7 @@ namespace Mall.Module.Education ...@@ -284,7 +284,7 @@ namespace Mall.Module.Education
{ {
string ids = string.Join(",", list.Select(qitem => qitem.Id)); string ids = string.Join(",", list.Select(qitem => qitem.Id));
string tids = string.Join(",", list.Select(qitem => qitem.TeacherId)); string tids = string.Join(",", list.Select(qitem => qitem.TeacherId));
var employeeList = RB_AccountRepository.GetEmployeeListRepository(new Employee_ViewModel { School_Id = -1, AccountTypeStr = "2", }).ToList(); var employeeList = RB_AccountRepository.GetEmployeeListRepository(new Employee_ViewModel { School_Id = -1, AccountTypeStr = "2" }).ToList();
List<RB_Education_Consult_Extend> joinList = new List<RB_Education_Consult_Extend>(); List<RB_Education_Consult_Extend> joinList = new List<RB_Education_Consult_Extend>();
if (!string.IsNullOrEmpty(ids)) if (!string.IsNullOrEmpty(ids))
{ {
...@@ -2608,13 +2608,19 @@ namespace Mall.Module.Education ...@@ -2608,13 +2608,19 @@ namespace Mall.Module.Education
{ {
var list = education_ActivityRepository.GetList(query); var list = education_ActivityRepository.GetList(query);
list = list.Where(x => !string.IsNullOrEmpty(x.CoverImg)).ToList();//排除没有封面图的 list = list.Where(x => !string.IsNullOrEmpty(x.CoverImg)).ToList();//排除没有封面图的
//查询活动类型 if (list.Any())
string typeIds = string.Join(",", list.Select(x => x.ActivityType).Distinct());
var typeList = education_ActivityTypeRepository.GetActivityTypeListRepository(new RB_Education_ActivityType_Extend() { MallBaseId = query.MallBaseId, Ids = typeIds });
list.ForEach(x =>
{ {
x.ActivityTypeName = typeList.Where(y => y.Id == x.ActivityType).FirstOrDefault()?.TypeName ?? ""; var teacherList = RB_AccountRepository.GetEmployeeListRepository(new Employee_ViewModel { School_Id = -1, AccountTypeStr = "2" }).ToList();
});
//查询活动类型
string typeIds = string.Join(",", list.Select(x => x.ActivityType).Distinct());
var typeList = education_ActivityTypeRepository.GetActivityTypeListRepository(new RB_Education_ActivityType_Extend() { MallBaseId = query.MallBaseId, Ids = typeIds });
list.ForEach(x =>
{
x.ActivityTypeName = typeList.Where(y => y.Id == x.ActivityType).FirstOrDefault()?.TypeName ?? "";
x.TeacherName = teacherList.Where(y => y.AccountId == x.TeacherId).FirstOrDefault()?.EmployeeName ?? "";
});
}
//根据查询日期 开始遍历 //根据查询日期 开始遍历
DateTime STime = Convert.ToDateTime(query.SelectStartTimeStr); DateTime STime = Convert.ToDateTime(query.SelectStartTimeStr);
DateTime ETime = Convert.ToDateTime(query.SelectEndTimeStr); DateTime ETime = Convert.ToDateTime(query.SelectEndTimeStr);
...@@ -2636,7 +2642,9 @@ namespace Mall.Module.Education ...@@ -2636,7 +2642,9 @@ namespace Mall.Module.Education
x.IsFree, x.IsFree,
x.Price, x.Price,
x.LocationName, x.LocationName,
x.ActivityStatus x.ActivityStatus,
x.TeacherId,
x.TeacherName
}) })
}); });
if (STime == ETime) { if (STime == ETime) {
......
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