diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs index 93acdbd95..ec2d11ebf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs @@ -230,13 +230,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration string sql = $@"insert into Exam_ExamLesson([ELId] ,[AcademicYearNo] ,[Semester] -,Grade,DeptNo,MajorNo +,Grade, ,[LessonName] ,[LessonNo] ,[ELOrder] ,[ELEnabled]) -select NEWID(),AcademicYearNo,Semester,Grade,DeptNo,MajorNo,LessonName,[LessonNo],0,1 from OpenLessonPlan where lessonsortno=1 and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' +select NEWID(),AcademicYearNo,Semester,Grade,LessonName,[LessonNo],0,1 from OpenLessonPlan where lessonsortno=1 and AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and [LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) + group by LessonNo,LessonName,AcademicYearNo,Semester,Grade "; return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs index d2f60c98b..39db48cf6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs @@ -95,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - return this.BaseRepository("CollegeMIS").FindTable($" select distinct EPLId,LessonName,LessonNo from Exam_ExamPlanLesson where EPId='{EPId}'"); + return this.BaseRepository("CollegeMIS").FindTable($" select distinct EPLId,LessonName,LessonNo from Exam_ExamPlanLesson where EPId='{EPId}' order by LessonNo"); } catch (Exception ex) { @@ -182,9 +182,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration if (exam_ExamPlan.PlanType == "1") { //必修 - string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,ELId,LessonName,LessonNo) -select NEWID(),'{EPId}',ELId,LessonName,LessonNo from Exam_ExamLesson where AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' - and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}')"; + string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo) +select NEWID(),'{EPId}',LessonName+'('+grade+')',LessonNo+'('+grade+')' from Exam_ExamLesson where AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' + and LessonNo not in (select LessonNo+'('+grade+')' from Exam_ExamPlanLesson where EPId='{EPId}') + group by LessonNo,grade,LessonName"; this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } else if (exam_ExamPlan.PlanType == "2") 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 f95d16c92..2250f2fde 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 @@ -112,6 +112,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); strSql.Append(" AND t.ClassNo = @ClassNo "); } + if (!queryParam["ClassName"].IsEmpty()) + { + dp.Add("ClassName", "%" + queryParam["ClassName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.ClassName Like @ClassName "); + } if (!queryParam["StuNo"].IsEmpty()) { dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String);