From 9e879759cf6ea908e2099364a01afdc532d077e7 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Wed, 26 Aug 2020 10:40:17 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E4=BF=AE=E8=AF=BE=E9=80=89=E8=AF=BE?= =?UTF-8?q?=EF=BC=9A=E4=B8=93=E4=B8=9A=E3=80=81=E5=B9=B4=E7=BA=A7=E7=9A=84?= =?UTF-8?q?=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OpenLessonPlanOfElectiveService.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs index 9f68fac2f..4b2ba21b6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs @@ -95,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append(@"select b.*,c.StuNo,c.StuName,c.Status,cp.Status as StatusPre from ElectiveMajor a left join OpenLessonPlanOfElective b on a.OLPOEId=b.Id left join StuSelectLessonListOfElective c on b.Id=c.OLPEId and c.StuNo=@StuNo left join StuSelectLessonListOfElectivePre cp on b.Id=cp.OLPEId and cp.StuNo=@StuNo - where 1=1 "); + where 1=1 and a.MajorId is not null and a.Grade is not null "); //学号 if (!queryParam["StuNo"].IsEmpty()) { @@ -106,18 +106,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("StuMajorNo", queryParam["StuMajorNo"].ToString(), DbType.String); strSql.Append(" and a.MajorId=@StuMajorNo "); } + else + { + strSql.Append(" and a.MajorId='' "); + } if (!queryParam["StuGrade"].IsEmpty()) { dp.Add("StuGrade", queryParam["StuGrade"].ToString(), DbType.String); strSql.Append(" and a.Grade=@StuGrade "); } + else + { + strSql.Append(" and a.Grade='' "); + } //教学工作安排中“选课”工作设置的学年学期 var now = DateTime.Now; var EADateArrangeEntityAboutElective = this.BaseRepository("CollegeMIS").FindEntity(x => x.WorkName == "选课" && x.MakeDate <= now && x.EndDate >= now && x.CheckMark == "1"); if (EADateArrangeEntityAboutElective != null) { strSql.Append(" AND b.AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and b.Semester='" + EADateArrangeEntityAboutElective?.Semester + "'"); - strSql.Append(" and b.LessonName not in(select LessonName from StuSelectLessonListOfElective where AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and Semester='" + EADateArrangeEntityAboutElective?.Semester + "' and StuNo='"+ queryParam["StuNo"].ToString() + "' and Status<>3)"); + strSql.Append(" and b.LessonName not in(select LessonName from StuSelectLessonListOfElective where AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and Semester='" + EADateArrangeEntityAboutElective?.Semester + "' and StuNo='" + queryParam["StuNo"].ToString() + "' and Status<>3)"); } else {