@@ -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); | ||||
} | } | ||||
@@ -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") | ||||
@@ -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); | ||||