diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs index 831652470..31d48d134 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EvaluationTeach/Eval_Main/Eval_MainService.cs @@ -357,10 +357,10 @@ namespace Learun.Application.TwoDevelopment.EvaluationTeach //strSql.Append(" where aa.VID='" + queryParam["VID"] + "'"); strSql.Append(@" -select aa.LessonNo,aa.EmpNo,aa.AcademicYearNo,aa.Semester,aa.VID,aa.StuNo,bb.IScore,bb.UID,cc.EmpName,dd.LessonName,ee.StuName,ee.DeptNo,ee.MajorNo,ee.ClassNo +select aa.LessonNo,aa.EmpNo,aa.AcademicYearNo,aa.Semester,aa.VID,aa.StuNo,bb.IScore,bb.UID,cc.EmpName,aa.LessonName,ee.StuName,ee.DeptNo,ee.MajorNo,ee.ClassNo from ( -select a.LessonNo,a.EmpNo,a.AcademicYearNo,a.Semester,b.VID,a.StuNo +select a.LessonNo,a.LessonName,a.EmpNo,a.AcademicYearNo,a.Semester,b.VID,a.StuNo from " + misdbname + @".dbo.StuSelectLessonList a left join Eval_Main b on a.AcademicYearNo=b.AcademicYearNo and a.Semester=b.Semester where b.Status=1 and b.VID='" + queryParam["VID"] + @"' @@ -378,7 +378,6 @@ group by a.EmpNo, a.LessonNo, a.UID ) bb on aa.EmpNo=bb.EmpNo and aa.LessonNo=bb.LessonNo and aa.StuNo=bb.UID left join " + misdbname + @".dbo.EmpInfo cc on aa.EmpNo=cc.EmpNo -left join " + misdbname + @".dbo.LessonInfo dd on aa.LessonNo = dd.LessonNo left join " + misdbname + @".dbo.StuInfoBasic ee on aa.StuNo = ee.StuNo where 1=1 "); @@ -518,14 +517,14 @@ where 1=1 "); var queryParam = queryJson.ToJObject(); var strSql = new StringBuilder(); strSql.Append(@" -select ee.*,ss.*,cc.EmpName,dd.LessonName from +select ee.*,ss.*,cc.EmpName from ( -select a.LessonNo,a.EmpNo,count(a.StuNo) as StudentCount +select a.LessonNo,a.LessonName,a.EmpNo,count(a.StuNo) as StudentCount from " + misdbname + @".dbo.StuSelectLessonList a left join Eval_Main b on a.AcademicYearNo=b.AcademicYearNo and a.Semester=b.Semester where b.Status=1 and b.VID='" + queryParam["VID"] + @"' and a.StuNo is not null and a.StuNo <> '' -group by a.LessonNo,a.EmpNo +group by a.LessonNo,a.EmpNo,a.LessonName ) ss left join ( @@ -543,7 +542,6 @@ group by aa.EmpNo,aa.LessonNo ) ee on ee.EmpNo=ss.EmpNo and ee.LessonNo=ss.LessonNo left join " + misdbname + @".dbo.EmpInfo cc on ss.EmpNo=cc.EmpNo -left join " + misdbname + @".dbo.LessonInfo dd on ss.LessonNo = dd.LessonNo where 1=1 "); if (!queryParam["EmpNo"].IsEmpty()) {