Commit 042cb438 authored by liudong1993's avatar liudong1993

1

parent 8900876e
...@@ -91,5 +91,10 @@ namespace Edu.Model.Entity.Scroll ...@@ -91,5 +91,10 @@ namespace Edu.Model.Entity.Scroll
/// 上课教室ID /// 上课教室ID
/// </summary> /// </summary>
public int RoomId { get; set; } public int RoomId { get; set; }
/// <summary>
/// 上课计划ID
/// </summary>
public int ClassPlanId { get; set; }
} }
} }
\ No newline at end of file
...@@ -160,12 +160,12 @@ ORDER BY r.Id desc "; ...@@ -160,12 +160,12 @@ ORDER BY r.Id desc ";
} }
string sql = $@" string sql = $@"
SELECT r.*,c.AccountId as TeacherId,c.WorkUserId,t.TeacherName,t.TeacherHead,s.StuName,sc.OpenId as StuOpenId,cou.CourseName,cou.ScrollMinNum,cou.ScrollMaxNum,cou.CourseTimeId,cr.RoomName,sc.SName as RoomSchoolName SELECT r.*,c.AccountId as TeacherId,c.WorkUserId,t.TeacherName,t.TeacherHead,s.StuName,sch.OpenId as StuOpenId,cou.CourseName,cou.ScrollMinNum,cou.ScrollMaxNum,cou.CourseTimeId,cr.RoomName,sc.SName as RoomSchoolName
From RB_Scroll_Appointment r From RB_Scroll_Appointment r
inner join rb_account c on r.AccountId = c.Id inner join rb_account c on r.AccountId = c.Id
inner join rb_teacher t on c.AccountId = t.TId inner join rb_teacher t on c.AccountId = t.TId
inner join rb_student s on r.StuId = s.StuId inner join rb_student s on r.StuId = s.StuId
inner join rb_account sc on sc.AccountId = s.StuId and sc.AccountType =4 inner join rb_account sch on sch.AccountId = s.StuId and sch.AccountType =4
inner join rb_course cou on r.CourseId = cou.CourseId inner join rb_course cou on r.CourseId = cou.CourseId
inner join rb_class_room cr on r.RoomId = cr.RoomId inner join rb_class_room cr on r.RoomId = cr.RoomId
left join rb_school sc on sc.SId = cr.School_Id left join rb_school sc on sc.SId = cr.School_Id
......
...@@ -347,7 +347,7 @@ where b.`Status`=0 and b.ClassStatus in(1,2) and a.status=0 and a.Account_Id={ ...@@ -347,7 +347,7 @@ where b.`Status`=0 and b.ClassStatus in(1,2) and a.status=0 and a.Account_Id={
var parameters = new DynamicParameters(); var parameters = new DynamicParameters();
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.AppendFormat($@" builder.AppendFormat($@"
SELECT s.*,sog.GuestId,o.OrderState,cou.CourseName,cou.CourseId,cou.B2BIcon,cou.B2BBackground,c.ClassName,c.ClassId,c.ClassScrollType SELECT s.*,sog.GuestId,o.OrderState,cou.CourseName,cou.CourseId,cou.B2BIcon,cou.B2BBackground,c.ClassName,c.ClassId,c.ClassScrollType,
case when og.TotalHours <= og.CompleteHours then 3 else case when og.TotalHours <= og.CompleteHours then 3 else
case when og.CompleteHours = 0 then 1 else case when og.CompleteHours = 0 then 1 else
case when og.TotalHours > og.CompleteHours then 2 else 0 end end end as ClassStatus, case when og.TotalHours > og.CompleteHours then 2 else 0 end end end as ClassStatus,
......
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