Commit 36a502d8 authored by 黄奎's avatar 黄奎

查询修改

parent 6d2ede49
...@@ -46,9 +46,9 @@ namespace Edu.Repository.Course ...@@ -46,9 +46,9 @@ namespace Edu.Repository.Course
SELECT A.*,IFNULL(B.GuestName,'') AS GuestName,ec.ContractNo,ec.Id as ContractId,IFNULL(C.SName,'') AS SchoolName,IFNULL(D.ClassName,'') AS ClassName,IFNULL(T.TeacherName,'') AS TeacherName SELECT A.*,IFNULL(B.GuestName,'') AS GuestName,ec.ContractNo,ec.Id as ContractId,IFNULL(C.SName,'') AS SchoolName,IFNULL(D.ClassName,'') AS ClassName,IFNULL(T.TeacherName,'') AS TeacherName
,IFNULL(E.EnterID,0) AS EnterID,IFNULL(F.CourseName,'') AS CourseName,D.ClassNo ,IFNULL(E.EnterID,0) AS EnterID,IFNULL(F.CourseName,'') AS CourseName,D.ClassNo
FROM RB_Student_BackClass AS A LEFT JOIN rb_order_guest AS B ON A.GuestId=B.Id FROM RB_Student_BackClass AS A LEFT JOIN rb_order_guest AS B ON A.GuestId=B.Id
left join rb_education_contract ec on B.Id = ec.GuestId and ec.Status <>4 LEFT JOIN rb_education_contract ec on B.Id = ec.GuestId and ec.Status <>4
LEFT JOIN rb_school AS C ON A.SchoolId=C.SId
LEFT JOIN rb_class AS D ON A.ClassId=D.ClassId LEFT JOIN rb_class AS D ON A.ClassId=D.ClassId
LEFT JOIN rb_school AS C ON D.School_Id=C.SId
LEFT JOIN (SELECT account.Id,teac.TeacherName FROM rb_account AS account INNER JOIN rb_teacher AS teac ON account.AccountId=teac.TId AND account.AccountType=2) LEFT JOIN (SELECT account.Id,teac.TeacherName FROM rb_account AS account INNER JOIN rb_teacher AS teac ON account.AccountId=teac.TId AND account.AccountType=2)
AS T ON A.TeacherId=T.Id AS T ON A.TeacherId=T.Id
LEFT JOIN rb_order AS E ON A.OrderId=E.OrderId LEFT JOIN rb_order AS E ON A.OrderId=E.OrderId
......
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