Browse Source

安排考试 修改考试课程重复的问题

西昌缴费二期
zhangli 2 years ago
parent
commit
76d46882c6
3 changed files with 13 additions and 6 deletions
  1. +3
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs
  2. +5
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs
  3. +5
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs

+ 3
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamLesson/Exam_ExamLessonService.cs View File

@@ -230,13 +230,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
string sql = $@"insert into Exam_ExamLesson([ELId] string sql = $@"insert into Exam_ExamLesson([ELId]
,[AcademicYearNo] ,[AcademicYearNo]
,[Semester] ,[Semester]
,Grade,DeptNo,MajorNo
,Grade,
,[LessonName] ,[LessonName]
,[LessonNo] ,[LessonNo]
,[ELOrder] ,[ELOrder]
,[ELEnabled]) ,[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}' ) 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); return this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
} }


+ 5
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs View File

@@ -95,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{ {
try 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) catch (Exception ex)
{ {
@@ -182,9 +182,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
if (exam_ExamPlan.PlanType == "1") 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); this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
} }
else if (exam_ExamPlan.PlanType == "2") else if (exam_ExamPlan.PlanType == "2")


+ 5
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamStudent/Exam_ExamStudentService.cs View File

@@ -112,6 +112,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String);
strSql.Append(" AND t.ClassNo = @ClassNo "); 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()) if (!queryParam["StuNo"].IsEmpty())
{ {
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String);


Loading…
Cancel
Save