From 7086ccdf38a895ca95bf00f29214b64a18bd8f17 Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Thu, 5 May 2022 14:54:44 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A4=84=E7=90=86=E6=8E=92=E8=80=83=E6=96=B0?=
=?UTF-8?q?=E5=A2=9E=E8=80=83=E5=9C=BA=E6=97=B6=E7=9B=91=E8=80=83=E8=80=81?=
=?UTF-8?q?=E5=B8=88=E9=87=8D=E5=A4=8D=E9=80=89=E6=8B=A9=E9=97=AE=E9=A2=98?=
=?UTF-8?q?=E5=92=8C=E7=8F=AD=E7=BA=A7=E4=BA=BA=E6=95=B0=E4=B8=8D=E6=AD=A3?=
=?UTF-8?q?=E7=A1=AE=EF=BC=8C=E5=A4=84=E7=90=86=E6=8E=92=E8=80=83=E5=90=8D?=
=?UTF-8?q?=E5=8D=95=E6=95=B0=E6=8D=AE=E4=B8=8D=E6=AD=A3=E7=A1=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Views/Exam_ExamLesson/Index.cshtml | 4 +--
.../Views/Exam_ExamPlanLesson/FormClass.js | 2 +-
.../Views/Exam_ExamRoom/Index.cshtml | 2 +-
.../Views/Exam_ExamStudent/Index.cshtml | 4 +--
.../Views/Exam_InvigilateTeacher/Index.cshtml | 2 +-
.../Exam_ExamPlan/Exam_ExamPlanService.cs | 25 +++++++++++--------
.../Exam_ExamPlanClassService.cs | 12 ++++-----
.../Exam_InvigilateTeacherService.cs | 7 +++---
8 files changed, 32 insertions(+), 26 deletions(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml
index 0e0739330..d6544f6f8 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamLesson/Index.cshtml
@@ -35,13 +35,13 @@
从开课计划导入
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js
index b3a30d490..de2e32fff 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js
@@ -125,7 +125,7 @@ var bootstrap = function ($, learun) {
var postData = {};
postData.strEntity = JSON.stringify(list);
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveClass?EPLId=' + EPLId, postData, function (res) {
- console.log(res);
+ //console.log(res);
// 保存成功后才回调
if (!!callBack) {
callBack(res, '', i);
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml
index 3354a819e..05a38db32 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamRoom/Index.cshtml
@@ -35,7 +35,7 @@
-
新增
+ @*
新增*@
编辑
删除
启用
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml
index d95c20fac..cb0cbb85a 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.cshtml
@@ -43,12 +43,12 @@
一键生成考试信息
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.cshtml
index c3939ac7d..6edcfcc99 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.cshtml
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.cshtml
@@ -35,7 +35,7 @@
-
新增
+ @*
新增*@
编辑
删除
启用
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs
index 3ca32a8b9..98d10feb6 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs
@@ -224,17 +224,20 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
{
return false;
}
-
- foreach (var planLesson in planLessonData)
+ else
{
- var planClassData = this.BaseRepository("CollegeMIS").FindList
(x => x.EPLId == planLesson.EPLId);
- var planRoomData = this.BaseRepository("CollegeMIS").FindList(x => x.EPLId == planLesson.EPLId);
- if (planClassData.Count() <= 0 || planRoomData.Count() <= 0)
+ foreach (var planLesson in planLessonData)
{
- return false;
+ var planClassData = this.BaseRepository("CollegeMIS").FindList(x => x.EPLId == planLesson.EPLId);
+ var planRoomData = this.BaseRepository("CollegeMIS").FindList(x => x.EPLId == planLesson.EPLId);
+ if (planClassData.Count() <= 0 || planRoomData.Count() <= 0)
+ {
+ return false;
+ }
}
}
+
return true;
}
catch (Exception ex)
@@ -269,14 +272,16 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
db.ExecuteBySql($"delete Exam_ArrangeExamTermNew where EPId='{keyValue}'");
//删除考场明细
db.ExecuteBySql($"delete Exam_ArrangeExamTermItemNew where EPId='{keyValue}'");
- //排考安排明细数据
- List itemList = new List();
+
foreach (var planLesson in planLessonData)
{
+ //排考安排明细数据
+ List itemList = new List();
+
//排考安排考场
var planRoomData = db.FindList(x => x.EPLId == planLesson.EPLId).ToList();
//考场数
- int planRoomCount = planRoomData.Count();
+ //int planRoomCount = planRoomData.Count();
//添加排考安排数据
foreach (var planRoom in planRoomData)
{
@@ -320,7 +325,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
//排考安排班级
var planClassData = db.FindList(x => x.EPLId == planLesson.EPLId);
var classnos = string.Join("','", planClassData.Select(x => x.ClassNo).ToList());
- string stuSql = $"select * from Exam_ExamStudent where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ESType='{examPlan.PlanType}' and classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}')";
+ string stuSql = $"select * from Exam_ExamStudent where AcademicYearNo='{examPlan.AcademicYearNo}' and Semester='{examPlan.Semester}' and ESType='{examPlan.PlanType}' and classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}' and LessonNo='{planLesson.LessonNo}')";
//所有考生
var stuInfoList = db.FindList(stuSql).ToList();
var classInfo = db.FindList();
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 0d192394e..ece9887d0 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
@@ -207,12 +207,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
- var stuinfo = this.BaseRepository("CollegeMIS").FindList();
- //计算班级人数
- foreach (var entity in list)
- {
- entity.ClassStuNum = stuinfo.Count(x => x.ClassNo == entity.ClassNo);
- }
+ //var stuinfo = this.BaseRepository("CollegeMIS").FindList();
+ ////计算班级人数
+ //foreach (var entity in list)
+ //{
+ // entity.ClassStuNum = stuinfo.Count(x => x.ClassNo == entity.ClassNo);
+ //}
this.BaseRepository("CollegeMIS").Insert(list);
//更新排考安排课程表实排班级数、实排人数
//排考安排课程表Id
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs
index d0fb8287d..b480ccb57 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_InvigilateTeacher/Exam_InvigilateTeacherService.cs
@@ -71,16 +71,17 @@ select EPId from Exam_ExamPlanLesson where EPLId='{queryParam["EPLId"].ToString(
strSql.Append($" AND t.Semester = '{ELEntity.Semester}' ");
}
- var empSql = $"select EmpNo from Exam_ExamPlanRoom where EPLId='{queryParam["EPLId"].ToString()}'";
+ var empSql = $@"SELECT DISTINCT EPLId, STUFF( (SELECT ',' + empno FROM Exam_ExamPlanRoom WHERE EPLId = T.EPLId FOR XML PATH('') ), 1, 1, '') AS empno FROM Exam_ExamPlanRoom AS T
+ where EPLId ='{queryParam["EPLId"].ToString()}'";
if (!queryParam["EPRId"].IsEmpty())
{
empSql += $" and EPRId<>'{queryParam["EPRId"].ToString()}'";
}
- var obj = this.BaseRepository("CollegeMIS").FindObject(empSql);
+ var obj = this.BaseRepository("CollegeMIS").FindList(empSql).Select(x=>x.EmpNo).Distinct().ToList();
if (obj != null)
{
- var empNo = string.Join("','", obj.ToString().Split(','));
+ var empNo = string.Join("','", obj[0].ToString().Split(',').Distinct());
strSql.Append($" AND t.EmpNo not in ('{empNo}')");
}
}