@@ -0,0 +1,187 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Web.Mvc; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-04-12 15:47 | |||||
/// 描 述:考试课程表 | |||||
/// </summary> | |||||
public class Exam_ExamStudentController : MvcControllerBase | |||||
{ | |||||
private Exam_ExamStudentIBLL exam_ExamStudentIBLL = new Exam_ExamStudentBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 表单页 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Form() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 导入 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormImport() | |||||
{ | |||||
return View(); | |||||
} | |||||
/// <summary> | |||||
/// 按条件清空 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult FormClear() | |||||
{ | |||||
return View(); | |||||
} | |||||
#endregion | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetPageList(string pagination, string queryJson) | |||||
{ | |||||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||||
var data = exam_ExamStudentIBLL.GetPageList(paginationobj, queryJson); | |||||
var jsonData = new | |||||
{ | |||||
rows = data, | |||||
total = paginationobj.total, | |||||
page = paginationobj.page, | |||||
records = paginationobj.records | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取表单数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetFormData(string keyValue) | |||||
{ | |||||
var Exam_ExamStudentData = exam_ExamStudentIBLL.GetExam_ExamStudentEntity(keyValue); | |||||
var jsonData = new | |||||
{ | |||||
Exam_ExamStudent = Exam_ExamStudentData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
exam_ExamStudentIBLL.DeleteEntity(keyValue); | |||||
return Success("删除成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="strEntity">实体</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[ValidateAntiForgeryToken] | |||||
[AjaxOnly] | |||||
public ActionResult SaveForm(string keyValue, string strEntity) | |||||
{ | |||||
Exam_ExamStudentEntity entity = strEntity.ToObject<Exam_ExamStudentEntity>(); | |||||
#region 去重 | |||||
var model = exam_ExamStudentIBLL.GetExam_ExamStudentbyStuNo(entity.StuNo); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
if (model != null && model.AcademicYearNo == entity.AcademicYearNo && model.Semester == entity.Semester && model.ESType == entity.ESType) | |||||
{ | |||||
return Fail("此学生考试数据已存在!"); | |||||
} | |||||
} | |||||
else | |||||
{ | |||||
if (model != null && model.ESId != keyValue && model.AcademicYearNo == entity.AcademicYearNo && model.Semester == entity.Semester && model.ESType == entity.ESType) | |||||
{ | |||||
return Fail("此学生考试数据已存在!"); | |||||
} | |||||
} | |||||
#endregion | |||||
exam_ExamStudentIBLL.SaveEntity(keyValue, entity); | |||||
return Success("保存成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 启用/停用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="ESEnabled"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult Lock(string keyValue, int ESEnabled) | |||||
{ | |||||
exam_ExamStudentIBLL.Lock(keyValue, ESEnabled); | |||||
return Success("操作成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 清空数据 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <param name="ESType"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
[ValidateAntiForgeryToken] | |||||
public ActionResult ClearTable(string AcademicYearNo, string Semester, string ESType) | |||||
{ | |||||
int res = exam_ExamStudentIBLL.ClaerForm(AcademicYearNo, Semester, ESType); | |||||
return Success("清空(" + res + ")条数据成功!"); | |||||
} | |||||
public ActionResult ImportTable(string AcademicYearNo, string Semester, string ESType) | |||||
{ | |||||
int res = exam_ExamStudentIBLL.ImportForm(AcademicYearNo, Semester, ESType); | |||||
return Success("同步(" + res + ")条数据成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,35 @@ | |||||
@{ | |||||
ViewBag.Title = "考试课程表"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||||
<div class="lr-form-item-title">学生学号<font face="宋体">*</font></div> | |||||
<input id="StuNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||||
<div class="lr-form-item-title">学生姓名<font face="宋体">*</font></div> | |||||
<input id="StuName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||||
<div class="lr-form-item-title">考试类型<font face="宋体">*</font></div> | |||||
<div id="ESType" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||||
<div class="lr-form-item-title">排序号</div> | |||||
<input id="ESOrder" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||||
<div class="lr-form-item-title">是否启用<font face="宋体">*</font></div> | |||||
<div id="ESEnabled" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/Form.js") |
@@ -0,0 +1,100 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-12 15:47 | |||||
* 描 述:考试课程表 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "学年", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "学期", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||||
$('#ESEnabled').lrRadioCheckbox({ | |||||
type: 'radio', | |||||
code: 'YesOrNoBit', | |||||
}); | |||||
//监听学号 | |||||
$("#StuNo").on('blur', function () { | |||||
var StuNo = $(this).val(); | |||||
if (StuNo) { | |||||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfo?Account=' + StuNo, '', function (data) { | |||||
if (data) { | |||||
$("#StuNo").val(data.StuNo); | |||||
$("#StuName").val(data.StuName); | |||||
} else { | |||||
learun.alert.warning("学生不存在!"); | |||||
//return false; | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//监听姓名 | |||||
$("#StuName").on('blur', function () { | |||||
var StuName = $(this).val().trim(); | |||||
if (StuName) { | |||||
learun.httpAsync('get', top.$.rootUrl + '/EducationalAdministration/StuInfoBasic/GetStuInfoBasicEntityByStuName?name=' + StuName, '', function (data) { | |||||
if (data) { | |||||
$("#StuNo").val(data.StuNo); | |||||
$("#StuName").val(data.StuName); | |||||
} else { | |||||
learun.alert.warning("学生不存在!"); | |||||
return false; | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,19 @@ | |||||
@{ | |||||
ViewBag.Title = "考试课程表"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson" > | |||||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||||
<div id="Semester" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||||
<div class="lr-form-item-title">考试类型</div> | |||||
<div id="ESType"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormClear.js") |
@@ -0,0 +1,58 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-12 15:47 | |||||
* 描 述:考试课程表 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "学年", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text', | |||||
maxHeight: 200, | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "学期", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||||
Semester: $('#Semester').lrselectGet(), | |||||
ESType: $('#ESType').lrselectGet() | |||||
}; | |||||
learun.layerConfirm('是否确认清空!', function (res) { | |||||
if (res) { | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/ClearTable', postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,19 @@ | |||||
@{ | |||||
ViewBag.Title = "考试课程表"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamLesson"> | |||||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||||
<div id="Semester" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamStudent"> | |||||
<div class="lr-form-item-title">考试类型<font face="宋体">*</font></div> | |||||
<div id="ESType" isvalid="yes" checkexpession="NotNull"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/FormImport.js") |
@@ -0,0 +1,69 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-12 15:47 | |||||
* 描 述:考试课程表 | |||||
*/ | |||||
var acceptClick; | |||||
var keyValue = request('keyValue'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
$('.lr-form-wrap').lrscroll(); | |||||
page.bind(); | |||||
page.initData(); | |||||
}, | |||||
bind: function () { | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "学年", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text', | |||||
maxHeight: 200, | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "学期", | |||||
allowSearch: false, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/GetFormData?keyValue=' + keyValue, function (data) { | |||||
for (var id in data) { | |||||
if (!!data[id].length && data[id].length > 0) { | |||||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||||
} | |||||
else { | |||||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||||
} | |||||
} | |||||
}); | |||||
} | |||||
} | |||||
}; | |||||
// 保存数据 | |||||
acceptClick = function (callBack) { | |||||
if (!$('body').lrValidform()) { | |||||
return false; | |||||
} | |||||
var postData = { | |||||
AcademicYearNo: $('#AcademicYearNo').lrselectGet(), | |||||
Semester: $('#Semester').lrselectGet(), | |||||
ESType: $('#ESType').lrselectGet() | |||||
}; | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/ImportTable?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,59 @@ | |||||
@{ | |||||
ViewBag.Title = "考试课程表"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout "> | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">学年</div> | |||||
<div id="AcademicYearNo"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">学期</div> | |||||
<div id="Semester"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学生学号</div> | |||||
<input id="StuNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学生名称</div> | |||||
<input id="StuName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">考试类型</div> | |||||
<div id="ESType"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</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 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_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_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_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||||
</div> | |||||
<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_clearBy" class="btn btn-default"><i class="fa fa-plus"></i> 按条件清空学生考试信息</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamStudent/Index.js") |
@@ -0,0 +1,198 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-12 15:47 | |||||
* 描 述:考试课程表 | |||||
*/ | |||||
var refreshGirdData; | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||||
page.search(queryJson); | |||||
}, 220, 400); | |||||
$('#AcademicYearNo').lrselect({ | |||||
placeholder: "学年", | |||||
allowSearch: true, | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
//学期 | |||||
$('#Semester').lrselect({ | |||||
placeholder: "学期", | |||||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||||
value: 'value', | |||||
text: 'text' | |||||
}); | |||||
$('#ESType').lrDataItemSelect({ code: 'StudentType' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ESId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
if (keyValue.indexOf(',') != -1) { | |||||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||||
return false; | |||||
} | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ESId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//启用 | |||||
$('#lr_lock').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ESId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var ESEnabled = $('#gridtable').jfGridValue('ESEnabled'); | |||||
if (ESEnabled.indexOf('true') != -1) { | |||||
learun.alert.warning("选中记录中包含已启用项目!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认启用选中记录!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Lock', { keyValue: keyValue, ESEnabled: 1 }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//禁用 | |||||
$('#lr_unlock').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ESId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var ESEnabled = $('#gridtable').jfGridValue('ESEnabled'); | |||||
if (ESEnabled.indexOf('false') != -1) { | |||||
learun.alert.warning("选中记录中包含已停用项目!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认停用选中记录!', function (res) { | |||||
if (res) { | |||||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/Lock', { keyValue: keyValue, ESEnabled: 0 }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
// 一键生成 | |||||
$('#lr_importBy').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form_import', | |||||
title: '生成考试信息', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/FormImport', | |||||
width: 500, | |||||
height: 300, | |||||
btn: ['一键生成', '关闭'], | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 导入 | |||||
$('#lr_clearBy').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form_clear', | |||||
title: '按条件清空学生考试信息', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/FormClear', | |||||
width: 500, | |||||
height: 300, | |||||
btn: ['确定', '关闭'], | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamStudent/GetPageList', | |||||
headData: [ | |||||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||||
{ label: "学生学号", name: "StuNo", width: 100, align: "left" }, | |||||
{ label: "学生姓名", name: "StuName", width: 100, align: "left" }, | |||||
{ | |||||
label: "考试类型", name: "ESType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'StudentType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ | |||||
label: "是否启用", name: "ESEnabled", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||||
} | |||||
}, | |||||
], | |||||
mainId: 'ESId', | |||||
isMultiselect: true, | |||||
isPage: true, | |||||
sidx: 'AcademicYearNo desc,Semester desc', | |||||
sord: 'ASC' | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -326,7 +326,7 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\EvaDormitoryInteriorController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\EvaDormitoryInteriorController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\EvaHygieveController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\EvaHygieveController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\EvaViolationOfDisciplineController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\EvaViolationOfDisciplineController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamRoomController.cs" /> | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamStudentController.cs" /> | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\FillinFromController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\FillinFromController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\HomeStatisticsController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\HomeStatisticsController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\LeaveSchoolAController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\LeaveSchoolAController.cs" /> | ||||
@@ -992,9 +992,11 @@ | |||||
<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_ExamRoom\Form.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\FormYearSemester.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormImport.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Form.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\FormClear.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\FormImport.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\FillinFrom\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormIndex.js" /> | <Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormIndex.js" /> | ||||
@@ -7617,10 +7619,12 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwo.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwo.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\StuScore\AllStuScoreQueryIndex.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\StuScore\AllStuScoreQueryIndex.cshtml" /> | ||||
<Content Include="Areas\PersonnelManagement\Views\TimeTable\ClassIndexInEducation.cshtml" /> | <Content Include="Areas\PersonnelManagement\Views\TimeTable\ClassIndexInEducation.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormImport.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\FormImport.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\FormClear.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\FormYearSemester.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Index.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" /> | ||||
@@ -0,0 +1,29 @@ | |||||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||||
using System.Data.Entity.ModelConfiguration; | |||||
namespace Learun.Application.Mapping | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-04-12 15:47 | |||||
/// 描 述:考试课程表 | |||||
/// </summary> | |||||
public class Exam_ExamStudentMap : EntityTypeConfiguration<Exam_ExamStudentEntity> | |||||
{ | |||||
public Exam_ExamStudentMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("EXAM_EXAMSTUDENT"); | |||||
//主键 | |||||
this.HasKey(t => t.ESId); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -82,7 +82,7 @@ | |||||
<Compile Include="EducationalAdministration\DispatchAuditMap.cs" /> | <Compile Include="EducationalAdministration\DispatchAuditMap.cs" /> | ||||
<Compile Include="EducationalAdministration\DispatchMap.cs" /> | <Compile Include="EducationalAdministration\DispatchMap.cs" /> | ||||
<Compile Include="EducationalAdministration\EADateArrangeMap.cs" /> | <Compile Include="EducationalAdministration\EADateArrangeMap.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamRoomMap.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamStudent.cs" /> | |||||
<Compile Include="EducationalAdministration\LeaveSchoolMap.cs" /> | <Compile Include="EducationalAdministration\LeaveSchoolMap.cs" /> | ||||
<Compile Include="EducationalAdministration\PracticeBaseMap.cs" /> | <Compile Include="EducationalAdministration\PracticeBaseMap.cs" /> | ||||
<Compile Include="EducationalAdministration\R_EnterBuildingMap.cs" /> | <Compile Include="EducationalAdministration\R_EnterBuildingMap.cs" /> | ||||
@@ -0,0 +1,223 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-04-12 15:47 | |||||
/// 描 述:考试课程表 | |||||
/// </summary> | |||||
public class Exam_ExamStudentBLL : Exam_ExamStudentIBLL | |||||
{ | |||||
private Exam_ExamStudentService exam_ExamStudentService = new Exam_ExamStudentService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_ExamStudentEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamStudentService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Exam_ExamStudent表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Exam_ExamStudentEntity GetExam_ExamStudentEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamStudentService.GetExam_ExamStudentEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Exam_ExamStudent表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Exam_ExamStudentEntity GetExam_ExamStudentbyStuNo(string code) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamStudentService.GetExam_ExamStudentbyStuNo(code); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
exam_ExamStudentService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 启用/停用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="ELEnabled"></param> | |||||
public void Lock(string keyValue, int ESEnabled) | |||||
{ | |||||
try | |||||
{ | |||||
exam_ExamStudentService.Lock(keyValue, ESEnabled); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
/// <returns></returns> | |||||
public void SaveEntity(string keyValue, Exam_ExamStudentEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
exam_ExamStudentService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 清空数据 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <param name="ESType"></param> | |||||
/// <returns></returns> | |||||
public int ClaerForm(string AcademicYearNo, string Semester, string ESType) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamStudentService.ClaerForm(AcademicYearNo, Semester, ESType); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 清空数据 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <param name="ESType"></param> | |||||
/// <returns></returns> | |||||
public int ImportForm(string AcademicYearNo, string Semester, string ESType) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamStudentService.ImportForm(AcademicYearNo, Semester, ESType); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,80 @@ | |||||
using Learun.Util; | |||||
using System; | |||||
using System.ComponentModel.DataAnnotations.Schema; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-04-12 15:47 | |||||
/// 描 述:考试课程表 | |||||
/// </summary> | |||||
public class Exam_ExamStudentEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// 主键 | |||||
/// </summary> | |||||
[Column("ESID")] | |||||
public string ESId { get; set; } | |||||
/// <summary> | |||||
/// 学年 | |||||
/// </summary> | |||||
[Column("ACADEMICYEARNO")] | |||||
public string AcademicYearNo { get; set; } | |||||
/// <summary> | |||||
/// 学期 | |||||
/// </summary> | |||||
[Column("SEMESTER")] | |||||
public int? Semester { get; set; } | |||||
/// <summary> | |||||
/// 学生编码 | |||||
/// </summary> | |||||
[Column("STUNO")] | |||||
public string StuNo { get; set; } | |||||
/// <summary> | |||||
/// 学生名称 | |||||
/// </summary> | |||||
[Column("STUNAME")] | |||||
public string StuName { get; set; } | |||||
/// <summary> | |||||
/// 类型 | |||||
/// </summary> | |||||
[Column("ESTYPE")] | |||||
public string ESType { get; set; } | |||||
/// <summary> | |||||
/// 排序号 | |||||
/// </summary> | |||||
[Column("ESORDER")] | |||||
public int? ESOrder { get; set; } | |||||
/// <summary> | |||||
/// 是否启用 | |||||
/// </summary> | |||||
[Column("ESENABLED")] | |||||
public bool? ESEnabled { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.ESId = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.ESId = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,78 @@ | |||||
using Learun.Util; | |||||
using System.Data; | |||||
using System.Collections.Generic; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-04-12 15:47 | |||||
/// 描 述:考试课程表 | |||||
/// </summary> | |||||
public interface Exam_ExamStudentIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Exam_ExamStudentEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取Exam_ExamStudent表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Exam_ExamStudentEntity GetExam_ExamStudentEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取Ass_AssetsType表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
Exam_ExamStudentEntity GetExam_ExamStudentbyStuNo(string StuNo); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 启用/停用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="ESEnabled"></param> | |||||
void Lock(string keyValue, int ESEnabled); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, Exam_ExamStudentEntity entity); | |||||
/// <summary> | |||||
/// 清空学生考试信息 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <param name="ESType"></param> | |||||
/// <returns></returns> | |||||
int ClaerForm(string AcademicYearNo, string Semester, string ESType); | |||||
/// <summary> | |||||
/// 同步学生考试信息 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <param name="ESType"></param> | |||||
/// <returns></returns> | |||||
int ImportForm(string AcademicYearNo, string Semester, string ESType); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,367 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Linq; | |||||
using System.Net.Sockets; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-04-12 15:47 | |||||
/// 描 述:考试课程表 | |||||
/// </summary> | |||||
public class Exam_ExamStudentService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_ExamStudentEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.ESId, | |||||
t.AcademicYearNo, | |||||
t.Semester, | |||||
t.StuName, | |||||
t.StuNo, | |||||
t.ESType, | |||||
t.ESOrder, | |||||
t.ESEnabled | |||||
"); | |||||
strSql.Append(" FROM Exam_ExamStudent t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["AcademicYearNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); | |||||
} | |||||
if (!queryParam["Semester"].IsEmpty()) | |||||
{ | |||||
dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.Semester = @Semester "); | |||||
} | |||||
if (!queryParam["StuNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuNo", "%" + queryParam["StuNo"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuNo Like @StuNo "); | |||||
} | |||||
if (!queryParam["StuName"].IsEmpty()) | |||||
{ | |||||
dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.StuName Like @StuName "); | |||||
} | |||||
if (!queryParam["ESType"].IsEmpty()) | |||||
{ | |||||
dp.Add("ESType", queryParam["ESType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ESType = @ESType "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamStudentEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Exam_ExamStudent表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Exam_ExamStudentEntity GetExam_ExamStudentEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamStudentEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Exam_ExamStuden表实体数据 | |||||
/// <param name="keyValue">主键</param> | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
public Exam_ExamStudentEntity GetExam_ExamStudentbyStuNo(string StuNo) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamStudentEntity>(x => x.StuNo == StuNo); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
public void DeleteEntity(string keyValue) | |||||
{ | |||||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||||
try | |||||
{ | |||||
var arrkeyValue = keyValue.Split(','); | |||||
foreach (var item in arrkeyValue) | |||||
{ | |||||
db.Delete<Exam_ExamStudentEntity>(t => t.ESId == item); | |||||
} | |||||
db.Commit(); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
db.Rollback(); | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 启用/停用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="ESEnabled"></param> | |||||
public void Lock(string keyValue, int ESEnabled) | |||||
{ | |||||
try | |||||
{ | |||||
if (keyValue.Contains(",")) | |||||
{ | |||||
keyValue = string.Join("','", keyValue.Split(',')); | |||||
} | |||||
string sql = $"update Exam_ExamStudent set ESEnabled='{ESEnabled}' where ESId in ('{keyValue}')"; | |||||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
public void SaveEntity(string keyValue, Exam_ExamStudentEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
if (!string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
entity.Modify(keyValue); | |||||
this.BaseRepository("CollegeMIS").Update(entity); | |||||
} | |||||
else | |||||
{ | |||||
entity.Create(); | |||||
this.BaseRepository("CollegeMIS").Insert(entity); | |||||
} | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 清空数据 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <returns></returns> | |||||
public int ClaerForm(string AcademicYearNo, string Semester, string ESType) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = ""; | |||||
if (!string.IsNullOrEmpty(ESType)) | |||||
{ | |||||
sql = $"delete Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}' and ESType= '{ESType}'"; | |||||
} | |||||
else | |||||
{ | |||||
sql = $"delete Exam_ExamStudent where AcademicYearNo='{AcademicYearNo}' and Semester='{Semester}'"; | |||||
} | |||||
return this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 导入 | |||||
/// </summary> | |||||
/// <param name="AcademicYearNo"></param> | |||||
/// <param name="Semester"></param> | |||||
/// <returns></returns> | |||||
public int ImportForm(string AcademicYearNo, string Semester, string ESType) | |||||
{ | |||||
try | |||||
{ | |||||
var historyStu = this.BaseRepository("CollegeMIS").FindList<Exam_ExamStudentEntity>(); | |||||
List<Exam_ExamStudentEntity> AddLStuist = new List<Exam_ExamStudentEntity>(); | |||||
if (ESType == "1") | |||||
{ | |||||
var StuInfoBasic = this.BaseRepository("CollegeMIS") | |||||
.FindList<StuInfoBasicEntity>(x => x.CheckMark == "1"); | |||||
foreach (var item in StuInfoBasic) | |||||
{ | |||||
var stuList = new Exam_ExamStudentEntity | |||||
{ | |||||
ESId = Guid.NewGuid().ToString(), | |||||
AcademicYearNo = AcademicYearNo, | |||||
Semester = Convert.ToInt32(Semester), | |||||
StuNo = item.StuNo, | |||||
StuName = item.StuName, | |||||
ESType = "1", | |||||
ESEnabled = true | |||||
}; | |||||
if (historyStu.Count(x => x.StuNo == stuList.StuNo && x.StuName == stuList.StuName && x.ESType == "1") == AddLStuist.Count(s => s.StuNo == stuList.StuNo && s.StuName == stuList.StuName && s.ESType == "1")) | |||||
{ | |||||
AddLStuist.Add(stuList); | |||||
} | |||||
} | |||||
} | |||||
else if (ESType == "2") | |||||
{ | |||||
var StuScoreNotPass = this.BaseRepository("CollegeMIS") | |||||
.FindList<StuScoreNotPassEntity>(x => x.CheckMark == "1"); | |||||
foreach (var item in StuScoreNotPass) | |||||
{ | |||||
var stuList = new Exam_ExamStudentEntity | |||||
{ | |||||
ESId = Guid.NewGuid().ToString(), | |||||
AcademicYearNo = AcademicYearNo, | |||||
Semester = Convert.ToInt32(Semester), | |||||
StuNo = item.StuNo, | |||||
StuName = item.StuName, | |||||
ESType = "2", | |||||
ESEnabled = true | |||||
}; | |||||
if (historyStu.Count(x => x.StuNo == stuList.StuNo && x.StuName == stuList.StuName && x.ESType == "2") == AddLStuist.Count(s => s.StuNo == stuList.StuNo && s.StuName == stuList.StuName && s.ESType == "2")) | |||||
{ | |||||
AddLStuist.Add(stuList); | |||||
} | |||||
} | |||||
} | |||||
else if (ESType == "3") | |||||
{ | |||||
var StuScoreNotPassTwo = this.BaseRepository("CollegeMIS") | |||||
.FindList<StuScoreNotPassTwoEntity>(x => x.CheckMark == "1"); | |||||
foreach (var item in StuScoreNotPassTwo) | |||||
{ | |||||
var stuList = new Exam_ExamStudentEntity | |||||
{ | |||||
ESId = Guid.NewGuid().ToString(), | |||||
AcademicYearNo = AcademicYearNo, | |||||
Semester = Convert.ToInt32(Semester), | |||||
StuNo = item.StuNo, | |||||
StuName = item.StuName, | |||||
ESType = "3", | |||||
ESEnabled = true | |||||
}; | |||||
if (historyStu.Count(x => x.StuNo == stuList.StuNo && x.StuName == stuList.StuName && x.ESType == "3") == AddLStuist.Count(s => s.StuNo == stuList.StuNo && s.StuName == stuList.StuName && s.ESType == "3")) | |||||
{ | |||||
AddLStuist.Add(stuList); | |||||
} | |||||
} | |||||
} | |||||
return this.BaseRepository("CollegeMIS").Insert(AddLStuist); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -156,10 +156,10 @@ | |||||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeEntity.cs" /> | <Compile Include="EducationalAdministration\EADateArrange\EADateArrangeEntity.cs" /> | ||||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeIBLL.cs" /> | <Compile Include="EducationalAdministration\EADateArrange\EADateArrangeIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeService.cs" /> | <Compile Include="EducationalAdministration\EADateArrange\EADateArrangeService.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamRoom\Exam_ExamRoomBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamRoom\Exam_ExamRoomEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamRoom\Exam_ExamRoomIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamRoom\Exam_ExamRoomService.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamStudent\Exam_ExamStudentBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamStudent\Exam_ExamStudentEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamStudent\Exam_ExamStudentIBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamStudent\Exam_ExamStudentService.cs" /> | |||||
<Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolABLL.cs" /> | <Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolABLL.cs" /> | ||||
<Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAIBLL.cs" /> | <Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAService.cs" /> | <Compile Include="EducationalAdministration\LeaveSchoolA\LeaveSchoolAService.cs" /> | ||||