Commit a0f3a453 authored by liudong1993's avatar liudong1993

1

parent 8c2fb775
......@@ -657,12 +657,11 @@ GROUP BY A.ClassPlanId,A.ClassId ,A.ClassDate,A.ClassRoomId,A.CompleteProgress
StringBuilder builder = new StringBuilder();
builder.AppendFormat(@"
SELECT A.ClassPlanId,A.StuId,A.CourseId,A.ClassDate,A.ClassRoomId,A.CourseName,A.TeacherName,A.UserIcon,A.RoomName
,MIN(A.StartTime) AS StartTime,MAX(A.EndTime) AS EndTime,
(SELECT COUNT(*) from rb_class_plan p inner join rb_scroll_appointment s on p.ClassPlanId = s.ClassPlanId where p.`Status`=0 and p.PlanType =2 and s.StuId ={2} and DATE_FORMAT(p.ClassDate,'%Y-%m-%d') <=DATE_FORMAT(a.ClassDate,'%Y-%m-%d') and p.CourseId=a.CourseId) as Ranks
,MIN(A.StartTime) AS StartTime,MAX(A.EndTime) AS EndTime,A.ChapterNo as Ranks
FROM
(
SELECT A.ClassPlanId,sa.StuId, A.CourseId,A.ClassDate,A.ClassRoomId,C.CourseName,IFNULL(D.TeacherName,'') AS TeacherName
,IFNULL(D.TeacherHead,'') AS UserIcon,E.RoomName,F.StartTime,F.EndTime
,IFNULL(D.TeacherHead,'') AS UserIcon,E.RoomName,F.StartTime,F.EndTime,sa.ChapterNo
FROM rb_class_plan AS A
INNER JOIN rb_scroll_appointment sa on A.ClassPlanId = sa.ClassPlanId and sa.StuId ={2}
LEFT JOIN rb_course AS C ON A.CourseId=C.CourseId
......
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