var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认安排课程!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanLessonByEPId', { keyValue: keyValue }, function () {
@@ -183,6 +196,10 @@ var bootstrap = function ($, learun) {
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认安排班级!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanClassByEPId', { keyValue: keyValue }, function () {
@@ -198,6 +215,10 @@ var bootstrap = function ($, learun) {
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认安排考场!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanRoomByEPId', { keyValue: keyValue }, function () {
@@ -213,6 +234,10 @@ var bootstrap = function ($, learun) {
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认生成排考时间!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanLessonTimeByEPId', { keyValue: keyValue }, function () {
@@ -222,12 +247,16 @@ var bootstrap = function ($, learun) {
});
}
});
//一键安排监考老师
$('#lr_examteacher').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认安排监考老师!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanTeacherByEPId', { keyValue: keyValue }, function () {
@@ -237,12 +266,16 @@ var bootstrap = function ($, learun) {
});
}
});
//一键审核所有考试课程
$('#lr_checkAll').on('click',
function () {
var keyValue = $('#gridtable').jfGridValue('EPId');
if (learun.checkrow(keyValue)) {
var EPGenarate = $('#gridtable').jfGridValue('EPGenarate');
if (EPGenarate == true) {
return learun.alert.warning("选中记录已生成排考名单!");
}
learun.layerConfirm('是否确认审核所有考试课程!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/CheckAllPlanLesson', { keyValue: keyValue }, function () {
+ 23- 20
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlan/Exam_ExamPlanService.cs파일 보기
@@ -285,7 +285,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
var EPClass = db.FindList<Exam_ExamPlanClassEntity>($"select * from Exam_ExamPlanClass where eplid in ('{EPLIds}')");
if (EPClass.Count() <= 0)
{
return (false,"请安排班级!");
return (false,"请安排班级!");
}
//排考考场
@@ -294,16 +294,16 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
{
return (false, "请安排考场!");
}
if (EPRoom.Where(x => string.IsNullOrEmpty(x.EmpNo)).Count() <= 0)
if (EPRoom.Where(x => string.IsNullOrEmpty(x.EmpNo)).Count() > 0)
{
return (false, "请安排监考老师!");
}
if (planLessonData.Where(x => x.ELCheckMark == false).Count() <= 0)
if (planLessonData.Where(x => x.ELCheckMark == true).Count() <= 0)
{
return (false, "请先安排考试!");
}
return (true, "");
}
catch (Exception ex)
@@ -339,6 +339,9 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
//删除考场明细
db.ExecuteBySql($"delete Exam_ArrangeExamTermItemNew where EPId='{keyValue}'");
var classInfo = db.FindList<ClassInfoEntity>();
//排考班级
var planClassList = db.FindList<Exam_ExamPlanClassEntity>();
foreach (var planLesson in planLessonData)
{
//排考安排明细数据
@@ -346,8 +349,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
//排考安排考场
var planRoomData = db.FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == planLesson.EPLId).ToList();
//考场数
//int planRoomCount = planRoomData.Count();
//添加排考安排数据
foreach (var planRoom in planRoomData)
{
@@ -366,7 +368,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
var sealNumArr = getRanNum(planRoom.SeatCount.Value);
for (int n = 0; n < sealNumArr.Count; n++)
{
@@ -389,12 +391,11 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');");
}
//排考安排班级
var planClassData = db.FindList<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId);
var planClassData = planClassList.Where(x => x.EPLId == planLesson.EPLId);
var classnos = string.Join("','", planClassData.Select(x => x.ClassNo).ToList());
string stuSql = $"select * from Exam_ExamStudent where ESEnabled=1 and 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<Exam_ExamStudentEntity>(stuSql).ToList();