Commit e3dfad48 authored by 黄奎's avatar 黄奎

11

parent 9f6db887
......@@ -128,6 +128,8 @@ namespace Edu.Module.Course
private readonly RB_Order_CourseRepository order_CourseRepository = new RB_Order_CourseRepository();
private readonly RB_Scroll_PlanShowRepository scroll_PlanShowRepository = new RB_Scroll_PlanShowRepository();
#region 班次
......@@ -2257,14 +2259,18 @@ namespace Edu.Module.Course
/// <returns></returns>
public List<RB_Student_OrderGuest_ViewModel> GetCanAppointmentStuListModule_V2(string stuName, int NextChapterGradeNo, int CourseGradeId, int SchoolId, int group_Id,int VipCourseId=0)
{
List<RB_Student_OrderGuest_ViewModel> dataList = new List<RB_Student_OrderGuest_ViewModel>();
var list = student_OrderGuestRepository.GetCanAppointmentStuListRepository_V2(stuName, NextChapterGradeNo, CourseGradeId, SchoolId, group_Id, VipCourseId: VipCourseId);
if (list != null && list.Count > 0)
{
List<RB_Order_Course_ViewModel> orderCourseList = new List<RB_Order_Course_ViewModel>();
List<RB_Scroll_PlanShow_ViewModel> stuPlanShowList = new List<RB_Scroll_PlanShow_ViewModel>();
string orderIds = string.Join(",", list.Select(qitem => qitem.OrderId));
string guestIds = string.Join(",", list.Select(qitem => qitem.GuestId));
if (!string.IsNullOrEmpty(orderIds))
{
orderCourseList = order_CourseRepository.GetOrderCourseListRepository(new RB_Order_Course_ViewModel() { QOrderIds = orderIds });
stuPlanShowList = scroll_PlanShowRepository.GetScrollPlanShowListRepository(new RB_Scroll_PlanShow_ViewModel() { QOrderIds = orderIds, QGuestIds = guestIds });
}
string courseIds = string.Join(",", list.Select(qitem => qitem.CourseId).Distinct());
List<RB_Course_Chapter_ViewModel> courseChapterList = new List<RB_Course_Chapter_ViewModel>();
......@@ -2286,9 +2292,33 @@ namespace Edu.Module.Course
var tempChapter = courseChapterList?.FirstOrDefault(qitem => qitem.CourseId == item.CourseId && qitem.ChapterNo == item.CourseChapterNo.ToString());
item.CourseChapterNoName = tempChapter?.ChapterName ?? "";
item.CourseRate = tempChapter?.CourseRate ?? Common.Enum.Course.CourseRateEnum.N5;
#region 判断是否显示当前约课等级
//var tempPlanShow = stuPlanShowList?.FirstOrDefault(qitem => qitem.OrderId == item.OrderId);
//if (tempPlanShow != null && tempPlanShow.Id > 0)
//{
// var tempPlanShowRateList = Common.Plugin.StringHelper.StringToListInt((tempPlanShow?.ShowRetes ?? ""));
// if (tempPlanShowRateList != null && tempPlanShowRateList.Count > 0)
// {
// if (tempPlanShowRateList.Any(x => x == CourseGradeId))
// {
// dataList.Add(item);
// }
// }
// else
// {
// dataList.Add(item);
// }
//}
//else
//{
// dataList.Add(item);
//}
#endregion
dataList.Add(item);
}
}
return list;
return dataList;
}
/// <summary>
......
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