diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js
index 183bfbeaa..ca4a672f3 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js
@@ -237,7 +237,21 @@ var bootstrap = function ($, learun) {
});
}
});
-
+
+ //一键审核所有考试课程
+ $('#lr_checkAll').on('click',
+ function () {
+ var keyValue = $('#gridtable').jfGridValue('EPId');
+ if (learun.checkrow(keyValue)) {
+ learun.layerConfirm('是否确认审核所有考试课程!', function (res) {
+ if (res) {
+ learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/CheckAllPlanLesson', { keyValue: keyValue }, function () {
+ refreshGirdData();
+ });
+ }
+ });
+ }
+ });
//老师时间管理
$('#lr_teacherTimeManage').on('click', function () {
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs
index 5961c20fc..b69de675b 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs
@@ -340,6 +340,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
+
+ public (bool flag, string str) CheckAllPlanLesson(string EPId)
+ {
+ try
+ {
+ return exam_ExamPlanLessonService.CheckAllPlanLesson(EPId);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
#endregion
}
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs
index f1c23aab6..1bdef576f 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs
@@ -57,6 +57,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
(bool flag, string msg) PlanLessonTimeByEPId(string keyValue);
(bool flag, string str) IsAllowSave(Exam_ExamPlanLessonEntity entity);
(bool flag, string lessonname) IsExamTimeClash(Exam_ExamPlanLessonEntity entity);
+ (bool flag, string str) CheckAllPlanLesson(string keyValue);
#endregion
}
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 8737dad17..043ebbcf5 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
@@ -561,6 +561,7 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId
}
}
}
+
///
/// 自动生成考试课程排考时间
///
@@ -683,6 +684,40 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId
}
}
+ ///
+ /// 一键审核考试课程
+ ///
+ ///
+ ///
+ public (bool flag, string str) CheckAllPlanLesson(string EPId)
+ {
+ var db = this.BaseRepository("CollegeMIS");
+ try
+ {
+ db.BeginTrans();
+ var list = db.FindList
($"select * FROM Exam_ExamPlanLesson where epid='{EPId}' and examdate is not null and ExamTime is not null and SeatCount>0 and realstucount>0 and SeatCount>=realstucount");
+ var EPLIds = string.Join("','", list.Select(x => x.EPLId).ToList());
+ string sql = $"update Exam_ExamPlanLesson set ELCheckMark='1' where EPLId in ('{EPLIds}')";
+ db.ExecuteBySql(sql);
+ //更新排考记录表是否生成字段
+ string updsql = $"update Exam_ExamPlan set EPGenarate=0 where EPId='{EPId}'";
+ db.ExecuteBySql(updsql);
+ db.Commit();
+ return (true, "");
+ }
+ catch (Exception ex)
+ {
+ db.Rollback();
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowServiceException(ex);
+ }
+ }
+ }
#endregion
}