@@ -35,13 +35,13 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a>*@ | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | <a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | ||||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 停用</a> | <a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 停用</a> | ||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i> 从开课计划导入</a> | <a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i> 从开课计划导入</a> | ||||
@@ -125,7 +125,7 @@ var bootstrap = function ($, learun) { | |||||
var postData = {}; | var postData = {}; | ||||
postData.strEntity = JSON.stringify(list); | postData.strEntity = JSON.stringify(list); | ||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveClass?EPLId=' + EPLId, postData, function (res) { | $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveClass?EPLId=' + EPLId, postData, function (res) { | ||||
console.log(res); | |||||
//console.log(res); | |||||
// 保存成功后才回调 | // 保存成功后才回调 | ||||
if (!!callBack) { | if (!!callBack) { | ||||
callBack(res, '', i); | callBack(res, '', i); | ||||
@@ -35,7 +35,7 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a>*@ | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | <a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | ||||
@@ -43,12 +43,12 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a>*@ | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | <a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | ||||
<a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 停用</a> | <a id="lr_unlock" class="btn btn-default"><i class="fa fa-unlock"></i> 停用</a> | ||||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
@*<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | |||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<a id="lr_importBy" class="btn btn-default"><i class="fa fa-plus"></i> 一键生成考试信息</a> | <a id="lr_importBy" class="btn btn-default"><i class="fa fa-plus"></i> 一键生成考试信息</a> | ||||
@@ -35,7 +35,7 @@ | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | <a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | ||||
</div> | </div> | ||||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | <div class=" btn-group btn-group-sm" learun-authorize="yes"> | ||||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
@*<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a>*@ | |||||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | <a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | ||||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | <a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | ||||
<a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | <a id="lr_lock" class="btn btn-default"><i class="fa fa-lock"></i> 启用</a> | ||||
@@ -224,17 +224,20 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); | |||||
{ | { | ||||
return false; | return false; | ||||
} | } | ||||
foreach (var planLesson in planLessonData) | |||||
else | |||||
{ | { | ||||
var planClassData = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId); | |||||
var planRoomData = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(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<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId); | |||||
var planRoomData = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == planLesson.EPLId); | |||||
if (planClassData.Count() <= 0 || planRoomData.Count() <= 0) | |||||
{ | |||||
return false; | |||||
} | |||||
} | } | ||||
} | } | ||||
return true; | return true; | ||||
} | } | ||||
catch (Exception ex) | 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_ArrangeExamTermNew where EPId='{keyValue}'"); | ||||
//删除考场明细 | //删除考场明细 | ||||
db.ExecuteBySql($"delete Exam_ArrangeExamTermItemNew where EPId='{keyValue}'"); | db.ExecuteBySql($"delete Exam_ArrangeExamTermItemNew where EPId='{keyValue}'"); | ||||
//排考安排明细数据 | |||||
List<Exam_ArrangeExamTermItemNewEntity> itemList = new List<Exam_ArrangeExamTermItemNewEntity>(); | |||||
foreach (var planLesson in planLessonData) | foreach (var planLesson in planLessonData) | ||||
{ | { | ||||
//排考安排明细数据 | |||||
List<Exam_ArrangeExamTermItemNewEntity> itemList = new List<Exam_ArrangeExamTermItemNewEntity>(); | |||||
//排考安排考场 | //排考安排考场 | ||||
var planRoomData = db.FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == planLesson.EPLId).ToList(); | var planRoomData = db.FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == planLesson.EPLId).ToList(); | ||||
//考场数 | //考场数 | ||||
int planRoomCount = planRoomData.Count(); | |||||
//int planRoomCount = planRoomData.Count(); | |||||
//添加排考安排数据 | //添加排考安排数据 | ||||
foreach (var planRoom in planRoomData) | foreach (var planRoom in planRoomData) | ||||
{ | { | ||||
@@ -320,7 +325,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); | |||||
//排考安排班级 | //排考安排班级 | ||||
var planClassData = db.FindList<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId); | var planClassData = db.FindList<Exam_ExamPlanClassEntity>(x => x.EPLId == planLesson.EPLId); | ||||
var classnos = string.Join("','", planClassData.Select(x => x.ClassNo).ToList()); | 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<Exam_ExamStudentEntity>(stuSql).ToList(); | var stuInfoList = db.FindList<Exam_ExamStudentEntity>(stuSql).ToList(); | ||||
var classInfo = db.FindList<ClassInfoEntity>(); | var classInfo = db.FindList<ClassInfoEntity>(); | ||||
@@ -207,12 +207,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
var stuinfo = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(); | |||||
//计算班级人数 | |||||
foreach (var entity in list) | |||||
{ | |||||
entity.ClassStuNum = stuinfo.Count(x => x.ClassNo == entity.ClassNo); | |||||
} | |||||
//var stuinfo = this.BaseRepository("CollegeMIS").FindList<StuInfoBasicEntity>(); | |||||
////计算班级人数 | |||||
//foreach (var entity in list) | |||||
//{ | |||||
// entity.ClassStuNum = stuinfo.Count(x => x.ClassNo == entity.ClassNo); | |||||
//} | |||||
this.BaseRepository("CollegeMIS").Insert(list); | this.BaseRepository("CollegeMIS").Insert(list); | ||||
//更新排考安排课程表实排班级数、实排人数 | //更新排考安排课程表实排班级数、实排人数 | ||||
//排考安排课程表Id | //排考安排课程表Id | ||||
@@ -71,16 +71,17 @@ select EPId from Exam_ExamPlanLesson where EPLId='{queryParam["EPLId"].ToString( | |||||
strSql.Append($" AND t.Semester = '{ELEntity.Semester}' "); | 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()) | if (!queryParam["EPRId"].IsEmpty()) | ||||
{ | { | ||||
empSql += $" and EPRId<>'{queryParam["EPRId"].ToString()}'"; | empSql += $" and EPRId<>'{queryParam["EPRId"].ToString()}'"; | ||||
} | } | ||||
var obj = this.BaseRepository("CollegeMIS").FindObject(empSql); | |||||
var obj = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(empSql).Select(x=>x.EmpNo).Distinct().ToList(); | |||||
if (obj != null) | 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}')"); | strSql.Append($" AND t.EmpNo not in ('{empNo}')"); | ||||
} | } | ||||
} | } | ||||