@@ -21,6 +21,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
private Exam_ExamPlanIBLL exam_ExamPlanIBLL = new Exam_ExamPlanBLL(); | |||
private Exam_ExamPlanLessonIBLL exam_ExamPlanLessonIBLL = new Exam_ExamPlanLessonBLL(); | |||
private Exam_ExamPlanClassIBLL exam_ExamPlanClassIBLL = new Exam_ExamPlanClassBLL(); | |||
private Exam_ExamPlanRoomIBLL exam_ExamPlanRoomIBLL = new Exam_ExamPlanRoomBLL(); | |||
#region 视图功能 | |||
@@ -69,7 +70,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -322,6 +322,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 一键安排考场 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult PlanRoomByEPId(string keyValue) | |||
{ | |||
var res = exam_ExamPlanRoomIBLL.PlanRoomByEPId(keyValue); | |||
if (!res.flag) | |||
{ | |||
return Fail(res.str); | |||
} | |||
return Success("操作成功!"); | |||
} | |||
#endregion | |||
} | |||
@@ -0,0 +1,117 @@ | |||
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-06-13 15:41 | |||
/// 描 述:老师时间管理 | |||
/// </summary> | |||
public class Exam_ExamTeacherTimeController : MvcControllerBase | |||
{ | |||
private Exam_ExamTeacherTimeIBLL exam_ExamTeacherTimeIBLL = new Exam_ExamTeacherTimeBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
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_ExamTeacherTimeIBLL.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_ExamTeacherTimeData = exam_ExamTeacherTimeIBLL.GetExam_ExamTeacherTimeEntity( keyValue ); | |||
var jsonData = new { | |||
Exam_ExamTeacherTime = Exam_ExamTeacherTimeData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
exam_ExamTeacherTimeIBLL.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_ExamTeacherTimeEntity entity = strEntity.ToObject<Exam_ExamTeacherTimeEntity>(); | |||
exam_ExamTeacherTimeIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -87,6 +87,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取监考老师数据 | |||
/// </summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetList(string AcademicYearNo, int? Semester) | |||
{ | |||
var data = exam_InvigilateTeacherIBLL.GetList(AcademicYearNo, Semester); | |||
return Success(data); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
@@ -54,9 +54,12 @@ | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_generate" class="btn btn-default"><i class="fa fa-plus"></i> 生成排考名单</a> | |||
<a id="lr_cleargenerate" class="btn btn-default"><i class="fa fa-plus"></i> 清除排考名单</a> | |||
<a id="lr_cleardata" class="btn btn-default"><i class="fa fa-plus"></i> 清除排考记录</a> | |||
<a id="lr_generate" class="btn btn-default"><i class="fa fa-plus"></i> 生成排考名单</a> | |||
<a id="lr_cleargenerate" class="btn btn-default"><i class="fa fa-plus"></i> 清除排考名单</a> | |||
<a id="lr_cleardata" class="btn btn-default"><i class="fa fa-plus"></i> 清除排考记录</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_teacherTimeManage" class="btn btn-default"><i class="fa fa-plus"></i> 老师时间管理</a> | |||
</div> | |||
<div class="btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_more" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> | |||
@@ -137,16 +137,18 @@ var bootstrap = function ($, learun) { | |||
// 安排时间 | |||
$('#lr_examtime').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
learun.layerForm({ | |||
id: 'formtime', | |||
title: '安排时间', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/FormTime?keyValue=' + keyValue, | |||
width: 850, | |||
height: 550, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formtime', | |||
title: '安排时间', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/FormTime?keyValue=' + keyValue, | |||
width: 850, | |||
height: 550, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 安排考试 | |||
$('#lr_planks').on('click', | |||
@@ -175,7 +177,7 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//一键安排班级 | |||
$('#lr_examclass').on('click', | |||
function () { | |||
@@ -190,7 +192,22 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//一键安排考场 | |||
$('#lr_examroom').on('click', | |||
function () { | |||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认安排考场!', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/PlanRoomByEPId', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
//自动生成排考时间 | |||
$('#lr_examlessontime').on('click', | |||
function () { | |||
@@ -205,6 +222,22 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//老师时间管理 | |||
$('#lr_teacherTimeManage').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form_teacherTimeManage', | |||
title: '老师时间管理', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/Index', | |||
width: 1000, | |||
height: 600, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -0,0 +1,28 @@ | |||
@{ | |||
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_ExamTeacherTime"> | |||
<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_ExamTeacherTime"> | |||
<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_ExamTeacherTime"> | |||
<div class="lr-form-item-title">考试时间段<font face="宋体">*</font></div> | |||
<input id="ExamTimeStart" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" style="width: 45%; float: left;" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#ExamTimeStart').trigger('change'); } })" /> | |||
<span> —</span> | |||
<input id="ExamTimeEnd" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" style="width: 45%; float: right;" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd HH:mm',onpicked: function () { $('#ExamTimeEnd').trigger('change'); } })" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamTeacherTime"> | |||
<div class="lr-form-item-title">不能监考的老师<font face="宋体">*</font></div> | |||
<div id="EmpNo" isvalid="yes" checkexpession="NotNull"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamTeacherTime"> | |||
<div class="lr-form-item-title"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Form.js") |
@@ -0,0 +1,97 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-06-13 15:41 | |||
* 描 述:老师时间管理 | |||
*/ | |||
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', | |||
select: function (item) { | |||
if (item) { | |||
$('#EmpNo').lrselectRefresh({ | |||
//type: 'multiple', | |||
//placeholder: "请选择老师", | |||
//allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetList?AcademicYearNo=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + $('#Semester').lrselectGet(), | |||
value: 'EmpNo', | |||
text: 'EmpName' | |||
}); | |||
} | |||
} | |||
}); | |||
//学期 | |||
$('#Semester').lrselect({ | |||
placeholder: "学期", | |||
allowSearch: false, | |||
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', | |||
value: 'value', | |||
text: 'text', | |||
select: function(item) { | |||
if (item) { | |||
$('#EmpNo').lrselectRefresh({ | |||
//type: 'multiple', | |||
//placeholder: "请选择老师", | |||
//allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetList?AcademicYearNo=' + $('#AcademicYearNo').lrselectGet() + '&Semester=' + $('#Semester').lrselectGet(), | |||
value: 'EmpNo', | |||
text: 'EmpName' | |||
}); | |||
} | |||
} | |||
}); | |||
$('#EmpNo').lrselect({ | |||
type: 'multiple', | |||
placeholder: "请选择老师", | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_InvigilateTeacher/GetList', | |||
value: 'EmpNo', | |||
text: 'EmpName' | |||
}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/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_ExamTeacherTime/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,41 @@ | |||
@{ | |||
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> | |||
</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_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a>*@ | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamTeacherTime/Index.js") |
@@ -0,0 +1,142 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-06-13 15:41 | |||
* 描 述:老师时间管理 | |||
*/ | |||
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: 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' | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamTeacherTime/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ | |||
label: "时间段", name: "ExamTimeStart", width: 300, align: "left", | |||
formatter: function (value, row) { | |||
return value + " - " + row.ExamTimeEnd; | |||
} | |||
}, | |||
{ | |||
label: "不能监考的老师", name: "EmpNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
if (value.indexOf(',') != -1) { | |||
var name = ''; | |||
var attr = value.split(','); | |||
for (var i = 0; i < attr.length; i++) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: attr[i], | |||
keyId: 'empno', | |||
callback: function (_data) { | |||
name += _data['empname'] + ","; | |||
} | |||
}); | |||
} | |||
callback(name.substring(0, name.length - 1)); | |||
} else { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empno', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
} | |||
}, | |||
], | |||
mainId: 'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -832,6 +832,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeExamTermNewController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Sys_PsychologicalCounseController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamTeacherTimeController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -6544,6 +6545,10 @@ | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Sys_PsychologicalCounse\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamTeacherTime\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -30,19 +30,20 @@ namespace Learun.Application.WebApi | |||
/// 注册接口 | |||
/// <summary> | |||
public EmpInfoApi() | |||
: base("/Learun/adms/EducationalAdministration/EmpRegister") | |||
//: base("/Learun/adms/EducationalAdministration/EmpRegister") | |||
: base() | |||
{ | |||
Get["/pagelist"] = GetPageList; | |||
Get["/list"] = GetList; | |||
Get["/form"] = GetForm; | |||
Get["/formForNo"] = GetFormForNo; | |||
Post["/delete"] = DeleteForm; | |||
Post["/save"] = SaveForm; | |||
Post["/savePhoto"] = GetSavePhoto; | |||
Get["/registerbutton"] = RegisterButton; | |||
Post["/signon"] = Signon; | |||
Get["/Learun/adms/EducationalAdministration/EmpRegister/pagelist"] = GetPageList; | |||
Get["/Learun/adms/EducationalAdministration/EmpRegister/list"] = GetList; | |||
Get["/Learun/adms/EducationalAdministration/EmpRegister/form"] = GetForm; | |||
Get["/Learun/adms/EducationalAdministration/EmpRegister/formForNo"] = GetFormForNo; | |||
Post["/Learun/adms/EducationalAdministration/EmpRegister/delete"] = DeleteForm; | |||
Post["/Learun/adms/EducationalAdministration/EmpRegister/save"] = SaveForm; | |||
Post["/Learun/adms/EducationalAdministration/EmpRegister/savePhoto"] = GetSavePhoto; | |||
Get["/Learun/adms/EducationalAdministration/EmpRegister/registerbutton"] = RegisterButton; | |||
Post["/Learun/adms/EducationalAdministration/EmpRegister/signon"] = Signon; | |||
//根据身份证号更新学生和老师的照片 | |||
Post["/updatePhotoByIdCard"] = UpdatePhotoByIdCard; | |||
Post["/EducationalAdministration/EmpRegister/updatePhotoByIdCard"] = UpdatePhotoByIdCard; | |||
} | |||
private Response Signon(dynamic _) | |||
@@ -235,9 +236,9 @@ namespace Learun.Application.WebApi | |||
{ | |||
var pmodel = new ResponseModel() | |||
{ | |||
IdCard=item.IdCard, | |||
OperateFlag=false, | |||
FailMsg="该身份证号的教师信息不存在!" | |||
IdCard = item.IdCard, | |||
OperateFlag = false, | |||
FailMsg = "该身份证号的教师信息不存在!" | |||
}; | |||
responseModels.Add(pmodel); | |||
} | |||
@@ -245,49 +246,63 @@ namespace Learun.Application.WebApi | |||
{ | |||
//图片地址 | |||
var imgPath = string.Format("{0}/{1}{2}", directoryPathOfEmp, item.IdCard, FileEextension); | |||
if (!System.IO.File.Exists(imgPath)) | |||
//下载图片到本地 | |||
//WebClient my = new WebClient(); | |||
//byte[] mybyte = my.DownloadData(item.PhotoUrl); | |||
//FileInfo file = new FileInfo(imgPath); | |||
//FileStream fs = file.Create(); | |||
//fs.Write(mybyte, 0, mybyte.Length); | |||
//fs.Close(); | |||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(item.PhotoUrl); | |||
request.Timeout = 5000; | |||
long len = 0; | |||
try | |||
{ | |||
//下载图片到本地 | |||
WebClient my = new WebClient(); | |||
byte[] mybyte = my.DownloadData(item.PhotoUrl); | |||
FileInfo file = new FileInfo(imgPath); | |||
FileStream fs = file.Create(); | |||
fs.Write(mybyte, 0, mybyte.Length); | |||
fs.Close(); | |||
//图片地址保存到LR_Base_AnnexesFile表中 | |||
var folderId = Guid.NewGuid().ToString(); | |||
AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity(); | |||
fileAnnexesEntity.F_Id = Guid.NewGuid().ToString(); | |||
fileAnnexesEntity.F_FileName =string.Format("{0}{1}",item.IdCard,FileEextension); | |||
fileAnnexesEntity.F_FilePath = imgPath; | |||
fileAnnexesEntity.F_FileSize = mybyte.Length.ToString(); | |||
fileAnnexesEntity.F_FileExtensions = FileEextension; | |||
fileAnnexesEntity.F_FileType = FileEextension.Replace(".", ""); | |||
annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity); | |||
//更新EmpInfo表照片字段 | |||
entity.Photo = folderId; | |||
empInfoIBLL.SaveEntity(entity.EmpId, entity); | |||
//回参 | |||
var pmodel = new ResponseModel() | |||
{ | |||
IdCard = item.IdCard, | |||
OperateFlag = true | |||
}; | |||
responseModels.Add(pmodel); | |||
var wresp = (HttpWebResponse)request.GetResponse(); | |||
var stream = wresp.GetResponseStream(); | |||
System.Drawing.Image.FromStream(stream).Save(imgPath, System.Drawing.Imaging.ImageFormat.Png); | |||
len = wresp.ContentLength; | |||
stream.Close(); | |||
wresp.Close(); | |||
} | |||
else | |||
catch (Exception ex) | |||
{ | |||
var pmodel = new ResponseModel() | |||
//回参 | |||
var pmodel2 = new ResponseModel() | |||
{ | |||
IdCard = item.IdCard, | |||
OperateFlag = false, | |||
FailMsg = "该身份证号的图片已存在!" | |||
FailMsg = "请求图片地址失败!" + ex.Message | |||
}; | |||
responseModels.Add(pmodel); | |||
responseModels.Add(pmodel2); | |||
continue; | |||
} | |||
//图片地址保存到LR_Base_AnnexesFile表中 | |||
var folderId = Guid.NewGuid().ToString(); | |||
AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity(); | |||
fileAnnexesEntity.F_Id = Guid.NewGuid().ToString(); | |||
fileAnnexesEntity.F_FileName = string.Format("{0}{1}", item.IdCard, FileEextension); | |||
fileAnnexesEntity.F_FilePath = imgPath; | |||
fileAnnexesEntity.F_FileSize = len.ToString(); | |||
fileAnnexesEntity.F_FileExtensions = FileEextension; | |||
fileAnnexesEntity.F_FileType = FileEextension.Replace(".", ""); | |||
annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity); | |||
//更新EmpInfo表照片字段 | |||
entity.Photo = folderId; | |||
empInfoIBLL.SaveEntity(entity.EmpId, entity); | |||
//回参 | |||
var pmodel = new ResponseModel() | |||
{ | |||
IdCard = item.IdCard, | |||
OperateFlag = true | |||
}; | |||
responseModels.Add(pmodel); | |||
} | |||
} | |||
else if(item.IdentityFlag == 2)//学生 | |||
else if (item.IdentityFlag == 2)//学生 | |||
{ | |||
var entity = stuInfoBasicIBLL.GetStuInfoBasicEntityByIdCard(item.IdCard); | |||
if (entity == null) | |||
@@ -304,46 +319,53 @@ namespace Learun.Application.WebApi | |||
{ | |||
//图片地址 | |||
var imgPath = string.Format("{0}/{1}{2}", directoryPathOfStu, item.IdCard, FileEextension); | |||
if (!System.IO.File.Exists(imgPath)) | |||
//下载图片到本地 | |||
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(item.PhotoUrl); | |||
request.Timeout = 5000; | |||
long len = 0; | |||
try | |||
{ | |||
//下载图片到本地 | |||
WebClient my = new WebClient(); | |||
byte[] mybyte = my.DownloadData(item.PhotoUrl); | |||
FileInfo file = new FileInfo(imgPath); | |||
FileStream fs = file.Create(); | |||
fs.Write(mybyte, 0, mybyte.Length); | |||
fs.Close(); | |||
//图片地址保存到LR_Base_AnnexesFile表中 | |||
var folderId = Guid.NewGuid().ToString(); | |||
AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity(); | |||
fileAnnexesEntity.F_Id = Guid.NewGuid().ToString(); | |||
fileAnnexesEntity.F_FileName = string.Format("{0}{1}", item.IdCard, FileEextension); | |||
fileAnnexesEntity.F_FilePath = imgPath; | |||
fileAnnexesEntity.F_FileSize = mybyte.Length.ToString(); | |||
fileAnnexesEntity.F_FileExtensions = FileEextension; | |||
fileAnnexesEntity.F_FileType = FileEextension.Replace(".", ""); | |||
annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity); | |||
//更新StuInfoBasic表照片字段 | |||
entity.Photo = folderId; | |||
stuInfoBasicIBLL.SaveEntity(entity.StuId, entity); | |||
//回参 | |||
var pmodel = new ResponseModel() | |||
{ | |||
IdCard = item.IdCard, | |||
OperateFlag = true | |||
}; | |||
responseModels.Add(pmodel); | |||
var wresp = (HttpWebResponse)request.GetResponse(); | |||
var stream = wresp.GetResponseStream(); | |||
System.Drawing.Image.FromStream(stream).Save(imgPath, System.Drawing.Imaging.ImageFormat.Png); | |||
len = wresp.ContentLength; | |||
stream.Close(); | |||
wresp.Close(); | |||
} | |||
else | |||
catch (Exception ex) | |||
{ | |||
var pmodel = new ResponseModel() | |||
//回参 | |||
var pmodel2 = new ResponseModel() | |||
{ | |||
IdCard = item.IdCard, | |||
OperateFlag = false, | |||
FailMsg = "该身份证号的图片已存在!" | |||
FailMsg = "请求图片地址失败!" + ex.Message | |||
}; | |||
responseModels.Add(pmodel); | |||
responseModels.Add(pmodel2); | |||
continue; | |||
} | |||
//图片地址保存到LR_Base_AnnexesFile表中 | |||
var folderId = Guid.NewGuid().ToString(); | |||
AnnexesFileEntity fileAnnexesEntity = new AnnexesFileEntity(); | |||
fileAnnexesEntity.F_Id = Guid.NewGuid().ToString(); | |||
fileAnnexesEntity.F_FileName = string.Format("{0}{1}", item.IdCard, FileEextension); | |||
fileAnnexesEntity.F_FilePath = imgPath; | |||
fileAnnexesEntity.F_FileSize = len.ToString(); | |||
fileAnnexesEntity.F_FileExtensions = FileEextension; | |||
fileAnnexesEntity.F_FileType = FileEextension.Replace(".", ""); | |||
annexesFileIBLL.SaveEntity(folderId, fileAnnexesEntity); | |||
//更新StuInfoBasic表照片字段 | |||
entity.Photo = folderId; | |||
stuInfoBasicIBLL.SaveEntity(entity.StuId, entity); | |||
//回参 | |||
var pmodel = new ResponseModel() | |||
{ | |||
IdCard = item.IdCard, | |||
OperateFlag = true | |||
}; | |||
responseModels.Add(pmodel); | |||
} | |||
} | |||
else | |||
@@ -359,7 +381,7 @@ namespace Learun.Application.WebApi | |||
} | |||
return Success(responseModels); | |||
} | |||
#endregion | |||
@@ -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-06-13 15:41 | |||
/// 描 述:老师时间管理 | |||
/// </summary> | |||
public class Exam_ExamTeacherTimeMap : EntityTypeConfiguration<Exam_ExamTeacherTimeEntity> | |||
{ | |||
public Exam_ExamTeacherTimeMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("EXAM_EXAMTEACHERTIME"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -587,6 +587,7 @@ | |||
<Compile Include="EducationalAdministration\StuCancelDisciplineManagementMap.cs" /> | |||
<Compile Include="EducationalAdministration\ArrangeExamTermNewMap.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_PsychologicalCounseMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamTeacherTimeMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -130,7 +130,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
@@ -175,6 +175,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
} | |||
public (bool flag, string str) PlanRoomByEPId(string EPId) | |||
{ | |||
try | |||
{ | |||
return exam_ExamPlanRoomService.PlanRoomByEPId(EPId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -47,6 +47,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Exam_ExamPlanRoomEntity entity); | |||
void SaveList (List<Exam_ExamPlanRoomEntity> list); | |||
(bool flag,string str) PlanRoomByEPId(string EPId); | |||
#endregion | |||
} | |||
@@ -128,7 +128,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == EPLId && x.ClassroomNo == ClassroomNo).Count() > 0 ? true : false; | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(x => x.EPLId == EPLId && x.ClassroomNo == ClassroomNo).Count() > 0 ? true : false; | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -269,6 +269,55 @@ where l.EPLId='{EPLId}'"; | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 自动安排考场 | |||
/// </summary> | |||
/// <param name="EPId">考试记录表Id</param> | |||
/// <returns></returns> | |||
public (bool flag, string str) PlanRoomByEPId(string EPId) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS"); | |||
try | |||
{ | |||
db.BeginTrans(); | |||
/* | |||
* 1.查询是否已添加考试课程和班级 | |||
* 2.查询是否生成课程排考时间 | |||
* 3.查询考试课程并循环, | |||
* 根据考试课程的总班级人数和排考时间,随机安排考场(同一时间段考场不能重复) | |||
*/ | |||
//考试记录表 | |||
var examPlan = db.FindEntity<Exam_ExamPlanEntity>(EPId); | |||
//考试课程 | |||
var examLessonList = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == EPId).ToList(); | |||
if (examLessonList.Count() <= 0) | |||
{ | |||
return (false, "请先添加考试课程!"); | |||
} | |||
if (!examLessonList.Exists(x => x.ExamDate != null)) | |||
{ | |||
return (false, "请先设置排考时间!"); | |||
} | |||
//考试班级 | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
@@ -0,0 +1,125 @@ | |||
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-06-13 15:41 | |||
/// 描 述:老师时间管理 | |||
/// </summary> | |||
public class Exam_ExamTeacherTimeBLL : Exam_ExamTeacherTimeIBLL | |||
{ | |||
private Exam_ExamTeacherTimeService exam_ExamTeacherTimeService = new Exam_ExamTeacherTimeService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamTeacherTimeEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return exam_ExamTeacherTimeService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Exam_ExamTeacherTime表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Exam_ExamTeacherTimeEntity GetExam_ExamTeacherTimeEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return exam_ExamTeacherTimeService.GetExam_ExamTeacherTimeEntity(keyValue); | |||
} | |||
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_ExamTeacherTimeService.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_ExamTeacherTimeEntity entity) | |||
{ | |||
try | |||
{ | |||
exam_ExamTeacherTimeService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,70 @@ | |||
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-06-13 15:41 | |||
/// 描 述:老师时间管理(设置考试时间段不能监考的老师) | |||
/// </summary> | |||
public class Exam_ExamTeacherTimeEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 学年 | |||
/// </summary> | |||
[Column("ACADEMICYEARNO")] | |||
public string AcademicYearNo { get; set; } | |||
/// <summary> | |||
/// 学期 | |||
/// </summary> | |||
[Column("SEMESTER")] | |||
public int? Semester { get; set; } | |||
/// <summary> | |||
/// EmpNo | |||
/// </summary> | |||
[Column("EMPNO")] | |||
public string EmpNo { get; set; } | |||
/// <summary> | |||
/// ExamTimeStart | |||
/// </summary> | |||
[Column("EXAMTIMESTART")] | |||
public DateTime? ExamTimeStart { get; set; } | |||
/// <summary> | |||
/// ExamTimeEnd | |||
/// </summary> | |||
[Column("EXAMTIMEEND")] | |||
public DateTime? ExamTimeEnd { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,48 @@ | |||
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-06-13 15:41 | |||
/// 描 述:老师时间管理 | |||
/// </summary> | |||
public interface Exam_ExamTeacherTimeIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Exam_ExamTeacherTimeEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Exam_ExamTeacherTime表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Exam_ExamTeacherTimeEntity GetExam_ExamTeacherTimeEntity(string keyValue); | |||
#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_ExamTeacherTimeEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,153 @@ | |||
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-06-13 15:41 | |||
/// 描 述:老师时间管理 | |||
/// </summary> | |||
public class Exam_ExamTeacherTimeService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_ExamTeacherTimeEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@"t.* | |||
"); | |||
strSql.Append(" FROM Exam_ExamTeacherTime 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 "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamTeacherTimeEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Exam_ExamTeacherTime表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Exam_ExamTeacherTimeEntity GetExam_ExamTeacherTimeEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamTeacherTimeEntity>(keyValue); | |||
} | |||
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 | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<Exam_ExamTeacherTimeEntity>(t=>t.Id == keyValue); | |||
} | |||
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_ExamTeacherTimeEntity 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); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -43,6 +43,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public IEnumerable<Exam_InvigilateTeacherEntity> GetList(string AcademicYearNo, int? Semester) | |||
{ | |||
try | |||
{ | |||
return exam_InvigilateTeacherService.GetList(AcademicYearNo, Semester); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Exam_InvigilateTeacher表实体数据 | |||
/// </summary> | |||
@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Exam_InvigilateTeacherEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<Exam_InvigilateTeacherEntity> GetList(string AcademicYearNo, int? Semester); | |||
/// <summary> | |||
/// 获取Exam_InvigilateTeacher表实体数据 | |||
/// </summary> | |||
@@ -104,6 +104,31 @@ select EPId from Exam_ExamPlanLesson where EPLId='{queryParam["EPLId"].ToString( | |||
} | |||
} | |||
/// <summary> | |||
/// | |||
/// </summary> | |||
/// <param name="AcademicYearNo"></param> | |||
/// <param name="Semester"></param> | |||
/// <returns></returns> | |||
public IEnumerable<Exam_InvigilateTeacherEntity> GetList(string AcademicYearNo, int? Semester) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<Exam_InvigilateTeacherEntity>(x => x.AcademicYearNo == AcademicYearNo && x.Semester == Semester); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Exam_InvigilateTeacher表实体数据 | |||
/// </summary> | |||
@@ -1778,6 +1778,10 @@ | |||
<Compile Include="EducationalAdministration\Sys_PsychologicalCounse\Sys_PsychologicalCounseService.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_PsychologicalCounse\Sys_PsychologicalCounseBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Sys_PsychologicalCounse\Sys_PsychologicalCounseIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamTeacherTime\Exam_ExamTeacherTimeEntity.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamTeacherTime\Exam_ExamTeacherTimeService.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamTeacherTime\Exam_ExamTeacherTimeBLL.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ExamTeacherTime\Exam_ExamTeacherTimeIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||