@@ -0,0 +1,142 @@ | |||||
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-15 15:03 | |||||
/// 描 述:排考安排课程 | |||||
/// </summary> | |||||
public class Exam_ExamPlanLessonController : MvcControllerBase | |||||
{ | |||||
private Exam_ExamPlanLessonIBLL exam_ExamPlanLessonIBLL = new Exam_ExamPlanLessonBLL(); | |||||
#region 视图功能 | |||||
/// <summary> | |||||
/// 主页面 | |||||
/// <summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
public ActionResult Index(string EPId) | |||||
{ | |||||
exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId); | |||||
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_ExamPlanLessonIBLL.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_ExamPlanLessonData = exam_ExamPlanLessonIBLL.GetExam_ExamPlanLessonEntity( keyValue ); | |||||
var jsonData = new { | |||||
Exam_ExamPlanLesson = Exam_ExamPlanLessonData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
/// <summary> | |||||
/// 获取左侧树形数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
[HttpGet] | |||||
[AjaxOnly] | |||||
public ActionResult GetTree() | |||||
{ | |||||
var data = exam_ExamPlanLessonIBLL.GetTree(); | |||||
return Success(data); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 初始化Exam_ExamPlanLesson,如果表中没有数据,将考试课程表数据添加进去 | |||||
/// </summary> | |||||
/// <param name="EPId">排考记录主表Id</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult InitExamPlanLesson(string EPId) | |||||
{ | |||||
exam_ExamPlanLessonIBLL.InitExamPlanLesson(EPId); | |||||
return Success("初始化成功!"); | |||||
} | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
exam_ExamPlanLessonIBLL.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_ExamPlanLessonEntity entity = strEntity.ToObject<Exam_ExamPlanLessonEntity>(); | |||||
exam_ExamPlanLessonIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -91,8 +91,17 @@ var bootstrap = function ($, learun) { | |||||
$('#lr_cleargenerate').on('click', function () { | $('#lr_cleargenerate').on('click', function () { | ||||
}); | }); | ||||
// 安排考试 | // 安排考试 | ||||
$('#lr_planks').on('click', function () { | |||||
}); | |||||
$('#lr_planks').on('click', | |||||
function () { | |||||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||||
if (learun.checkrow(keyValue)) | |||||
learun.frameTab.open({ | |||||
F_ModuleId: keyValue, | |||||
F_Icon: 'fa magic', | |||||
F_FullName: '安排考试', | |||||
F_UrlAddress: '/EducationalAdministration/Exam_ExamPlanLesson/Index?EPId=' + keyValue | |||||
}); | |||||
}); | |||||
}, | }, | ||||
// 初始化列表 | // 初始化列表 | ||||
initGird: function () { | initGird: function () { | ||||
@@ -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_ExamPlanLesson" > | |||||
<div class="lr-form-item-title">考试日期</div> | |||||
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt:'yyyy-MM-dd',onpicked: function () { $('#ExamDate').trigger('change'); } })" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson" > | |||||
<div class="lr-form-item-title">考试开始时间<font face="宋体">*</font></div> | |||||
<input id="ExamTime" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson" > | |||||
<div class="lr-form-item-title">结束时间</div> | |||||
<input id="ClassNum" type="text" class="form-control" /> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js") |
@@ -0,0 +1,50 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-15 15:03 | |||||
* 描 述:排考安排课程 | |||||
*/ | |||||
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 () { | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/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_ExamPlanLesson/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,73 @@ | |||||
@{ | |||||
ViewBag.Title = "排考安排课程"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<style> | |||||
#div_gridtable_Class { | |||||
float: left; | |||||
width: 50%; | |||||
} | |||||
#div_gridtable_Room { | |||||
float: right; | |||||
width: 50%; | |||||
padding-left: 10px; | |||||
} | |||||
.tbTitle { | |||||
float: left; | |||||
line-height: 32px; | |||||
color: #666; | |||||
padding-left: 15px; | |||||
} | |||||
</style> | |||||
<div class="lr-layout lr-layout-left-center" id="lr_layout"> | |||||
<div class="lr-layout-left"> | |||||
<div class="lr-layout-wrap"> | |||||
<div class="lr-layout-title lrlg ">树形列表</div> | |||||
<div id="dataTree" class="lr-layout-body"></div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap "> | |||||
<div class="lr-layout-title"> | |||||
<span id="titleinfo" class="lrlg">列表信息</span> | |||||
</div> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
</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 id="div_gridtable_Class"> | |||||
<div> | |||||
<div class="tbTitle"><span>班级信息</span></div> | |||||
<div class=" btn-group btn-group-sm" style="float: right;"> | |||||
<a id="lr_add_Class" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit_Class" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete_Class" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable_Class"></div> | |||||
</div> | |||||
<div id="div_gridtable_Room"> | |||||
<div class="tbTitle"><span>考场信息</span></div> | |||||
<div class=" btn-group btn-group-sm" style="float: right;"> | |||||
<a id="lr_add_Room" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||||
<a id="lr_edit_Room" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||||
<a id="lr_delete_Room" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable_Room"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js") |
@@ -0,0 +1,107 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-15 15:03 | |||||
* 描 述:排考安排课程 | |||||
*/ | |||||
var refreshGirdData; | |||||
//排考记录Id | |||||
var EPId = request('EPId'); | |||||
var bootstrap = function ($, learun) { | |||||
"use strict"; | |||||
var page = { | |||||
init: function () { | |||||
page.initGird(); | |||||
page.bind(); | |||||
}, | |||||
bind: function () { | |||||
// 初始化左侧树形数据 | |||||
$('#dataTree').lrtree({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetTree', | |||||
nodeClick: function (item) { | |||||
page.search({ EPLId: item.value }); | |||||
} | |||||
}); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('EPLId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('EPLId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').jfGrid({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetPageList', | |||||
headData: [ | |||||
{ label: "考试日期", name: "ExamDate", width: 100, align: "left" }, | |||||
{ label: "考试开始时间", name: "ExamTime", width: 100, align: "left" }, | |||||
{ label: "结束时间", name: "ClassNum", width: 100, align: "left" }, | |||||
], | |||||
mainId: 'EPLId', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
//initTree: function () { | |||||
// //初始化左侧课程数据 | |||||
// if (!!EPId) { | |||||
// learun.postForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/InitExamPlanLesson', { EPId: EPId }, function () { | |||||
// refreshGirdData(); | |||||
// }); | |||||
// } | |||||
//}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -838,6 +838,7 @@ | |||||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamLessonController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamLessonController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_InvigilateTeacherController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\Exam_InvigilateTeacherController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanController.cs" /> | <Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanController.cs" /> | ||||
<Compile Include="Areas\EducationalAdministration\Controllers\Exam_ExamPlanLessonController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -6375,6 +6376,10 @@ | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Index.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Index.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Form.cshtml" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Form.cshtml" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Form.js" /> | <Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\Form.js" /> | ||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\Index.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\Index.js" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\Form.cshtml" /> | |||||
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\Form.js" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Folder Include="Areas\EducationalAdministration\Views\AwardAndPunishment\" /> | <Folder Include="Areas\EducationalAdministration\Views\AwardAndPunishment\" /> | ||||
@@ -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-15 15:03 | |||||
/// 描 述:排考安排课程 | |||||
/// </summary> | |||||
public class Exam_ExamPlanLessonMap : EntityTypeConfiguration<Exam_ExamPlanLessonEntity> | |||||
{ | |||||
public Exam_ExamPlanLessonMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("EXAM_EXAMPLANLESSON"); | |||||
//主键 | |||||
this.HasKey(t => t.EPLId); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -576,6 +576,7 @@ | |||||
<Compile Include="EducationalAdministration\Exam_ExamLessonMap.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamLessonMap.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_InvigilateTeacherMap.cs" /> | <Compile Include="EducationalAdministration\Exam_InvigilateTeacherMap.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamPlanMap.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamPlanMap.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamPlanLessonMap.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,186 @@ | |||||
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-15 15:03 | |||||
/// 描 述:排考安排课程 | |||||
/// </summary> | |||||
public class Exam_ExamPlanLessonBLL : Exam_ExamPlanLessonIBLL | |||||
{ | |||||
private Exam_ExamPlanLessonService exam_ExamPlanLessonService = new Exam_ExamPlanLessonService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_ExamPlanLessonEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamPlanLessonService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Exam_ExamPlanLesson表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Exam_ExamPlanLessonEntity GetExam_ExamPlanLessonEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamPlanLessonService.GetExam_ExamPlanLessonEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取左侧树形数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public List<TreeModel> GetTree() | |||||
{ | |||||
try | |||||
{ | |||||
DataTable list = exam_ExamPlanLessonService.GetSqlTree(); | |||||
List<TreeModel> treeList = new List<TreeModel>(); | |||||
foreach (DataRow item in list.Rows) | |||||
{ | |||||
TreeModel node = new TreeModel | |||||
{ | |||||
id = item["lessonno"].ToString(), | |||||
text = item["lessonname"].ToString(), | |||||
value = item["lessonno"].ToString(), | |||||
showcheck = false, | |||||
checkstate = 0, | |||||
isexpand = true, | |||||
parentId = "" | |||||
}; | |||||
treeList.Add(node); } | |||||
return treeList.ToTree(); | |||||
} | |||||
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_ExamPlanLessonService.DeleteEntity(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 初始化 | |||||
/// </summary> | |||||
/// <param name="EPId"></param> | |||||
public void InitExamPlanLesson(string EPId) | |||||
{ | |||||
try | |||||
{ | |||||
exam_ExamPlanLessonService.InitExamPlanLesson(EPId); | |||||
} | |||||
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_ExamPlanLessonEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
exam_ExamPlanLessonService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,100 @@ | |||||
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-15 15:03 | |||||
/// 描 述:排考安排课程 | |||||
/// </summary> | |||||
public class Exam_ExamPlanLessonEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// EPLId | |||||
/// </summary> | |||||
[Column("EPLID")] | |||||
public string EPLId { get; set; } | |||||
/// <summary> | |||||
/// EPId | |||||
/// </summary> | |||||
[Column("EPID")] | |||||
public string EPId { get; set; } | |||||
/// <summary> | |||||
/// LessonName | |||||
/// </summary> | |||||
[Column("LESSONNAME")] | |||||
public string LessonName { get; set; } | |||||
/// <summary> | |||||
/// LessonNo | |||||
/// </summary> | |||||
[Column("LESSONNO")] | |||||
public string LessonNo { get; set; } | |||||
/// <summary> | |||||
/// ExamDate | |||||
/// </summary> | |||||
[Column("EXAMDATE")] | |||||
public DateTime? ExamDate { get; set; } | |||||
/// <summary> | |||||
/// ExamTime | |||||
/// </summary> | |||||
[Column("EXAMTIME")] | |||||
public string ExamTime { get; set; } | |||||
/// <summary> | |||||
/// ClassNum | |||||
/// </summary> | |||||
[Column("CLASSNUM")] | |||||
public int? ClassNum { get; set; } | |||||
/// <summary> | |||||
/// RealClassNum | |||||
/// </summary> | |||||
[Column("REALCLASSNUM")] | |||||
public int? RealClassNum { get; set; } | |||||
/// <summary> | |||||
/// StuCount | |||||
/// </summary> | |||||
[Column("STUCOUNT")] | |||||
public int? StuCount { get; set; } | |||||
/// <summary> | |||||
/// RealStuCount | |||||
/// </summary> | |||||
[Column("REALSTUCOUNT")] | |||||
public int? RealStuCount { get; set; } | |||||
/// <summary> | |||||
/// SeatCount | |||||
/// </summary> | |||||
[Column("SEATCOUNT")] | |||||
public int? SeatCount { get; set; } | |||||
/// <summary> | |||||
/// ELCheckMark | |||||
/// </summary> | |||||
[Column("ELCHECKMARK")] | |||||
public bool? ELCheckMark { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.EPLId = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.EPLId = 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-15 15:03 | |||||
/// 描 述:排考安排课程 | |||||
/// </summary> | |||||
public interface Exam_ExamPlanLessonIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Exam_ExamPlanLessonEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取Exam_ExamPlanLesson表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Exam_ExamPlanLessonEntity GetExam_ExamPlanLessonEntity(string keyValue); | |||||
/// <summary> | |||||
/// 获取左侧树形数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
List<TreeModel> GetTree(); | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
void DeleteEntity(string keyValue); | |||||
void InitExamPlanLesson(string EPId); | |||||
/// <summary> | |||||
/// 保存实体数据(新增、修改) | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <param name="entity">实体</param> | |||||
void SaveEntity(string keyValue, Exam_ExamPlanLessonEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,203 @@ | |||||
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-15 15:03 | |||||
/// 描 述:排考安排课程 | |||||
/// </summary> | |||||
public class Exam_ExamPlanLessonService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_ExamPlanLessonEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.EPLId, | |||||
t.ExamDate, | |||||
t.ExamTime, | |||||
t.ClassNum | |||||
"); | |||||
strSql.Append(" FROM Exam_ExamPlanLesson t "); | |||||
strSql.Append(" WHERE 1=1 "); | |||||
var queryParam = queryJson.ToJObject(); | |||||
// 虚拟参数 | |||||
var dp = new DynamicParameters(new { }); | |||||
if (!queryParam["ExamDate"].IsEmpty()) | |||||
{ | |||||
dp.Add("ExamDate",queryParam["ExamDate"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.ExamDate = @ExamDate "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Exam_ExamPlanLesson表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Exam_ExamPlanLessonEntity GetExam_ExamPlanLessonEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanLessonEntity>(keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取树形数据 | |||||
/// </summary> | |||||
/// <returns></returns> | |||||
public DataTable GetSqlTree() | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindTable(" select distinct LessonName,LessonNo from Exam_ExamPlanLesson"); | |||||
} | |||||
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_ExamPlanLessonEntity>(t=>t.EPLId == keyValue); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 初始化排考课程数据 | |||||
/// </summary> | |||||
/// <param name="EPId">排考记录主表Id</param> | |||||
public void InitExamPlanLesson(string EPId) | |||||
{ | |||||
try | |||||
{ | |||||
var Exam_ExamPlan = this.BaseRepository("CollegeMIS") | |||||
.FindEntity<Exam_ExamPlanEntity>(x => x.EPId == EPId); | |||||
string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,LessonName,LessonNo) | |||||
select NEWID(),'{EPId}',LessonName,LessonNo from Exam_ExamLesson where AcademicYearNo='{Exam_ExamPlan.AcademicYearNo}' and Semester='{Exam_ExamPlan.Semester}' | |||||
and LessonNo not in (select LessonNo from Exam_ExamPlanLesson where EPId='{EPId}')"; | |||||
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_ExamPlanLessonEntity 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 | |||||
} | |||||
} |
@@ -1783,6 +1783,10 @@ | |||||
<Compile Include="EducationalAdministration\Exam_ExamPlan\Exam_ExamPlanService.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamPlan\Exam_ExamPlanService.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamPlan\Exam_ExamPlanBLL.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamPlan\Exam_ExamPlanBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamPlan\Exam_ExamPlanIBLL.cs" /> | <Compile Include="EducationalAdministration\Exam_ExamPlan\Exam_ExamPlanIBLL.cs" /> | ||||
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonService.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||