builder.AppendFormat($@"SELECT a.*,c.ClassName,lp.LessonPlanNum,c.ClassHours,b.RoomName,IFNULL(T.TeacherHead,'') AS UserIcon,IFNULL(T.TeacherName,'') AS TeacherName FROM rb_class_plan as a LEFT JOIN rb_class as c on a.ClassId=c.ClassId
builder.AppendFormat($@"
SELECT a.*,c.ClassName,lp.LessonPlanNum,c.ClassHours,b.RoomName,IFNULL(T.TeacherHead,'') AS UserIcon,IFNULL(T.TeacherName,'') AS TeacherName FROM rb_class_plan as a LEFT JOIN rb_class as c on a.ClassId=c.ClassId
LEFT JOIN rb_class_room as b on a.ClassRoomId=b.RoomId
LEFT JOIN rb_teacher AS T ON c.Teacher_Id=T.TId
LEFT JOIN rb_student_orderguest as sog on sog.ClassId=c.ClassId
@@ -161,7 +168,6 @@ where b.`Status`=0 and b.ClassStatus in(1,2) and a.status=0 and a.Account_Id={
}
/// <summary>
/// 根据学生id获取学生的班级课程学校信息
/// </summary>
...
...
@@ -183,5 +189,62 @@ FROM rb_student as s LEFT JOIN rb_student_orderguest as sog on s.StuId=sog.Stude
WHERE o.OrderState=1 and og.`Status`=0 and sog.`Status`=0 and og.GuestState=1 and cou.`Status`=0 and c.`Status`=0 and s.`Status`=0 and s.StuId={Student_Id} and s.Group_Id={Group_Id}");
SELECT A.*,IFNULL(B.ClassName,'') AS ClassName,IFNULL(B.ClassNo,'') AS ClassNo,IFNULL(C.JoinType,0) AS StuJoinType,IFNULL(D.GuestState,0) AS StuGuestState
,C.OrderState,IFNULL(D.TotalHours,0) AS TotalHours,IFNULL(D.CompleteHours,0) AS CompleteHours,IFNULL(B.ClassStatus,0) AS ClassStatus
FROM RB_Student_OrderGuest AS A LEFT JOIN rb_class AS B ON A.ClassId=B.ClassId
LEFT JOIN rb_order AS C ON A.OrderId=C.OrderId
LEFT JOIN rb_order_guest AS D ON A.GuestId=D.Id
LEFT JOIN rb_order_guest AS D ON A.GuestId=D.Id
WHERE 1=1
");
builder.AppendFormat(" AND A.{0}={1} ",nameof(RB_Student_OrderGuest_ViewModel.Status),(int)DateStateEnum.Normal);