@@ -37,10 +37,58 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | { | ||||
return View(); | return View(); | ||||
} | } | ||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult IndexForClass() | |||||
{ | |||||
return View(); | |||||
} | |||||
[HttpGet] | |||||
public ActionResult IndexItem() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | #endregion | ||||
#region 获取数据 | #region 获取数据 | ||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageListForClass(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = exam_ArrangeExamTermNewIBLL.GetPageListForClass(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
[HttpGet] | |||||
public ActionResult GetClassTree() | |||||
{ | |||||
return Success(exam_ArrangeExamTermNewIBLL.GetClassTree()); | |||||
} | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetItemPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = exam_ArrangeExamTermNewIBLL.GetItemPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -0,0 +1,51 @@ | |||||
@{ | |||||
ViewBag.Title = "排考2021新"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout lr-layout-left-center"> | |||||
<div class="lr-layout-left"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title lrlt ">班级信息</div> | |||||
<div id="dataTree" class="lr-layout-body"></div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title"> | |||||
<span id="titleinfo" class="lrlt">班级信息</span> | |||||
</div> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="LessonNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="ClassRoomNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="EmpNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch" class="datetime"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js") |
@@ -0,0 +1,132 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-12-08 12:19 | |||||
* 描 述:排考2021新 | |||||
*/ | |||||
var selectedRow; | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var datebegin = ''; | |||||
var dateend = ''; | |||||
var ClassNo = ''; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 初始化左侧树形数据 | |||||
$('#dataTree').lrtree({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassTree', | |||||
nodeClick: function (item) { | |||||
ClassNo = item.id; | |||||
page.search({ ClassNo: item.id }); | |||||
} | |||||
}); | |||||
$('.datetime').each(function () { | |||||
$(this).lrdate({ | |||||
dfdata: [ | |||||
{ name: '清空', begin: function () { return '' }, end: function () { return '' } }, | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
dfvalue: '0', | |||||
selectfn: function (begin, end) { | |||||
datebegin = begin; | |||||
dateend = end; | |||||
} | |||||
}); | |||||
}); | |||||
// 查询 | |||||
$('#btn_Search').on('click', function () { | |||||
page.search({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "学年", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "学期", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//课程 | |||||
//$('#LessonNo').lrselect({ | |||||
// placeholder: "请选择课程", | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||||
// value: 'value', | |||||
// text: 'text' | |||||
//}); | |||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); | |||||
$('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); | |||||
}, | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetPageListForClass', | |||||
headData: [ | |||||
{ label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, | |||||
{ label: '学期', name: 'Semester', width: 60, align: "left" }, | |||||
{ label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { | |||||
return learun.formatDate(v, "yyyy-MM-dd"); | |||||
} }, | |||||
{ label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, | |||||
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | |||||
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" }, | |||||
{ label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, | |||||
{ label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" }, | |||||
{ label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, | |||||
{ label: '教室名称', name: 'ClassroomName', width: 100, align: "left" }, | |||||
{ label: '班级名称', name: 'ClassName', width: 100, align: "left" }, | |||||
{ label: '班级人数', name: 'ClassStuNum', width: 60, align: "left" }, | |||||
{ label: '学号范围', name: 'StuNoRange', width: 200, align: "left" } | |||||
], | |||||
mainId: 'AETId', | |||||
sidx: 'examdate,examtime,lessonno,classroomname ', | |||||
sord:'asc', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = datebegin; | |||||
param.EndTime = dateend; | |||||
//console.log(param); | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,51 @@ | |||||
@{ | |||||
ViewBag.Title = "排考2021新"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout lr-layout-left-center"> | |||||
<div class="lr-layout-left"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title lrlt ">班级信息</div> | |||||
<div id="dataTree" class="lr-layout-body"></div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title"> | |||||
<span id="titleinfo" class="lrlt">班级信息</span> | |||||
</div> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="AcademicYearNo" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="Semester" type="lrselect" class="lr-select lr-selectLittle" style="width: 80px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="LessonNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="ClassRoomNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="EmpNo" type="lrselect" class="lr-select" style="width: 200px;"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="datesearch" class="datetime"></div> | |||||
</div> | |||||
<div class="lr-layout-tool-item"> | |||||
<a id="btn_Search" class="btn btn-primary btn-sm"><i class="fa fa-search"></i> 查询</a> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-tool-right"> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js") |
@@ -0,0 +1,134 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2021-12-08 12:19 | |||||
* 描 述:排考2021新 | |||||
*/ | |||||
var selectedRow; | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var datebegin = ''; | |||||
var dateend = ''; | |||||
var ClassNo = ''; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 初始化左侧树形数据 | |||||
$('#dataTree').lrtree({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetClassTree', | |||||
nodeClick: function (item) { | |||||
ClassNo = item.id; | |||||
page.search({ ClassNo: item.id }); | |||||
} | |||||
}); | |||||
$('.datetime').each(function () { | |||||
$(this).lrdate({ | |||||
dfdata: [ | |||||
{ name: '清空', begin: function () { return '' }, end: function () { return '' } }, | |||||
{ name: '今天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00') }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近7天', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'd', -6) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近1个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -1) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
{ name: '近3个月', begin: function () { return learun.getDate('yyyy-MM-dd 00:00:00', 'm', -3) }, end: function () { return learun.getDate('yyyy-MM-dd 23:59:59') } }, | |||||
], | |||||
// 月 | |||||
mShow: false, | |||||
premShow: false, | |||||
// 季度 | |||||
jShow: false, | |||||
prejShow: false, | |||||
// 年 | |||||
ysShow: false, | |||||
yxShow: false, | |||||
preyShow: false, | |||||
yShow: false, | |||||
// 默认 | |||||
dfvalue: '0', | |||||
selectfn: function (begin, end) { | |||||
datebegin = begin; | |||||
dateend = end; | |||||
} | |||||
}); | |||||
}); | |||||
// 查询 | |||||
$('#btn_Search').on('click', function () { | |||||
page.search({ ClassNo: ClassNo, AcademicYearNo: $('#AcademicYearNo').lrselectGet(), Semester: $('#Semester').lrselectGet(), LessonNo: $('#LessonNo').lrselectGet(), ClassRoomNo: $('#ClassRoomNo').lrselectGet(), EmpNo: $('#EmpNo').lrselectGet() }); | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "学年", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "学期", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//课程 | |||||
//$('#LessonNo').lrselect({ | |||||
// placeholder: "请选择课程", | |||||
// allowSearch: true, | |||||
// url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', | |||||
// value: 'value', | |||||
// text: 'text' | |||||
//}); | |||||
$('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); | |||||
$('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); | |||||
$('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); | |||||
}, | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ArrangeExamTermNew/GetItemPageList', | |||||
headData: [ | |||||
{ label: '学年', name: 'AcademicYearNo', width: 70, align: "left" }, | |||||
{ label: '学期', name: 'Semester', width: 60, align: "left" }, | |||||
{ | |||||
label: '考试日期', name: 'ExamDate', width: 100, align: "left", formatter: function (v) { | |||||
return learun.formatDate(v, "yyyy-MM-dd"); | |||||
} | |||||
}, | |||||
{ label: '考试时间', name: 'ExamTime', width: 120, align: "left" }, | |||||
{ label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, | |||||
{ label: '课程名称', name: 'LessonName', width: 200, align: "left" }, | |||||
{ label: '监考教师编号', name: 'EmpNo', width: 150, align: "left" }, | |||||
{ label: '监考教师姓名', name: 'EmpName', width: 150, align: "left" }, | |||||
{ label: '教室编号', name: 'ClassroomNo', width: 100, align: "left" }, | |||||
{ label: '教室名称', name: 'ClassroomName', 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" } | |||||
], | |||||
mainId: 'AETId', | |||||
sidx: 'ExamDate asc, LessonNo asc,ClassRoomNo asc,ClassNo asc,SitNumber asc', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
param.StartTime = datebegin; | |||||
param.EndTime = dateend; | |||||
console.log(param); | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -1001,6 +1001,8 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Index.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_ExamPlanLesson\FormTeacher.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormTeacher.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoomTeacher.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoomTeacher.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoom.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoom.js" /> | ||||
@@ -7699,6 +7701,8 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\Index.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuEnrollScore\Index.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Index.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\MajorAndSubject\Index.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexForClass.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexItem.cshtml" /> | |||||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | <None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | ||||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | <None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | ||||
<Content Include="Views\Login\Default-beifen.cshtml" /> | <Content Include="Views\Login\Default-beifen.cshtml" /> | ||||
@@ -65,6 +65,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
[Column("CLASSROOMNO")] | [Column("CLASSROOMNO")] | ||||
public string ClassroomNo { get; set; } | public string ClassroomNo { get; set; } | ||||
/// <summary> | /// <summary> | ||||
/// 班级 | |||||
/// </summary> | |||||
[Column("CLASSNAME")] | |||||
public string ClassName { get; set; } | |||||
/// <summary> | |||||
/// 班级 | |||||
/// </summary> | |||||
[Column("CLASSNO")] | |||||
public string ClassNo { get; set; } | |||||
/// <summary> | |||||
/// 校区Id | /// 校区Id | ||||
/// </summary> | /// </summary> | ||||
[Column("F_SCHOOLID")] | [Column("F_SCHOOLID")] | ||||
@@ -104,6 +114,15 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
} | } | ||||
#endregion | #endregion | ||||
#region 扩展字段 | #region 扩展字段 | ||||
[NotMapped] | |||||
public int ClassStuNum { get; set; } | |||||
[NotMapped] | |||||
public string StuNoRange { get; set; } | |||||
[NotMapped] | |||||
public string AcademicYearNo { get; set; } | |||||
[NotMapped] | |||||
public string Semester { get; set; } | |||||
#endregion | #endregion | ||||
} | } | ||||
} | } | ||||
@@ -18,6 +18,79 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
#region 获取数据 | #region 获取数据 | ||||
public List<TreeModel> GetClassTree() | |||||
{ | |||||
try | |||||
{ | |||||
var list = exam_ArrangeExamTermNewService.GetClassTree(); | |||||
List<TreeModel> treeList = new List<TreeModel>(); | |||||
foreach (var item in list) | |||||
{ | |||||
TreeModel node = new TreeModel | |||||
{ | |||||
id = item.ClassNo, | |||||
text = item.ClassName, | |||||
value = item.ClassNo, | |||||
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) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ArrangeExamTermNewService.GetPageListForClass(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetItemPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ArrangeExamTermNewService.GetItemPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -15,6 +15,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
#region 获取数据 | #region 获取数据 | ||||
List<TreeModel> GetClassTree(); | |||||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson); | |||||
IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetItemPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
/// </summary> | /// </summary> | ||||
@@ -4,6 +4,7 @@ using Learun.Util; | |||||
using System; | using System; | ||||
using System.Collections.Generic; | using System.Collections.Generic; | ||||
using System.Data; | using System.Data; | ||||
using System.Linq; | |||||
using System.Text; | using System.Text; | ||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | namespace Learun.Application.TwoDevelopment.EducationalAdministration | ||||
@@ -18,6 +19,154 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
public class Exam_ArrangeExamTermNewService : RepositoryFactory | public class Exam_ArrangeExamTermNewService : RepositoryFactory | ||||
{ | { | ||||
#region 获取数据 | #region 获取数据 | ||||
public IEnumerable<ClassInfoEntity> GetClassTree() | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>("select ClassNo,ClassName from Exam_ArrangeExamTermItemNew where ClassNo is not null group by ClassNo,ClassName order by ClassNo"); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetPageListForClass(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append(@"select t.EPId,AcademicYearNo, Semester, ExamDate, ExamTime, LessonNo, LessonName,ClassRoomNo,ClassRoomName,EmpNo, EmpName, ClassNo,ClassName, count(StuNo) as ClassStuNum | |||||
from [dbo].[Exam_ArrangeExamTermItemNew] t join Exam_ExamPlan e on t.EPId=e.EPId where 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and AcademicYearNo='" + queryParam["AcademicYearNo"].ToString() + "' "); | |||||
} | |||||
if (!queryParam["Semester"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and Semester='" + queryParam["Semester"].ToString() + "' "); | |||||
} | |||||
if (!queryParam["LessonNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and LessonNo='" + queryParam["LessonNo"].ToString() + "' "); | |||||
} | |||||
if (!queryParam["ClassNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and ClassNo='" + queryParam["ClassNo"].ToString() + "' "); | |||||
} | |||||
if (!queryParam["EmpNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' "); | |||||
} | |||||
if (!queryParam["ClassRoomNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); | |||||
} | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); | |||||
} | |||||
strSql.Append(@" group by AcademicYearNo, Semester, ExamDate, ExamTime,LessonNo, LessonName,ClassRoomNo,ClassRoomName,EmpNo, EmpName, ClassNo,ClassName,t.EPId | |||||
"); | |||||
var list = this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString(), pagination).Where(x => x.ClassStuNum > 0); | |||||
var stulist = BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>("select * from Exam_ArrangeExamTermItemNew"); | |||||
foreach (var item in list) | |||||
{ | |||||
if (item.ClassStuNum > 0) | |||||
{ | |||||
var stunolist = stulist.Where(x => x.EPId == item.EPId && x.ClassNo == item.ClassNo && x.ClassroomNo == item.ClassroomNo).OrderBy(x => x.StuNo);// stulist.Where(m => m.AcademicYearNo == item.AcademicYearNo && m.Semester == item.Semester | |||||
//&& m.LessonNo == item.LessonNo && m.ExamDate == item.ExamDate && m.ExamTime == item.ExamTime | |||||
//&& m.ClassRoomNo == item.ClassRoomNo && m.EmpNo == item.EmpNo && m.ClassNo == item.ClassNo).OrderBy(m => m.StuNo); | |||||
if (stunolist.Count() > 0) | |||||
{ | |||||
item.StuNoRange = stunolist.First().StuNo + "~" + stunolist.Last().StuNo; | |||||
} | |||||
} | |||||
} | |||||
return list; | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取排考详情 | |||||
/// </summary> | |||||
/// <param name="pagination"></param> | |||||
/// <param name="queryJson"></param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_ArrangeExamTermItemNewEntity> GetItemPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
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 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and e.AcademicYearNo='" + queryParam["AcademicYearNo"].ToString() + "' "); | |||||
} | |||||
if (!queryParam["Semester"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and e.Semester='" + queryParam["Semester"].ToString() + "' "); | |||||
} | |||||
if (!queryParam["LessonNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.LessonNo='" + queryParam["LessonNo"].ToString() + "' "); | |||||
} | |||||
if (!queryParam["ClassNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.ClassNo='" + queryParam["ClassNo"].ToString() + "' "); | |||||
} | |||||
if (!queryParam["StuNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.StuNo='" + queryParam["StuNo"].ToString() + "' "); | |||||
} | |||||
if (!queryParam["EmpNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.EmpNo like '%" + queryParam["EmpNo"].ToString() + "%' "); | |||||
} | |||||
if (!queryParam["ClassRoomNo"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" and t.ClassRoomNo='" + queryParam["ClassRoomNo"].ToString() + "' "); | |||||
} | |||||
if (!queryParam["StartTime"].IsEmpty() && !queryParam["EndTime"].IsEmpty()) | |||||
{ | |||||
strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermItemNewEntity>(strSql.ToString(), null, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | /// <summary> | ||||
/// 获取页面显示列表数据 | /// 获取页面显示列表数据 | ||||
@@ -49,7 +198,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
var dp = new DynamicParameters(new { }); | var dp = new DynamicParameters(new { }); | ||||
if (!queryParam["ExamDate"].IsEmpty()) | if (!queryParam["ExamDate"].IsEmpty()) | ||||
{ | { | ||||
dp.Add("ExamDate",queryParam["ExamDate"].ToString(), DbType.String); | |||||
dp.Add("ExamDate", queryParam["ExamDate"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ExamDate = @ExamDate "); | strSql.Append(" AND t.ExamDate = @ExamDate "); | ||||
} | } | ||||
if (!queryParam["LessonNo"].IsEmpty()) | if (!queryParam["LessonNo"].IsEmpty()) | ||||
@@ -82,7 +231,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
dp.Add("ClassroomName", "%" + queryParam["ClassroomName"].ToString() + "%", DbType.String); | dp.Add("ClassroomName", "%" + queryParam["ClassroomName"].ToString() + "%", DbType.String); | ||||
strSql.Append(" AND t.ClassroomName Like @ClassroomName "); | strSql.Append(" AND t.ClassroomName Like @ClassroomName "); | ||||
} | } | ||||
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermNewEntity>(strSql.ToString(),dp, pagination); | |||||
return this.BaseRepository("CollegeMIS").FindList<Exam_ArrangeExamTermNewEntity>(strSql.ToString(), dp, pagination); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -133,7 +282,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | { | ||||
try | try | ||||
{ | { | ||||
this.BaseRepository("CollegeMIS").Delete<Exam_ArrangeExamTermNewEntity>(t=>t.EPIId == keyValue); | |||||
this.BaseRepository("CollegeMIS").Delete<Exam_ArrangeExamTermNewEntity>(t => t.EPIId == keyValue); | |||||
} | } | ||||
catch (Exception ex) | catch (Exception ex) | ||||
{ | { | ||||
@@ -295,7 +295,7 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); | |||||
string stuSql = $"select * from StuInfoBasic where checkMark='1' and classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}')"; | string stuSql = $"select * from StuInfoBasic where checkMark='1' and classno in ('{classnos}') and stuno not in (select StuNo from Exam_ArrangeExamTermItemNew where EPId='{keyValue}')"; | ||||
//所有考生 | //所有考生 | ||||
var stuInfoList = db.FindList<StuInfoBasicEntity>(stuSql).ToList(); | var stuInfoList = db.FindList<StuInfoBasicEntity>(stuSql).ToList(); | ||||
var classInfo = db.FindList<ClassInfoEntity>(); | |||||
if (itemList.Count >= stuInfoList.Count()) | if (itemList.Count >= stuInfoList.Count()) | ||||
{ | { | ||||
//随机安排座位 | //随机安排座位 | ||||
@@ -307,6 +307,9 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); | |||||
{ | { | ||||
itemList[i].StuNo = stuInfoList[i].StuNo; | itemList[i].StuNo = stuInfoList[i].StuNo; | ||||
itemList[i].StuName = stuInfoList[i].StuName; | itemList[i].StuName = stuInfoList[i].StuName; | ||||
itemList[i].ClassNo = stuInfoList[i].ClassNo; | |||||
itemList[i].ClassName = classInfo.Where(x => x.ClassNo == stuInfoList[i].ClassNo) | |||||
.Select(x => x.ClassName).FirstOrDefault(); | |||||
} | } | ||||
db.Insert(itemList); | db.Insert(itemList); | ||||
@@ -321,6 +324,9 @@ delete from Exam_ExamPlanRoom where EPLId in ('{planLessonIds}');"); | |||||
{ | { | ||||
itemList[i].StuNo = stuInfoList[i].StuNo; | itemList[i].StuNo = stuInfoList[i].StuNo; | ||||
itemList[i].StuName = stuInfoList[i].StuName; | itemList[i].StuName = stuInfoList[i].StuName; | ||||
itemList[i].ClassNo = stuInfoList[i].ClassNo; | |||||
itemList[i].ClassName = classInfo.Where(x => x.ClassNo == stuInfoList[i].ClassNo) | |||||
.Select(x => x.ClassName).FirstOrDefault(); | |||||
} | } | ||||
db.Insert(itemList); | db.Insert(itemList); | ||||