Commit 5c838864 authored by 黄奎's avatar 黄奎

统计修改

parent 9df00191
......@@ -4676,13 +4676,26 @@ namespace Edu.Module.Course
List<RB_Course_Chapter_ViewModel> chatperList = new List<RB_Course_Chapter_ViewModel>();
if (appointList != null&&appointList.Count>0)
{
string courseIds = string.Join(",", appointList.Select(qitem => qitem.LearnCourseId).Distinct());
if (!string.IsNullOrEmpty(courseIds))
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> courseList = Common.ConvertHelper.StringToList(courseIds);
List<int> newList = new List<int>();
if (learnList != null)
{
newList.AddRange(learnList);
}
if (courseList != null)
{
newList.AddRange(courseList);
}
if (newList!=null && newList.Count>0)
{
chatperList = course_ChapterRepository.GetChapterListRepository(new RB_Course_Chapter_ViewModel()
{
CourseIds = courseIds
});
CourseIds = string.Join(",", newList)
}); ;
}
}
......@@ -4784,6 +4797,12 @@ namespace Edu.Module.Course
qitem.CourseSTime == item.Key.CourseSTime
).ToList();
var tempChatper = chatperList?.Where(qitem => qitem.CourseId == item.Key.CourseId && qitem.ChapterNo == item.Key.ChapterNo.ToString())?.FirstOrDefault();
int CourseGradeId = 0;
if (tempChatper != null)
{
CourseGradeId = tempChatper.CourseRate.ToInt();
}
subList.Add(new
{
ClassType = 3,
......@@ -4794,7 +4813,7 @@ namespace Edu.Module.Course
item.Key.RoomId,
item.Key.RoomName,
item.Key.TeacherName,
subAppointList.FirstOrDefault().CourseGradeId,
CourseGradeId,
item.Key.ChapterNo,
CourseGradeName = subAppointList.FirstOrDefault().CourseGradeId.ToName(),
Ranks = item.Key.ChapterNo,
......
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