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

vip约课,和新版约课调整

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