@@ -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-04-14 18:12 | |||||
/// 描 述:考试记录表 | |||||
/// </summary> | |||||
public class Exam_ExamPlanController : MvcControllerBase | |||||
{ | |||||
private Exam_ExamPlanIBLL exam_ExamPlanIBLL = new Exam_ExamPlanBLL(); | |||||
#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_ExamPlanIBLL.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_ExamPlanData = exam_ExamPlanIBLL.GetExam_ExamPlanEntity( keyValue ); | |||||
var jsonData = new { | |||||
Exam_ExamPlan = Exam_ExamPlanData, | |||||
}; | |||||
return Success(jsonData); | |||||
} | |||||
#endregion | |||||
#region 提交数据 | |||||
/// <summary> | |||||
/// 删除实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
[HttpPost] | |||||
[AjaxOnly] | |||||
public ActionResult DeleteForm(string keyValue) | |||||
{ | |||||
exam_ExamPlanIBLL.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_ExamPlanEntity entity = strEntity.ToObject<Exam_ExamPlanEntity>(); | |||||
exam_ExamPlanIBLL.SaveEntity(keyValue,entity); | |||||
if (string.IsNullOrEmpty(keyValue)) | |||||
{ | |||||
} | |||||
return Success("保存成功!"); | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,43 @@ | |||||
@{ | |||||
ViewBag.Title = "考试记录表"; | |||||
Layout = "~/Views/Shared/_Form.cshtml"; | |||||
} | |||||
<div class="lr-form-wrap" id="form"> | |||||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" > | |||||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" > | |||||
<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_ExamPlan" > | |||||
<div class="lr-form-item-title">排考名称<font face="宋体">*</font></div> | |||||
<input id="PlanName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||||
<div class="lr-form-item-title">排考类型<font face="宋体">*</font></div> | |||||
<div id="PlanType" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||||
<div class="lr-form-item-title">排考编号<font face="宋体">*</font></div> | |||||
<input id="PlanCode" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||||
<div class="lr-form-item-title">排考总人数<font face="宋体">*</font></div> | |||||
<input id="EPStuCount" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" > | |||||
<div class="lr-form-item-title">生成座位<font face="宋体">*</font></div> | |||||
<div id="EPRandom" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item" data-table="Exam_ExamPlan" > | |||||
<div class="lr-form-item-title">是否生成<font face="宋体">*</font></div> | |||||
<div id="EPGenarate" isvalid="yes" checkexpession="NotNull" ></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item" data-table="Exam_ExamPlan" > | |||||
<div class="lr-form-item-title">排序号<font face="宋体">*</font></div> | |||||
<input id="EPOrder" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Form.js") |
@@ -0,0 +1,68 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-14 18:12 | |||||
* 描 述:考试记录表 | |||||
*/ | |||||
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' | |||||
}); | |||||
$('#PlanType').lrDataItemSelect({ code: 'StudentType' }); | |||||
$('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
$('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
}, | |||||
initData: function () { | |||||
if (!!keyValue) { | |||||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/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_ExamPlan/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||||
// 保存成功后才回调 | |||||
if (!!callBack) { | |||||
callBack(); | |||||
} | |||||
}); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -0,0 +1,66 @@ | |||||
@{ | |||||
ViewBag.Title = "考试记录表"; | |||||
Layout = "~/Views/Shared/_Index.cshtml"; | |||||
} | |||||
<div class="lr-layout " > | |||||
<div class="lr-layout-center"> | |||||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||||
<div class="lr-layout-tool"> | |||||
<div class="lr-layout-tool-left"> | |||||
<div class="lr-layout-tool-item"> | |||||
<div id="multiple_condition_query"> | |||||
<div class="lr-query-formcontent"> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">学年</div> | |||||
<div id="AcademicYearNo"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">学期</div> | |||||
<div id="Semester"></div> | |||||
</div> | |||||
<div class="col-xs-12 lr-form-item"> | |||||
<div class="lr-form-item-title">排考名称</div> | |||||
<input id="PlanName" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">排考类型</div> | |||||
<div id="PlanType"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">排考编号</div> | |||||
<input id="PlanCode" type="text" class="form-control" /> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">生成座位</div> | |||||
<div id="EPRandom"></div> | |||||
</div> | |||||
<div class="col-xs-6 lr-form-item"> | |||||
<div class="lr-form-item-title">是否生成</div> | |||||
<div id="EPGenarate"></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 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_planks" class="btn btn-default"><i class="fa fa-plus"></i> 安排考试</a> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
<div class="lr-layout-body" id="gridtable"></div> | |||||
</div> | |||||
</div> | |||||
</div> | |||||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlan/Index.js") |
@@ -0,0 +1,147 @@ | |||||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||||
* 创建人:超级管理员 | |||||
* 日 期:2022-04-14 18:12 | |||||
* 描 述:考试记录表 | |||||
*/ | |||||
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' | |||||
}); | |||||
$('#PlanType').lrDataItemSelect({ code: 'StudentType' }); | |||||
$('#EPRandom').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
$('#EPGenarate').lrDataItemSelect({ code: 'YesOrNoBit' }); | |||||
// 刷新 | |||||
$('#lr_refresh').on('click', function () { | |||||
location.reload(); | |||||
}); | |||||
// 新增 | |||||
$('#lr_add').on('click', function () { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '新增', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Form', | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
}); | |||||
// 编辑 | |||||
$('#lr_edit').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerForm({ | |||||
id: 'form', | |||||
title: '编辑', | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/Form?keyValue=' + keyValue, | |||||
width: 600, | |||||
height: 400, | |||||
callBack: function (id) { | |||||
return top[id].acceptClick(refreshGirdData); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 删除 | |||||
$('#lr_delete').on('click', function () { | |||||
var keyValue = $('#gridtable').jfGridValue('EPId'); | |||||
if (learun.checkrow(keyValue)) { | |||||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||||
if (res) { | |||||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/DeleteForm', { keyValue: keyValue }, function () { | |||||
refreshGirdData(); | |||||
}); | |||||
} | |||||
}); | |||||
} | |||||
}); | |||||
// 打印 | |||||
$('#lr_print').on('click', function () { | |||||
$('#gridtable').jqprintTable(); | |||||
}); | |||||
// 生成排考名单 | |||||
$('#lr_generate').on('click', function () { | |||||
}); | |||||
// 清除排考名单 | |||||
$('#lr_cleargenerate').on('click', function () { | |||||
}); | |||||
// 安排考试 | |||||
$('#lr_planks').on('click', function () { | |||||
}); | |||||
}, | |||||
// 初始化列表 | |||||
initGird: function () { | |||||
$('#gridtable').lrAuthorizeJfGridLei({ | |||||
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlan/GetPageList', | |||||
headData: [ | |||||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||||
{ label: "排考名称", name: "PlanName", width: 100, align: "left" }, | |||||
{ | |||||
label: "排考类型", name: "PlanType", width: 100, align: "left", | |||||
formatterAsync: function (callback, value, row, op, $cell) { | |||||
learun.clientdata.getAsync('dataItem', { | |||||
key: value, | |||||
code: 'StudentType', | |||||
callback: function (_data) { | |||||
callback(_data.text); | |||||
} | |||||
}); | |||||
} | |||||
}, | |||||
{ label: "排考编号", name: "PlanCode", width: 100, align: "left" }, | |||||
{ label: "排考总人数", name: "EPStuCount", width: 100, align: "left" }, | |||||
{ | |||||
label: "生成座位", name: "EPRandom", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == true ? "是" : "否"; | |||||
} | |||||
}, | |||||
{ | |||||
label: "是否生成", name: "EPGenarate", width: 100, align: "left", | |||||
formatter: function (cellvalue) { | |||||
return cellvalue == true ? "是" : "否"; | |||||
} | |||||
}, | |||||
{ label: "排序号", name: "EPOrder", width: 100, align: "left" }, | |||||
], | |||||
mainId: 'EPId', | |||||
isPage: true | |||||
}); | |||||
page.search(); | |||||
}, | |||||
search: function (param) { | |||||
param = param || {}; | |||||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||||
} | |||||
}; | |||||
refreshGirdData = function () { | |||||
$('#gridtable').jfGridSet('reload'); | |||||
}; | |||||
page.init(); | |||||
} |
@@ -835,6 +835,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_ExamPlanController.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | <Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | ||||
@@ -6361,6 +6362,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_ExamPlan\Index.cshtml" /> | |||||
<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.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-14 18:12 | |||||
/// 描 述:考试记录表 | |||||
/// </summary> | |||||
public class Exam_ExamPlanMap : EntityTypeConfiguration<Exam_ExamPlanEntity> | |||||
{ | |||||
public Exam_ExamPlanMap() | |||||
{ | |||||
#region 表、主键 | |||||
//表 | |||||
this.ToTable("EXAM_EXAMPLAN"); | |||||
//主键 | |||||
this.HasKey(t => t.EPId); | |||||
#endregion | |||||
#region 配置关系 | |||||
#endregion | |||||
} | |||||
} | |||||
} | |||||
@@ -573,6 +573,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_ExamPlanMap.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,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-04-14 18:12 | |||||
/// 描 述:考试记录表 | |||||
/// </summary> | |||||
public class Exam_ExamPlanBLL : Exam_ExamPlanIBLL | |||||
{ | |||||
private Exam_ExamPlanService exam_ExamPlanService = new Exam_ExamPlanService(); | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">分页参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_ExamPlanEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamPlanService.GetPageList(pagination, queryJson); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Exam_ExamPlan表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Exam_ExamPlanEntity GetExam_ExamPlanEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return exam_ExamPlanService.GetExam_ExamPlanEntity(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_ExamPlanService.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_ExamPlanEntity entity) | |||||
{ | |||||
try | |||||
{ | |||||
exam_ExamPlanService.SaveEntity(keyValue, entity); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowBusinessException(ex); | |||||
} | |||||
} | |||||
} | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,90 @@ | |||||
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 18:12 | |||||
/// 描 述:考试记录表 | |||||
/// </summary> | |||||
public class Exam_ExamPlanEntity | |||||
{ | |||||
#region 实体成员 | |||||
/// <summary> | |||||
/// EPId | |||||
/// </summary> | |||||
[Column("EPID")] | |||||
public string EPId { get; set; } | |||||
/// <summary> | |||||
/// 学年 | |||||
/// </summary> | |||||
[Column("ACADEMICYEARNO")] | |||||
public string AcademicYearNo { get; set; } | |||||
/// <summary> | |||||
/// 学期 | |||||
/// </summary> | |||||
[Column("SEMESTER")] | |||||
public int? Semester { get; set; } | |||||
/// <summary> | |||||
/// 排考名称 | |||||
/// </summary> | |||||
[Column("PLANNAME")] | |||||
public string PlanName { get; set; } | |||||
/// <summary> | |||||
/// 排考类型 | |||||
/// </summary> | |||||
[Column("PLANTYPE")] | |||||
public string PlanType { get; set; } | |||||
/// <summary> | |||||
/// 排考编号 | |||||
/// </summary> | |||||
[Column("PLANCODE")] | |||||
public string PlanCode { get; set; } | |||||
/// <summary> | |||||
/// 排考总人数 | |||||
/// </summary> | |||||
[Column("EPSTUCOUNT")] | |||||
public int? EPStuCount { get; set; } | |||||
/// <summary> | |||||
/// 是否随机生成座位 | |||||
/// </summary> | |||||
[Column("EPRANDOM")] | |||||
public bool? EPRandom { get; set; } | |||||
/// <summary> | |||||
/// 是否已生成 | |||||
/// </summary> | |||||
[Column("EPGENARATE")] | |||||
public bool? EPGenarate { get; set; } | |||||
/// <summary> | |||||
/// 排序号 | |||||
/// </summary> | |||||
[Column("EPORDER")] | |||||
public int? EPOrder { get; set; } | |||||
#endregion | |||||
#region 扩展操作 | |||||
/// <summary> | |||||
/// 新增调用 | |||||
/// </summary> | |||||
public void Create() | |||||
{ | |||||
this.EPId = Guid.NewGuid().ToString(); | |||||
} | |||||
/// <summary> | |||||
/// 编辑调用 | |||||
/// </summary> | |||||
/// <param name="keyValue"></param> | |||||
public void Modify(string keyValue) | |||||
{ | |||||
this.EPId = 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-04-14 18:12 | |||||
/// 描 述:考试记录表 | |||||
/// </summary> | |||||
public interface Exam_ExamPlanIBLL | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
IEnumerable<Exam_ExamPlanEntity> GetPageList(Pagination pagination, string queryJson); | |||||
/// <summary> | |||||
/// 获取Exam_ExamPlan表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
Exam_ExamPlanEntity GetExam_ExamPlanEntity(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_ExamPlanEntity entity); | |||||
#endregion | |||||
} | |||||
} |
@@ -0,0 +1,188 @@ | |||||
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 18:12 | |||||
/// 描 述:考试记录表 | |||||
/// </summary> | |||||
public class Exam_ExamPlanService : RepositoryFactory | |||||
{ | |||||
#region 获取数据 | |||||
/// <summary> | |||||
/// 获取页面显示列表数据 | |||||
/// </summary> | |||||
/// <param name="pagination">查询参数</param> | |||||
/// <param name="queryJson">查询参数</param> | |||||
/// <returns></returns> | |||||
public IEnumerable<Exam_ExamPlanEntity> GetPageList(Pagination pagination, string queryJson) | |||||
{ | |||||
try | |||||
{ | |||||
var strSql = new StringBuilder(); | |||||
strSql.Append("SELECT "); | |||||
strSql.Append(@" | |||||
t.EPId, | |||||
t.AcademicYearNo, | |||||
t.Semester, | |||||
t.PlanName, | |||||
t.PlanType, | |||||
t.PlanCode, | |||||
t.EPStuCount, | |||||
t.EPRandom, | |||||
t.EPGenarate, | |||||
t.EPOrder | |||||
"); | |||||
strSql.Append(" FROM Exam_ExamPlan 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["PlanName"].IsEmpty()) | |||||
{ | |||||
dp.Add("PlanName", "%" + queryParam["PlanName"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.PlanName Like @PlanName "); | |||||
} | |||||
if (!queryParam["PlanType"].IsEmpty()) | |||||
{ | |||||
dp.Add("PlanType",queryParam["PlanType"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.PlanType = @PlanType "); | |||||
} | |||||
if (!queryParam["PlanCode"].IsEmpty()) | |||||
{ | |||||
dp.Add("PlanCode", "%" + queryParam["PlanCode"].ToString() + "%", DbType.String); | |||||
strSql.Append(" AND t.PlanCode Like @PlanCode "); | |||||
} | |||||
if (!queryParam["EPRandom"].IsEmpty()) | |||||
{ | |||||
dp.Add("EPRandom",queryParam["EPRandom"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.EPRandom = @EPRandom "); | |||||
} | |||||
if (!queryParam["EPGenarate"].IsEmpty()) | |||||
{ | |||||
dp.Add("EPGenarate",queryParam["EPGenarate"].ToString(), DbType.String); | |||||
strSql.Append(" AND t.EPGenarate = @EPGenarate "); | |||||
} | |||||
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanEntity>(strSql.ToString(),dp, pagination); | |||||
} | |||||
catch (Exception ex) | |||||
{ | |||||
if (ex is ExceptionEx) | |||||
{ | |||||
throw; | |||||
} | |||||
else | |||||
{ | |||||
throw ExceptionEx.ThrowServiceException(ex); | |||||
} | |||||
} | |||||
} | |||||
/// <summary> | |||||
/// 获取Exam_ExamPlan表实体数据 | |||||
/// </summary> | |||||
/// <param name="keyValue">主键</param> | |||||
/// <returns></returns> | |||||
public Exam_ExamPlanEntity GetExam_ExamPlanEntity(string keyValue) | |||||
{ | |||||
try | |||||
{ | |||||
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanEntity>(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_ExamPlanEntity>(t=>t.EPId == 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_ExamPlanEntity 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 | |||||
} | |||||
} |
@@ -1771,6 +1771,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_ExamPlan\Exam_ExamPlanEntity.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamPlan\Exam_ExamPlanService.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamPlan\Exam_ExamPlanBLL.cs" /> | |||||
<Compile Include="EducationalAdministration\Exam_ExamPlan\Exam_ExamPlanIBLL.cs" /> | |||||
</ItemGroup> | </ItemGroup> | ||||
<ItemGroup> | <ItemGroup> | ||||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | <ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | ||||