From 88b0636d258328fb005e122ce3c8c83bc804288e Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Fri, 6 May 2022 11:15:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E8=AF=95=E5=AD=A6=E7=94=9F=E8=A1=A8?= =?UTF-8?q?=E8=8E=B7=E5=8F=96=E7=8F=AD=E7=BA=A7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Exam_ExamStudent/Exam_ExamStudentService.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs index 92370ceb7..017249afb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs @@ -140,7 +140,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (!queryParam["EPId"].IsEmpty()) { var examPlan = this.BaseRepository("CollegeMIS").FindEntity(queryParam["EPId"].ToString()); - strSql.Append($" AND t.AcademicYearNo = '{examPlan.AcademicYearNo}' AND t.Semester = '{examPlan.Semester}' AND t.ESType = '{examPlan.PlanType}' "); + if (examPlan != null) + { + strSql.Append($" AND t.AcademicYearNo = '{examPlan.AcademicYearNo}' AND t.Semester = '{examPlan.Semester}' AND t.ESType = '{examPlan.PlanType}' "); + } } strSql.Append(" group by ClassNo,AcademicYearNo,Semester,ESType "); return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination);