From 6d17630cd3580fd18182c1b312460ddfa9981b58 Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 8 Jul 2022 12:21:44 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=84=E6=95=99=E6=83=85=E5=86=B5=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E8=AF=BE=E7=A8=8B=E5=90=8D=E7=A7=B0=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E8=AF=BB=E5=8F=96StuSelectLessonList=E5=86=85=E7=9A=84?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E8=AF=BE=E7=A8=8B=E5=90=8D=E7=A7=B0=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EvaluationTeach/Eval_Main/Eval_MainService.cs | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) 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()) {