@@ -0,0 +1,175 @@ | |||||
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-14 09:49 | |||||
/// 描 述:监考老师 | |||||
/// </summary> | |||||
public class Exam_InvigilateTeacherController : MvcControllerBase | |||||
{ | |||||
private Exam_InvigilateTeacherIBLL exam_InvigilateTeacherIBLL = new Exam_InvigilateTeacherBLL(); | |||||
#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 FormYearSemester() | |||||
{ | |||||
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_InvigilateTeacherIBLL.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_InvigilateTeacherData = exam_InvigilateTeacherIBLL.GetExam_InvigilateTeacherEntity( keyValue ); | |||||
var jsonData = new { | |||||
Exam_InvigilateTeacher = Exam_InvigilateTeacherData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
exam_InvigilateTeacherIBLL.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_InvigilateTeacherEntity entity = strEntity.ToObject<Exam_InvigilateTeacherEntity>(); | |||||
//判断教师编号有无重复 | |||||
var model = exam_InvigilateTeacherIBLL.GetEntityByWhere(entity.AcademicYearNo, entity.Semester,entity.EmpNo); | |||||
if (model != null && string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
return Fail("教师编号重复!"); | |||||
} | |||||
else if (model != null && !string.IsNullOrEmpty(keyValue) && keyValue != model.ITId) | |||||
{ | |||||
return Fail("教师编号重复!"); | |||||
} | |||||
exam_InvigilateTeacherIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 启用/停用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
/// <param name="ITEnabled"></param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult Lock(string keyValue, int ITEnabled) | |||||
{ | |||||
exam_InvigilateTeacherIBLL.Lock(keyValue, ITEnabled); | |||||
return Success("操作成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 导入教师基础数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult Import(string AcademicYearNo, string Semester) | |||||
{ | |||||
int res = exam_InvigilateTeacherIBLL.Import(AcademicYearNo, Semester); | |||||
return Success("导入" + res + "条数据!"); | |||||
} | |||||
/// <summary> | |||||
/// 按条件清空数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteWhere(string AcademicYearNo, string Semester) | |||||
{ | |||||
int res = exam_InvigilateTeacherIBLL.DeleteWhere(AcademicYearNo, Semester); | |||||
return Success("清空" + res + "条数据!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,31 @@ | |||||
@{ | |||||
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_InvigilateTeacher" > | |||||
<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_InvigilateTeacher" > | |||||
<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_InvigilateTeacher" > | |||||
<div class="lr-form-item-title">教师编号<font face="宋体">*</font></div> | |||||
<input id="EmpNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" > | |||||
<div class="lr-form-item-title">教师姓名<font face="宋体">*</font></div> | |||||
<input id="EmpName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" > | |||||
<div class="lr-form-item-title">排序号</div> | |||||
<input id="ITOrder" type="text" class="form-control" isvalid="yes" checkexpession="NumOrNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_InvigilateTeacher" > | |||||
<div class="lr-form-item-title">是否启用</div> | |||||
<div id="ITEnabled"></div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Form.js") |
@@ -0,0 +1,69 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-14 09:50 | |||||
* 描 述:监考老师 | |||||
*/ | |||||
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' | |||||
}); | |||||
$('#ITEnabled').lrRadioCheckbox({ | |||||
type: 'radio', | |||||
code: 'YesOrNoBit', | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/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_InvigilateTeacher/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,15 @@ | |||||
@{ | |||||
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> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/FormYearSemester.js") |
@@ -0,0 +1,83 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-12 15:47 | |||||
* 描 述:考试课程表 | |||||
*/ | |||||
var acceptClick; | |||||
var type = request('type'); | |||||
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' | |||||
}); | |||||
}, | |||||
initData: function () { | |||||
//if (!!keyValue) { | |||||
// $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamLesson/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() | |||||
}; | |||||
//导入 | |||||
if (type == 1) { | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Import', postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
} else if (type == 2) { | |||||
//按条件清空数据 | |||||
learun.layerConfirm('是否确认清空!', function (res) { | |||||
if (res) { | |||||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/DeleteWhere', postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,54 @@ | |||||
@{ | |||||
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-12 lr-form-item"> | |||||
<div class="lr-form-item-title">学年</div> | |||||
<div id="AcademicYearNo"></div> | |||||
</div> | |||||
<div class="col-xs-12 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="EmpNo" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">教师姓名</div> | |||||
<input id="EmpName" type="text" class="form-control" /> | |||||
</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> | |||||
</div> | |||||
<div class=" btn-group btn-group-sm"> | |||||
<a id="lr_importByBasic" class="btn btn-default"><i class="fa fa-plus"></i> 从教师信息导入</a> | |||||
<a id="lr_emptyWhere" class="btn btn-default"><i class="fa fa-trash-o"></i> 按条件清空数据</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_InvigilateTeacher/Index.js") |
@@ -0,0 +1,209 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-14 09:50 | |||||
* 描 述:监考老师 | |||||
*/ | |||||
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' | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', | |||||
function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', | |||||
function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', | |||||
function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ITId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + | |||||
'/EducationalAdministration/Exam_InvigilateTeacher/Form?keyValue=' + | |||||
keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', | |||||
function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ITId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', | |||||
function (res) { | |||||
if (res) { | |||||
learun.deleteForm( | |||||
top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/DeleteForm', | |||||
{ keyValue: keyValue }, | |||||
function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', | |||||
function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
//启用 | |||||
$('#lr_lock').on('click', | |||||
function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ITId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var ELEnabled = $('#gridtable').jfGridValue('ITEnabled'); | |||||
if (ELEnabled.indexOf('true') != -1) { | |||||
learun.alert.warning("选中记录中包含已启用项目!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认启用选中记录!', | |||||
function (res) { | |||||
if (res) { | |||||
learun.deleteForm( | |||||
top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Lock', | |||||
{ keyValue: keyValue, ITEnabled: 1 }, | |||||
function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
//禁用 | |||||
$('#lr_unlock').on('click', | |||||
function () { | |||||
var keyValue = $('#gridtable').jfGridValue('ITId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
var ELEnabled = $('#gridtable').jfGridValue('ITEnabled'); | |||||
if (ELEnabled.indexOf('false') != -1) { | |||||
learun.alert.warning("选中记录中包含已停用项目!"); | |||||
return; | |||||
} | |||||
learun.layerConfirm('是否确认停用选中记录!', | |||||
function (res) { | |||||
if (res) { | |||||
learun.deleteForm( | |||||
top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/Lock', | |||||
{ keyValue: keyValue, ITEnabled: 0 }, | |||||
function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 导入 | |||||
$('#lr_importByBasic').on('click', | |||||
function () { | |||||
learun.layerForm({ | |||||
id: 'form_import', | |||||
title: '导入', | |||||
url: top.$.rootUrl + | |||||
'/EducationalAdministration/Exam_InvigilateTeacher/FormYearSemester?type=1', | |||||
width: 500, | |||||
height: 300, | |||||
btn: ['一键导入', '关闭'], | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 按条件清空数据 | |||||
$('#lr_emptyWhere').on('click', | |||||
function () { | |||||
learun.layerForm({ | |||||
id: 'form_empty', | |||||
title: '清空数据', | |||||
url: top.$.rootUrl + | |||||
'/EducationalAdministration/Exam_InvigilateTeacher/FormYearSemester?type=2', | |||||
width: 500, | |||||
height: 300, | |||||
btn: ['清空', '关闭'], | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetPageList', | |||||
headData: [ | |||||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||||
{ label: "教师编号", name: "EmpNo", width: 100, align: "left" }, | |||||
{ label: "教师姓名", name: "EmpName", width: 100, align: "left" }, | |||||
{ | |||||
label: "是否启用", name: "ITEnabled", 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: 'ITId', | |||||
isMultiselect: true, | |||||
isPage: true, | |||||
sidx: 'AcademicYearNo desc,Semester desc,ITOrder asc' | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -834,6 +834,7 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\StuVolunteerController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\StuVolunteerController.cs" /> | ||||
<Compile Include="Areas\LR_Desktop\Controllers\ShowAuthorizeController.cs" /> | <Compile Include="Areas\LR_Desktop\Controllers\ShowAuthorizeController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamLessonController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamLessonController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_InvigilateTeacherController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -992,6 +993,7 @@ | |||||
<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_ExamLesson\FormYearSemester.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\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" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormPeople.js" /> | <Content Include="Areas\EducationalAdministration\Views\FillinFrom\FormPeople.js" /> | ||||
@@ -6355,6 +6357,10 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\EducationalAdministration\Views\AwardAndPunishment\" /> | <Folder Include="Areas\EducationalAdministration\Views\AwardAndPunishment\" /> | ||||
@@ -7614,6 +7620,7 @@ | |||||
<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\FormYearSemester.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormYearSemester.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_InvigilateTeacher\FormYearSemester.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-14 09:49 | |||||
/// 描 述:监考老师 | |||||
/// </summary> | |||||
public class Exam_InvigilateTeacherMap : EntityTypeConfiguration<Exam_InvigilateTeacherEntity> | |||||
{ | |||||
public Exam_InvigilateTeacherMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("EXAM_INVIGILATETEACHER"); | |||||
//主键 | |||||
this.HasKey(t => t.ITId); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -572,6 +572,7 @@ | |||||
<Compile Include="LogisticsManagement\Acc_DormitoryRuleMap.cs" /> | <Compile Include="LogisticsManagement\Acc_DormitoryRuleMap.cs" /> | ||||
<Compile Include="LR_OA\ShowAuthorizeMap.cs" /> | <Compile Include="LR_OA\ShowAuthorizeMap.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamLessonMap.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamLessonMap.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_InvigilateTeacherMap.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||
@@ -0,0 +1,196 @@ | |||||
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-14 09:49 | |||||
/// 描 述:监考老师 | |||||
/// </summary> | |||||
public class Exam_InvigilateTeacherBLL : Exam_InvigilateTeacherIBLL | |||||
{ | |||||
private Exam_InvigilateTeacherService exam_InvigilateTeacherService = new Exam_InvigilateTeacherService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_InvigilateTeacherEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_InvigilateTeacherService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Exam_InvigilateTeacher表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Exam_InvigilateTeacherEntity GetExam_InvigilateTeacherEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_InvigilateTeacherService.GetExam_InvigilateTeacherEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public Exam_InvigilateTeacherEntity GetEntityByWhere(string AcademicYearNo, int? Semester, string EmpNo) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_InvigilateTeacherService.GetEntityByWhere(AcademicYearNo, Semester, EmpNo); | |||||
} | |||||
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_InvigilateTeacherService.DeleteEntity(keyValue); | |||||
} | |||||
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_InvigilateTeacherEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
exam_InvigilateTeacherService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public void Lock(string keyValue, int ITEnabled) | |||||
{ | |||||
try | |||||
{ | |||||
exam_InvigilateTeacherService.Lock(keyValue, ITEnabled); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public int Import(string AcademicYearNo, string Semester) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_InvigilateTeacherService.Import(AcademicYearNo, Semester); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
public int DeleteWhere(string AcademicYearNo, string Semester) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_InvigilateTeacherService.DeleteWhere(AcademicYearNo, Semester); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,75 @@ | |||||
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-14 09:49 | |||||
/// 描 述:监考老师 | |||||
/// </summary> | |||||
public class Exam_InvigilateTeacherEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// 主键 | |||||
/// </summary> | |||||
[Column("ITID")] | |||||
public string ITId { get; set; } | |||||
/// <summary> | |||||
/// 学年 | |||||
/// </summary> | |||||
[Column("ACADEMICYEARNO")] | |||||
public string AcademicYearNo { get; set; } | |||||
/// <summary> | |||||
/// 学期 | |||||
/// </summary> | |||||
[Column("SEMESTER")] | |||||
public int? Semester { get; set; } | |||||
/// <summary> | |||||
/// 课程类型名称 | |||||
/// </summary> | |||||
[Column("EMPNAME")] | |||||
public string EmpName { get; set; } | |||||
/// <summary> | |||||
/// 课程类型编号 | |||||
/// </summary> | |||||
[Column("EMPNO")] | |||||
public string EmpNo { get; set; } | |||||
/// <summary> | |||||
/// 排序号 | |||||
/// </summary> | |||||
[Column("ITORDER")] | |||||
public int? ITOrder { get; set; } | |||||
/// <summary> | |||||
/// 是否启用 | |||||
/// </summary> | |||||
[Column("ITENABLED")] | |||||
public bool? ITEnabled { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.ITId = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.ITId = keyValue; | |||||
} | |||||
#endregion | |||||
#region 扩展字段 | |||||
#endregion | |||||
} | |||||
} | |||||
@@ -0,0 +1,54 @@ | |||||
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-14 09:49 | |||||
/// 描 述:监考老师 | |||||
/// </summary> | |||||
public interface Exam_InvigilateTeacherIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Exam_InvigilateTeacherEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取Exam_InvigilateTeacher表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Exam_InvigilateTeacherEntity GetExam_InvigilateTeacherEntity(string keyValue); | |||||
Exam_InvigilateTeacherEntity GetEntityByWhere(string AcademicYearNo, int? Semester, string EmpNo); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, Exam_InvigilateTeacherEntity entity); | |||||
void Lock(string keyValue, int ITEnabled); | |||||
int Import(string AcademicYearNo, string Semester); | |||||
int DeleteWhere(string AcademicYearNo, string Semester); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,283 @@ | |||||
using Dapper; | |||||
using Learun.DataBase.Repository; | |||||
using Learun.Util; | |||||
using System; | |||||
using System.Collections.Generic; | |||||
using System.Data; | |||||
using System.Text; | |||||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||||
{ | |||||
/// <summary> | |||||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
/// 创 建:超级管理员 | |||||
/// 日 期:2022-04-14 09:49 | |||||
/// 描 述:监考老师 | |||||
/// </summary> | |||||
public class Exam_InvigilateTeacherService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_InvigilateTeacherEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.* | |||||
"); | |||||
strSql.Append(" FROM Exam_InvigilateTeacher 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["EmpNo"].IsEmpty()) | |||||
{ | |||||
dp.Add("EmpNo", "%" + queryParam["EmpNo"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.EmpNo Like @EmpNo "); | |||||
} | |||||
if (!queryParam["EmpName"].IsEmpty()) | |||||
{ | |||||
dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.EmpName Like @EmpName "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Exam_InvigilateTeacherEntity>(strSql.ToString(), dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Exam_InvigilateTeacher表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Exam_InvigilateTeacherEntity GetExam_InvigilateTeacherEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_InvigilateTeacherEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Exam_InvigilateTeacher表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Exam_InvigilateTeacherEntity GetEntityByWhere(string AcademicYearNo, int? Semester, string EmpNo) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_InvigilateTeacherEntity>(x => x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.EmpNo == EmpNo); | |||||
} | |||||
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) | |||||
{ | |||||
try | |||||
{ | |||||
if (keyValue.Contains(",")) | |||||
{ | |||||
keyValue = string.Join("','", keyValue.Split(',')); | |||||
} | |||||
string sql = $"delete Exam_InvigilateTeacher where ITId 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_InvigilateTeacherEntity 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="keyValue"></param> | |||||
/// <param name="ELEnabled"></param> | |||||
public void Lock(string keyValue, int ITEnabled) | |||||
{ | |||||
try | |||||
{ | |||||
if (keyValue.Contains(",")) | |||||
{ | |||||
keyValue = string.Join("','", keyValue.Split(',')); | |||||
} | |||||
string sql = $"update Exam_InvigilateTeacher set ITEnabled='{ITEnabled}' where ITId in ('{keyValue}')"; | |||||
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 Import(string AcademicYearNo, string Semester) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = $@"INSERT INTO [dbo].[Exam_InvigilateTeacher] | |||||
([ITId] | |||||
,[AcademicYearNo] | |||||
,[Semester] | |||||
,[EmpName] | |||||
,[EmpNo] | |||||
,[ITOrder] | |||||
,[ITEnabled]) | |||||
select newid(),'{AcademicYearNo}','{Semester}',empname,empno,0,1 from empinfo where checkmark=1 | |||||
"; | |||||
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 DeleteWhere(string AcademicYearNo, string Semester) | |||||
{ | |||||
try | |||||
{ | |||||
string sql = $"delete Exam_InvigilateTeacher 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); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -1767,6 +1767,10 @@ | |||||
<Compile Include="EducationalAdministration\Exam_ExamLesson\Exam_ExamLessonService.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamLesson\Exam_ExamLessonService.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamLesson\Exam_ExamLessonBLL.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamLesson\Exam_ExamLessonBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamLesson\Exam_ExamLessonIBLL.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamLesson\Exam_ExamLessonIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_InvigilateTeacher\Exam_InvigilateTeacherEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_InvigilateTeacher\Exam_InvigilateTeacherService.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_InvigilateTeacher\Exam_InvigilateTeacherBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_InvigilateTeacher\Exam_InvigilateTeacherIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||