Commit fc42f535 authored by 黄奎's avatar 黄奎

111

parent b421f15a
......@@ -24,9 +24,10 @@ namespace Edu.Repository.Scroll
builder.AppendFormat(@"
SELECT A.Id AS GuestId,A.OrderId,A.GuestName,A.GuestState,IFNULL(B.EnterID,0) AS EnterID,IFNULL(D.AssistId,0) AS HeadMasterId,B.CourseId
FROM rb_order_guest AS A INNER JOIN RB_Order AS B ON A.OrderId=B.OrderId
LEFT JOIN rb_student_orderguest AS C ON A.Id=C.GuestId
LEFT JOIN rb_student_assist AS D ON ( C.Student_Id=D.StuId AND D.AssistType=4)
WHERE 1=1 AND B.OrderState=1 AND A.GuestState in(1,5)
INNER JOIN rb_class AS E ON B.ClassId=E.ClassId
INNER JOIN rb_student_orderguest AS C ON A.Id=C.GuestId
LEFT JOIN rb_student_assist AS D ON (C.Student_Id=D.StuId AND D.AssistType=4)
WHERE 1=1 AND B.OrderState=1 AND A.GuestState in(1,5) AND B.OrderType=1 AND E.ClassScrollType=2
");
builder.AppendFormat(" AND EXISTS (SELECT 1 FROM rb_course_chapter WHERE CourseId=B.CourseId AND CourseRate IN({0})) ", (int)query.QCourseRate);
......
......@@ -59,7 +59,7 @@ namespace Edu.WebApi.Controllers.Course
ClassProgress = item.ClassProgress > 0 ? item.ClassProgress : 0,
ScheduleStatus=item.ScheduleStatus>0?item.ScheduleStatus:-1,
XGRemark = !string.IsNullOrEmpty(item.XGRemark) ? item.XGRemark : "",
CourseItems = item?.CourseItems?.Select(qitem => new
CourseItems = item?.CourseItems?.OrderBy(qitem=>qitem.CourseGradeNo)?.Select(qitem => new
{
Date = Common.ConvertHelper.FormatDate(qitem.Date),
qitem.State,
......
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