Commit 7c389634 authored by 黄奎's avatar 黄奎

vip约课,和新版约课调整

parent 86ab7d30
......@@ -4092,35 +4092,41 @@ namespace Edu.Module.Course
List<RB_Course_ViewModel> courseList = new List<RB_Course_ViewModel>();
if (appointList != null && appointList.Count > 0)
{
List<int> courseIdList = new List<int>();//所有课程编号列表
string learnIds = string.Join(",", appointList.Select(qitem => qitem.LearnCourseId).Distinct());
List<int> learnList = Common.ConvertHelper.StringToList(learnIds);
string courseIds = string.Join(",", appointList.Select(qitem => qitem.CourseId).Distinct());
List<int> tempCourseIdList = Common.ConvertHelper.StringToList(courseIds);
string orderIds = string.Join(",", appointList.Select(qitem => qitem.OrderId));
if (!string.IsNullOrEmpty(orderIds))
{
orderCourseList = order_CourseRepository.GetOrderCourseListRepository(new RB_Order_Course_ViewModel() { QOrderIds = orderIds });
}
if (orderCourseList != null && orderCourseList.Count > 0)
{
var ordercourseIdArray = orderCourseList.Select(qitem => qitem.CourseId).Distinct().ToList();
if (ordercourseIdArray != null && ordercourseIdArray.Count > 0)
{
courseIdList.AddRange(ordercourseIdArray);
}
}
List<int> courseIdList = Common.ConvertHelper.StringToList(courseIds);
List<int> newList = new List<int>();
if (learnList != null)
if (learnList != null&& learnList.Count>0)
{
newList.AddRange(learnList);
courseIdList.AddRange(learnList);
}
if (courseIdList != null)
if (tempCourseIdList != null&& tempCourseIdList.Count>0)
{
newList.AddRange(courseIdList);
courseIdList.AddRange(tempCourseIdList);
}
if (newList != null && newList.Count > 0)
if (courseIdList != null && courseIdList.Count > 0)
{
chatperList = course_ChapterRepository.GetChapterListRepository(new RB_Course_Chapter_ViewModel()
{
CourseIds = string.Join(",", newList)
CourseIds = string.Join(",", courseIdList.Distinct())
}); ;
courseList= courseRepository.GetCourseListRepository(new RB_Course_ViewModel() { QCourseIds = string.Join(",", newList) });
courseList= courseRepository.GetCourseListRepository(new RB_Course_ViewModel() { QCourseIds = string.Join(",", courseIdList.Distinct()) });
}
}
......@@ -4254,8 +4260,12 @@ namespace Edu.Module.Course
}
else
{
FinishChapterNoName = chatperList?.FirstOrDefault(qitem => qitem.CourseId == sItem.LearnCourseId && qitem.ChapterNo == sItem.CourseChapterNo.ToString())?.ChapterName;
CourseChapterNoName = chatperList?.FirstOrDefault(qitem => qitem.CourseId == sItem.LearnCourseId && qitem.ChapterNo == sItem.CourseGradeNo.ToString())?.ChapterName;
FinishChapterNoName = chatperList?.FirstOrDefault(qitem => qitem.CourseId == sItem.LearnCourseId && qitem.CourseRate == sItem.CourseGradeId && qitem.ChapterNo == sItem.CourseChapterNo.ToString())?.ChapterName;
CourseChapterNoName = chatperList?.FirstOrDefault(qitem => qitem.CourseId == sItem.LearnCourseId && qitem.CourseRate == sItem.CourseGradeId && qitem.ChapterNo == sItem.CourseGradeNo.ToString())?.ChapterName;
}
if (sItem.StuName == "曹时锟")
{
string str = "";
}
appointGuestList.Add(new
......
......@@ -2476,7 +2476,10 @@ namespace Edu.Module.Course
demodel.OrderId = learnModel.OrderId;
demodel.CourseSTime = timeList.Min(x => x.StartTime);
demodel.CourseETime = timeList.Max(x => x.EndTime);
if (demodel.LearnCourseId <= 0 && learnModel.CourseId > 0)
{
demodel.LearnCourseId = learnModel.CourseId;
}
demodel.AppointType = 1;
#region 验证补课 重上课
var appointList2 = scroll_AppointmentRepository.GetList(new RB_Scroll_Appointment_ViewModel() { Group_Id = demodel.Group_Id, GuestId = demodel.GuestId, CourseGradeId = demodel.CourseGradeId, CourseGradeNo = demodel.CourseGradeNo });
......
......@@ -723,6 +723,7 @@ namespace Edu.WebApi.Controllers.Course
qitem.ChapterGradeNo,
qitem.ChapterName,
qitem.CourseRate,
qitem.CourseId,
CourseRateName = qitem.CourseRate.ToName(),
}));
}
......
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