From 7ace77b0177decc2a0dc48b75096239884e5ec1f Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 24 Mar 2023 17:27:21 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=83=E5=8A=A1=E7=AE=A1=E7=90=86-=E8=80=83?= =?UTF-8?q?=E8=AF=95=E5=AE=89=E6=8E=92=20=E6=95=99=E5=B8=88/=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=20=E6=9C=AA=E5=9B=9E=E6=98=BE=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrangeExamTermNew/IndexForLesson.cshtml | 4 ++-- .../ArrangeExamTermNew/IndexForLesson.js | 4 ++-- .../Views/ArrangeExamTermNew/IndexItem.js | 6 ++++- .../Views/ArrangeExamTermNew/IndexStudent.js | 6 ++--- .../Views/ArrangeExamTermNew/IndexTeach.js | 10 ++++----- .../Learun.Application.Web.csproj | 22 +++++++------------ .../Exam_ExamLesson/Exam_ExamLessonService.cs | 2 +- .../Exam_ExamPlanClassService.cs | 14 ++---------- .../Exam_ExamPlanLessonService.cs | 4 ++-- .../Exam_ExamStudentService.cs | 17 +++++++++----- 10 files changed, 41 insertions(+), 48 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexForLesson.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexForLesson.cshtml index ae98199b2..1b18cfb40 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexForLesson.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexForLesson.cshtml @@ -27,9 +27,9 @@
-
+ @* +
*@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexForLesson.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexForLesson.js index 2d16b8c18..4f6e604f6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexForLesson.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexForLesson.js @@ -86,7 +86,7 @@ var bootstrap = function ($, learun) { }, initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetPageListForLesson', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetPageListForLesson', headData: [ { label: '学年', name: 'AcademicYearNo', width: 80, align: "left" }, { label: '学期', name: 'Semester', width: 80, align: "left" }, @@ -99,7 +99,7 @@ var bootstrap = function ($, learun) { { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, { label: '课程名称', name: 'LessonName', width: 200, align: "left" } ], - mainId: 'AETId', + mainId: 'EPLId', sidx: 'ExamDate ,ExamTime,LessonNo', isPage: true }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js index e1a4ab860..1f38f96e0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexItem.js @@ -96,7 +96,11 @@ var bootstrap = function ($, learun) { headData: [ { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, { label: '学期', name: 'Semester', width: 60, align: "left" }, - { label: '考试日期', name: 'ExamDate', width: 120, align: "left" }, + { + label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { + return learun.formatDate(v, "yyyy-MM-dd"); + } + }, { label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js index 54a0f88b0..f13a59389 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js @@ -60,7 +60,7 @@ var bootstrap = function ($, learun) { }, initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetItemPageList', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetItemPageList', headData: [ { label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, { label: '学期', name: 'Semester', width: 60, align: "left" }, @@ -70,8 +70,8 @@ var bootstrap = function ($, learun) { { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, { label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, { label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" }, - { label: '教室编号', name: 'ClassRoomNo', width: 100, align: "left" }, - { label: '教室名称', name: 'ClassRoomName', width: 100, align: "left" }, + { label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, + { label: '教室名称', name: 'ClassroomName', width: 100, align: "left" }, { label: '班级名称', name: 'ClassName', width: 100, align: "left" }, { label: '学生编号', name: 'StuNo', width: 100, align: "left" }, { label: '学生姓名', name: 'StuName', width: 200, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js index d2e51623e..2348b5e1e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js @@ -73,7 +73,7 @@ var bootstrap = function ($, learun) { }, initGird: function () { $('#gridtable').lrAuthorizeJfGrid({ - url: top.$.rootUrl + '/EducationalAdministration/ArrangeExamTermNew/GetPageList', + url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetPageList', headData: [ { label: '考试日期', name: 'ExamDate', width: 200, align: "left", formatter: function (v) { @@ -85,11 +85,11 @@ var bootstrap = function ($, learun) { { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, { label: '教师编号', name: 'EmpNo', width: 200, align: "left" }, { label: '教师姓名', name: 'EmpName', width: 200, align: "left" }, - { label: '教室编号', name: 'ClassRoomNo', width: 200, align: "left" }, - { label: '教室名称', name: 'ClassRoomName', width: 200, align: "left" } + { label: '教室编号', name: 'ClassroomNo', width: 200, align: "left" }, + { label: '教室名称', name: 'ClassroomName', width: 200, align: "left" } ], - mainId: 'AETId', - sidx: 'ExamDate asc,ExamTime asc,LessonNo asc,ClassRoomNo asc', + mainId: 'EPIId', + sidx: 'ExamDate asc,ExamTime asc,LessonNo asc,ClassroomNo asc', isPage: true }); page.search(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 84bbb6e6f..a6dead558 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -1025,21 +1025,13 @@ - - - - - - - - @@ -1336,6 +1328,14 @@ + + + + + + + + @@ -8047,12 +8047,6 @@ - - - - - - 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 e07b9e48d..9c701d454 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 @@ -266,7 +266,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ,[LessonNo] ,[ELOrder] ,[ELEnabled],ExamTime,LessonTypeId,DeptNo,MajorNo) -select NEWID(),AcademicYearNo,t.Semester,replace(Grade,'级','') Grade,t.LessonName,t.[LessonNo],0,1,'{ExamTime}',a.lessontypeid,t.DeptNo,t.MajorNo from OpenLessonPlan t +select NEWID(),AcademicYearNo,t.Semester,Grade,t.LessonName,t.[LessonNo],0,1,'{ExamTime}',a.lessontypeid,t.DeptNo,t.MajorNo from OpenLessonPlan t left join lessoninfo a on t.lessonno=a.lessonno where t.ExamType='1' and t.lessonsortno=1 and t.AcademicYearNo='{AcademicYearNo}' and t.Semester='{Semester}' and t.[LessonNo] not in (select [LessonNo] from Exam_ExamLesson where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' ) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs index 8a3befa7b..84ce9608a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs @@ -265,15 +265,6 @@ and examtime is not null and datediff(day, examdate, '{examPlanLesson.ExamDate}' //{ // entity.ClassStuNum = stuinfo.Count(x => x.ClassNo == entity.ClassNo); //} - var classList = this.BaseRepository("CollegeMIS").FindList(x => x.CheckMark == true); - if (list.Exists(x => string.IsNullOrEmpty(x.ClassName))) - { - foreach (var item in list.Where(x => string.IsNullOrEmpty(x.ClassName)).ToList()) - { - item.ClassName = classList.Where(x => x.ClassNo == item.ClassNo).FirstOrDefault().ClassName; - } - } - this.BaseRepository("CollegeMIS").Insert(list); //更新排考安排课程表实排班级数、实排人数 //排考安排课程表Id @@ -352,7 +343,7 @@ where a.EPId='{EPId}'"); var addSql = $@"insert into Exam_ExamPlanClass SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.Grade='{lesson.Grade}' -and t.ESType='{examPlan.PlanType}' and c.majorno='{lesson.TeachMajorNo}' and (t.ClassNo is not null and len(t.ClassNo)>0) +and t.ESType='{examPlan.PlanType}' and c.majorno='{lesson.TeachMajorNo}' and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}') group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "; db.ExecuteBySql(addSql); @@ -363,8 +354,7 @@ and t.ESType='{examPlan.PlanType}' and c.majorno='{lesson.TeachMajorNo}' and (t. var addSql = $@"insert into Exam_ExamPlanClass SELECT NEWID(),'{lesson.EPLId}',c.ClassName,t.ClassNo,count(1) as StuNum FROM Exam_ExamStudent t left join classinfo c on t.ClassNo=c.ClassNo WHERE t.ESEnabled=1 and t.AcademicYearNo='{examPlan.AcademicYearNo}' and t.Semester='{examPlan.Semester}' and t.ESType='{examPlan.PlanType}' and t.Grade='{lesson.Grade}' - and (t.ClassNo is not null and len(t.ClassNo)>0) -and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}') + and t.ClassNo not in (select ClassNo from [dbo].[Exam_ExamPlanClass] where EPLId='{lesson.EPLId}') group by t.ClassNo,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "; db.ExecuteBySql(addSql); } 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 75cab56f9..37f74e960 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 @@ -343,7 +343,7 @@ from StuScore a left join StuInfoBasic b on b.StuNo=a.StuNo join (select l.lessonno,l.LessonTypeId,lt.ltorder from Exam_ExamLesson l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.elenabled=1 and l.AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and l.Semester='{exam_ExamPlan.Semester}' ) t on a.lessonno=t.lessonno --left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) - and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) + and (b.ChangeStatus<>'1' or len(b.ChangeStatus)=0 or b.ChangeStatus is null) and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' and a.LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') group by t.ltorder,a.LessonNo,a.lessonname,t.LessonTypeId,b.Grade"; @@ -358,7 +358,7 @@ and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan join (select l.lessonno,l.LessonTypeId,lt.ltorder from Exam_ExamLesson l left join CdLessonType lt on l.LessonTypeId=lt.ltid where l.elenabled=1 and l.AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and l.Semester='{exam_ExamPlan.Semester}' ) t on a.lessonno=t.lessonno --left join (select l.lessonno,l.LessonTypeId,lt.ltorder from lessoninfo l left join CdLessonType lt on l.LessonTypeId=lt.ltid ) t on a.lessonno=t.lessonno where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) - and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) + and (b.ChangeStatus<>'1' or len(b.ChangeStatus)=0 or b.ChangeStatus is null) and AcademicYearNo='{exam_ExamPlan.AcademicYearNo}' and Semester='{exam_ExamPlan.Semester}' and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}') group by t.ltorder,a.LessonNo,a.lessonname,t.LessonTypeId,b.Grade "; 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 0f299888d..d28bbd245 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 @@ -94,7 +94,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append(@" t.ClassNo,count(1) as StuNum,t.AcademicYearNo,t.Semester,t.ESType,c.ClassName "); strSql.Append(" FROM Exam_ExamStudent t "); strSql.Append(" left join classinfo c on t.ClassNo=c.ClassNo "); - strSql.Append(" WHERE t.ESEnabled=1 and (t.ClassNo is not null and len(t.ClassNo)>0) "); + strSql.Append(" WHERE t.ESEnabled=1 "); var queryParam = queryJson.ToJObject(); // 虚拟参数 var dp = new DynamicParameters(new { }); @@ -361,8 +361,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { strSql.Append( $@"insert into Exam_ExamStudent(ESId,ClassNo,AcademicYearNo,Semester,StuNo,StuName,ESType,ESEnabled,Grade) - select newid(), a.classno, '{AcademicYearNo}', '{Semester}', a.stuno, a.stuname, '{ESType}', 1,a.Grade from StuInfoBasic a where CheckMark = '1' and stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo = '{AcademicYearNo}' and Semester = '{Semester}' and ESType = '1' union - select StuNo from StuInfoBasicChange where StuChangeType in ('04','05','06') and CheckStatus='1')"); + select newid(), a.classno, '{AcademicYearNo}', '{Semester}', a.stuno, a.stuname, '{ESType}', 1,a.Grade +from StuInfoBasic a where CheckMark = '1' and (ChangeStatus is null or len(ChangeStatus)=0 or ChangeStatus='0') and stuno not in +(select stuno from Exam_ExamStudent where AcademicYearNo = '{AcademicYearNo}' and Semester = '{Semester}' and ESType = '1' + +)"); } else { @@ -379,9 +382,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append(@" a left join StuInfoBasic b on b.StuNo=a.StuNo where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); strSql.Append(" and a.AcademicYearNo ='" + AcademicYearNo + "' and a.Semester ='" + Semester + "' "); - strSql.Append(" and (b.AbmormityMoveMark<>'1' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); - strSql.Append($@" and a.stuno not in (select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' union - select StuNo from StuInfoBasicChange where StuChangeType in ('04','05','06') and CheckStatus='1' ) "); + strSql.Append(" and (b.ChangeStatus<>'1' or len(b.ChangeStatus)=0 or b.ChangeStatus is null) "); + strSql.Append($@" and a.stuno not in +(select stuno from Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType='{ESType}' + +) "); strSql.Append(" group by a.stuno,a.stuname,a.classno,b.Grade"); } return this.BaseRepository("CollegeMIS").ExecuteBySql(strSql.ToString());