@@ -16,6 +16,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public class Exam_ArrangeExamTermNewController : MvcControllerBase | public class Exam_ArrangeExamTermNewController : MvcControllerBase | ||||
{ | { | ||||
private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL(); | private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL(); | ||||
private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); | |||||
#region 视图功能 | #region 视图功能 | ||||
@@ -26,7 +27,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult Index() | public ActionResult Index() | ||||
{ | { | ||||
return View(); | |||||
return View(); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 表单页 | /// 表单页 | ||||
@@ -35,7 +36,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
[HttpGet] | [HttpGet] | ||||
public ActionResult Form() | public ActionResult Form() | ||||
{ | { | ||||
return View(); | |||||
return View(); | |||||
} | } | ||||
/// <summary> | /// <summary> | ||||
/// 表单页 | /// 表单页 | ||||
@@ -51,6 +52,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public ActionResult SeatForm() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
@@ -69,14 +79,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
[HttpGet] | [HttpGet] | ||||
public ActionResult GetClassTree() | public ActionResult GetClassTree() | ||||
{ | { | ||||
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree()); | return Success(exam_ArrangeExamTermNewIBLL.GetClassTree()); | ||||
} | } | ||||
/// <summary> | |||||
/// 考场数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | [HttpGet] | ||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetClassRoomTree(string AcademicYearNo, string Semester) | |||||
{ | |||||
return Success(exam_ArrangeExamTermNewIBLL.GetClassRoomTree(AcademicYearNo, Semester)); | |||||
} | |||||
[HttpGet] | |||||
public ActionResult GetItemPageList(string pagination, string queryJson) | public ActionResult GetItemPageList(string pagination, string queryJson) | ||||
{ | { | ||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | Pagination paginationobj = pagination.ToObject<Pagination>(); | ||||
@@ -120,12 +139,31 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
[AjaxOnly] | [AjaxOnly] | ||||
public ActionResult GetFormData(string keyValue) | public ActionResult GetFormData(string keyValue) | ||||
{ | { | ||||
var ArrangeExamTermNewData = exam_ArrangeExamTermNewIBLL.GetExam_ArrangeExamTermNewEntity( keyValue ); | |||||
var jsonData = new { | |||||
var ArrangeExamTermNewData = exam_ArrangeExamTermNewIBLL.GetExam_ArrangeExamTermNewEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
ArrangeExamTermNew = ArrangeExamTermNewData, | ArrangeExamTermNew = ArrangeExamTermNewData, | ||||
}; | }; | ||||
return Success(jsonData); | return Success(jsonData); | ||||
} | } | ||||
/// <summary> | |||||
/// | |||||
/// </summary> | |||||
/// <param name="ClassRoomNo"></param> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <returns></returns> | |||||
public ActionResult GetSeatData(string ClassRoomNo, string AcademicYearNo, int? Semester) | |||||
{ | |||||
return Success(exam_ExamRoomIBLL.GetEntityByClassroomNo(ClassRoomNo, AcademicYearNo, Semester)); | |||||
} | |||||
public ActionResult GetSeatStuList(string ClassRoomNo, string AcademicYearNo, int? Semester) | |||||
{ | |||||
var data = exam_ArrangeExamTermNewIBLL.GetStuList(AcademicYearNo, Semester, ClassRoomNo); | |||||
return Success(data); | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||
@@ -154,7 +192,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | public ActionResult SaveForm(string keyValue, string strEntity) | ||||
{ | { | ||||
Exam_ArrangeExamTermNewEntity entity = strEntity.ToObject<Exam_ArrangeExamTermNewEntity>(); | Exam_ArrangeExamTermNewEntity entity = strEntity.ToObject<Exam_ArrangeExamTermNewEntity>(); | ||||
exam_ArrangeExamTermNewIBLL.SaveEntity(keyValue,entity); | |||||
exam_ArrangeExamTermNewIBLL.SaveEntity(keyValue, entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | if (string.IsNullOrEmpty(keyValue)) | ||||
{ | { | ||||
} | } | ||||
@@ -5,14 +5,14 @@ | |||||
<div class="lr-layout lr-layout-left-center"> | <div class="lr-layout lr-layout-left-center"> | ||||
<div class="lr-layout-left"> | <div class="lr-layout-left"> | ||||
<div class="lr-layout-wrap"> | <div class="lr-layout-wrap"> | ||||
<div class="lr-layout-title lrlt ">班级信息</div> | |||||
<div class="lr-layout-title lrlt ">考场信息</div> | |||||
<div id="dataTree" class="lr-layout-body"></div> | <div id="dataTree" class="lr-layout-body"></div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
<div class="lr-layout-center"> | <div class="lr-layout-center"> | ||||
<div class="lr-layout-wrap"> | <div class="lr-layout-wrap"> | ||||
<div class="lr-layout-title"> | <div class="lr-layout-title"> | ||||
<span id="titleinfo" class="lrlt">班级信息</span> | |||||
<span id="titleinfo" class="lrlt">考场信息</span> | |||||
</div> | </div> | ||||
<div class="lr-layout-tool"> | <div class="lr-layout-tool"> | ||||
<div class="lr-layout-tool-left"> | <div class="lr-layout-tool-left"> | ||||
@@ -25,9 +25,9 @@ | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="LessonNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | <div id="LessonNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | ||||
</div> | </div> | ||||
<div class="lr-layout-tool-item"> | |||||
@*<div class="lr-layout-tool-item"> | |||||
<div id="ClassRoomNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | <div id="ClassRoomNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | ||||
</div> | |||||
</div>*@ | |||||
<div class="lr-layout-tool-item"> | <div class="lr-layout-tool-item"> | ||||
<div id="EmpNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | <div id="EmpNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | ||||
</div> | </div> | ||||
@@ -41,6 +41,7 @@ | |||||
<div class="lr-layout-tool-right"> | <div class="lr-layout-tool-right"> | ||||
<div class=" btn-group btn-group-sm"> | <div class=" btn-group btn-group-sm"> | ||||
<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> | ||||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看</a> | |||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
@@ -11,7 +11,9 @@ var bootstrap = function ($, learun) { | |||||
"use strict"; | "use strict"; | ||||
var datebegin = ''; | var datebegin = ''; | ||||
var dateend = ''; | var dateend = ''; | ||||
var ClassNo = ''; | |||||
//var ClassNo = ''; | |||||
var ClassRoomNo = ''; | |||||
var page = { | var page = { | ||||
init: function () { | init: function () { | ||||
page.initGird(); | page.initGird(); | ||||
@@ -20,10 +22,11 @@ var bootstrap = function ($, learun) { | |||||
bind: function () { | bind: function () { | ||||
// 初始化左侧树形数据 | // 初始化左侧树形数据 | ||||
$('#dataTree').lrtree({ | $('#dataTree').lrtree({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassTree', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree', | |||||
nodeClick: function (item) { | nodeClick: function (item) { | ||||
ClassNo = item.id; | |||||
page.search({ ClassNo: item.id }); | |||||
ClassRoomNo = item.id; | |||||
page.search({ ClassRoomNo: item.id, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); | |||||
$('#titleinfo').html(item.text); | |||||
} | } | ||||
}); | }); | ||||
$('.datetime').each(function () { | $('.datetime').each(function () { | ||||
@@ -56,7 +59,7 @@ var bootstrap = function ($, learun) { | |||||
}); | }); | ||||
// 查询 | // 查询 | ||||
$('#btn_Search').on('click', function () { | $('#btn_Search').on('click', function () { | ||||
page.search({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); | |||||
page.search({ ClassRoomNo: ClassRoomNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); | |||||
}); | }); | ||||
// 刷新 | // 刷新 | ||||
$('#lr_refresh').on('click', function () { | $('#lr_refresh').on('click', function () { | ||||
@@ -78,30 +81,121 @@ var bootstrap = function ($, learun) { | |||||
value: 'value', | value: 'value', | ||||
text: 'text' | text: 'text' | ||||
}); | }); | ||||
//课程 | |||||
//$('#LessonNo').lrselect({ | |||||
// placeholder: "请选择课程", | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||||
// value: 'value', | |||||
// text: 'text' | |||||
//}); | |||||
$('#AcademicYearNo').bind('change', function () { | |||||
var AcademicYearNo = ''; | |||||
var Semester = ''; | |||||
if ($('#AcademicYearNo').lrselectGet()) { | |||||
AcademicYearNo = $('#AcademicYearNo').lrselectGet() | |||||
} | |||||
if ($('#Semester').lrselectGet()) { | |||||
var Semester = $('#Semester').lrselectGet(); | |||||
} | |||||
if (Semester != '' && AcademicYearNo != '') { | |||||
$('#dataTree').lrtree({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree?AcademicYearNo = ' + AcademicYearNo + ' &Semester=' + Semester, | |||||
nodeClick: function (item) { | |||||
ClassRoomNo = item.value; | |||||
page.search({ ClassRoomNo: item.value, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
$('#Semester').bind('change', function () { | |||||
var AcademicYearNo = ''; | |||||
var Semester = ''; | |||||
if ($('#AcademicYearNo').lrselectGet()) { | |||||
AcademicYearNo = $('#AcademicYearNo').lrselectGet() | |||||
} | |||||
if ($('#Semester').lrselectGet()) { | |||||
var Semester = $('#Semester').lrselectGet(); | |||||
} | |||||
if (Semester != '' && AcademicYearNo != '') { | |||||
$('#dataTree').lrtree({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassRoomTree?AcademicYearNo = ' + AcademicYearNo + ' &Semester=' + Semester, | |||||
nodeClick: function (item) { | |||||
ClassRoomNo = item.value; | |||||
page.search({ ClassRoomNo: item.value, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); | $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); | ||||
$('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); | $('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); | ||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); | $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); | ||||
$('#lr_view').on('click', function () { | |||||
var AcademicYearNo = ''; | |||||
var Semester = ''; | |||||
if (!ClassRoomNo) { | |||||
learun.alert.warning("请选择考场"); | |||||
return; | |||||
} | |||||
if ($('#AcademicYearNo').lrselectGet()) { | |||||
AcademicYearNo = '22-23'//$('#AcademicYearNo').lrselectGet(); | |||||
} | |||||
if ($('#Semester').lrselectGet()) { | |||||
Semester = '2'//$('#Semester').lrselectGet(); | |||||
} | |||||
////弹框文件名字SeatForm | |||||
if (Semester != '' && AcademicYearNo != '') { | |||||
///学生数据 | |||||
//$.ajax({ | |||||
// url: '/EducationalAdministration/Exam_ArrangeExamTermNew/GetSeatStuList', | |||||
// data: { ClassRoomNo: ClassRoomNo, AcademicYearNo: AcademicYearNo, Semester, Semester }, | |||||
// type: "Post", | |||||
// dataType: "json", | |||||
// async: true, | |||||
// cache: false, | |||||
// success: function (data) { | |||||
// console.log(data) | |||||
// }, | |||||
// error: function (XMLHttpRequest, textStatus, errorThrown) { | |||||
// }, | |||||
// beforeSend: function () { | |||||
// }, | |||||
// complete: function () { | |||||
// } | |||||
//}); | |||||
//座位数据 | |||||
// | |||||
//$.ajax({ | |||||
// url: '/EducationalAdministration/Exam_ArrangeExamTermNew/GetSeatData', | |||||
// data: { ClassRoomNo: ClassRoomNo, AcademicYearNo: AcademicYearNo, Semester, Semester }, | |||||
// type: "Post", | |||||
// dataType: "json", | |||||
// async: true, | |||||
// cache: false, | |||||
// success: function (data) { | |||||
//console.log(data1) | |||||
// }, | |||||
// error: function (XMLHttpRequest, textStatus, errorThrown) { | |||||
// }, | |||||
// beforeSend: function () { | |||||
// }, | |||||
// complete: function () { | |||||
// } | |||||
//}); | |||||
} | |||||
}); | |||||
}, | }, | ||||
initGird: function () { | initGird: function () { | ||||
$('#gridtable').jfGrid({ | $('#gridtable').jfGrid({ | ||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetItemPageList', | url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetItemPageList', | ||||
headData: [ | headData: [ | ||||
{ label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, | |||||
{ label: '学期', name: 'Semester', width: 60, align: "left" }, | |||||
{ label: '学年', name: 'AcademicYearNo', width: 60, align: "left" }, | |||||
{ label: '学期', name: 'Semester', width: 45, align: "left" }, | |||||
{ | { | ||||
label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { | |||||
label: '考试日期', name: 'ExamDate', width: 90, align: "left", formatter: function (v) { | |||||
return learun.formatDate(v, "yyyy-MM-dd"); | return learun.formatDate(v, "yyyy-MM-dd"); | ||||
} | } | ||||
}, | }, | ||||
{ label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, | |||||
{ label: '考试时间', name: 'ExamTime', width: 90, align: "left" }, | |||||
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | ||||
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" }, | { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, | ||||
{ label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, | { label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, | ||||
@@ -109,12 +203,12 @@ var bootstrap = function ($, learun) { | |||||
{ label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, | { label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, | ||||
{ label: '教室名称', name: 'ClassroomName', width: 100, align: "left" }, | { label: '教室名称', name: 'ClassroomName', width: 100, align: "left" }, | ||||
{ label: '班级名称', name: 'ClassName', 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" }, | |||||
{ label: '座位编号', name: 'SitNumber', width: 100, aligndd: "left" } | |||||
{ label: '学生编号', name: 'StuNo', width: 130, align: "left" }, | |||||
{ label: '学生姓名', name: 'StuName', width: 100, align: "left" }, | |||||
{ label: '座位编号', name: 'SitNumber', width: 80, aligndd: "left" } | |||||
], | ], | ||||
mainId: 'AETId', | mainId: 'AETId', | ||||
sidx: 'ExamDate asc, LessonNo asc,ClassRoomNo asc,ClassNo asc,SitNumber asc', | |||||
sidx: ' AcademicYearNo desc,Semester desc,ExamDate desc, LessonNo desc,ClassRoomNo desc,ClassRoomNo desc,SitNumber asc ', | |||||
isPage: true | isPage: true | ||||
}); | }); | ||||
page.search(); | page.search(); | ||||
@@ -123,7 +217,7 @@ var bootstrap = function ($, learun) { | |||||
param = param || {}; | param = param || {}; | ||||
param.StartTime = datebegin; | param.StartTime = datebegin; | ||||
param.EndTime = dateend; | param.EndTime = dateend; | ||||
console.log(param); | |||||
param.ClassRoomNo = ClassRoomNo; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | ||||
} | } | ||||
}; | }; | ||||
@@ -1092,6 +1092,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexForClass.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexForClass.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexItem.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexItem.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\SeatForm.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormExamTime.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormExamTime.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.js" /> | ||||
@@ -1336,6 +1337,7 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\IndexStudent.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\IndexStudent.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\IndexTeach.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\IndexTeach.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\SyncByConditionForm.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\SyncByConditionForm.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\SeatForm.cshtml" /> | |||||
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | <None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" /> | ||||
@@ -53,6 +53,44 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 考场 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public List<TreeModel> GetClassRoomTree(string AcademicYearNo, string Semester) | |||||
{ | |||||
try | |||||
{ | |||||
var list = exam_ArrangeExamTermNewService.GetClassRoomTree(AcademicYearNo, Semester); | |||||
List<TreeModel> treeList = new List<TreeModel>(); | |||||
foreach (var item in list) | |||||
{ | |||||
TreeModel node = new TreeModel | |||||
{ | |||||
id = item.ClassroomNo, | |||||
text = item.ClassroomName, | |||||
value = item.ClassroomNo, | |||||
showcheck = false, | |||||
checkstate = 0, | |||||
isexpand = true, | |||||
parentId = "0" | |||||
}; | |||||
treeList.Add(node); | |||||
} | |||||
return treeList.ToTree(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson) | public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson) | ||||
{ | { | ||||
try | try | ||||
@@ -91,6 +129,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ArrangeExamTermNewService.GetStuList(AcademicYearNo, Semester, ClassRoomNo); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -16,8 +16,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
#region 获取数据 | #region 获取数据 | ||||
List<TreeModel> GetClassTree(); | List<TreeModel> GetClassTree(); | ||||
List<TreeModel> GetClassRoomTree(string AcademicYearNo, string Semester); | |||||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson); | IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson); | ||||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetItemPageList(Pagination pagination, string queryJson); | IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetItemPageList(Pagination pagination, string queryJson); | ||||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo); | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -37,7 +37,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 考场数据去重 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_ExamRoomEntity> GetClassRoomTree(string AcademicYearNo, string Semester) | |||||
{ | |||||
try | |||||
{ | |||||
var sql = @" select e.ClassroomNo,e.ClassroomName from Exam_ArrangeExamTermItemNew e join ( | |||||
select ClassroomNo, ClassroomName from Exam_ExamRoom where 1 = 1 "; | |||||
if (!AcademicYearNo.IsEmpty()) | |||||
{ | |||||
sql += $" and AcademicYearNo ='{AcademicYearNo}' "; | |||||
} | |||||
if (!Semester.IsEmpty()) | |||||
{ | |||||
sql += $" and Semester ={Semester} "; | |||||
} | |||||
sql += @" ) a on e.ClassroomName=a.ClassroomName and e.ClassroomNo =a.ClassroomNo | |||||
group by e.ClassroomNo,e.ClassroomName"; | |||||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamRoomEntity>(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson) | public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson) | ||||
{ | { | ||||
try | try | ||||
@@ -280,6 +316,33 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
} | } | ||||
/// <summary> | |||||
/// 获取排考详情 | |||||
/// </summary> | |||||
/// <param name="pagination"></param> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetStuList(string AcademicYearNo, int? Semester, string ClassRoomNo) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append(@"select t.*,e.AcademicYearNo,e.Semester from Exam_ArrangeExamTermItemNew t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 and t.ClassNo is not null | |||||
and e.AcademicYearNo ='" + AcademicYearNo + "' and e.Semester='" + Semester + "' and Classroomno= '" + ClassRoomNo + "' "); | |||||
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString()); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | #endregion | ||||
#region 提交数据 | #region 提交数据 | ||||