Переглянути джерело

排考安排班级、考场列表,排考课程设置考试时间等

西昌缴费二期
zhangli 2 роки тому
джерело
коміт
51024918e3
23 змінених файлів з 1327 додано та 67 видалено
  1. +91
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs
  2. +8
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml
  3. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.cshtml
  4. +128
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js
  5. +14
    -6
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml
  6. +73
    -31
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js
  7. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  8. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanClassMap.cs
  9. +29
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanRoomMap.cs
  10. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj
  11. +125
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassBLL.cs
  12. +68
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassEntity.cs
  13. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassIBLL.cs
  14. +149
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs
  15. +25
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs
  16. +20
    -9
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs
  17. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs
  18. +55
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs
  19. +127
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomBLL.cs
  20. +80
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomEntity.cs
  21. +49
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomIBLL.cs
  22. +151
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs
  23. +8
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj

+ 91
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs Переглянути файл

@@ -3,6 +3,7 @@ using System.Data;
using Learun.Application.TwoDevelopment.EducationalAdministration;
using System.Web.Mvc;
using System.Collections.Generic;
using System;

namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
{
@@ -16,12 +17,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public class Exam_ExamPlanLessonController : MvcControllerBase
{
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 视图功能

/// <summary>
/// 主页面
/// <summary>
/// </summary>
/// <param name="EPId">排考记录主表Id</param>
/// <returns></returns>
[HttpGet]
public ActionResult Index(string EPId)
@@ -36,12 +40,60 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[HttpGet]
public ActionResult Form()
{
return View();
return View();
}
[HttpGet]
public ActionResult FormClass()
{
return View();
}

#endregion

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListForClass(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ExamPlanClassIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListForRoom(string pagination, string queryJson)
{
Pagination paginationobj = pagination.ToObject<Pagination>();
var data = exam_ExamPlanRoomIBLL.GetPageList(paginationobj, queryJson);
var jsonData = new
{
rows = data,
total = paginationobj.total,
page = paginationobj.page,
records = paginationobj.records
};
return Success(jsonData);
}
/// <summary>
/// 获取页面显示列表数据
/// </summary>
@@ -72,8 +124,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var Exam_ExamPlanLessonData = exam_ExamPlanLessonIBLL.GetExam_ExamPlanLessonEntity( keyValue );
var jsonData = new {
var Exam_ExamPlanLessonData = exam_ExamPlanLessonIBLL.GetExam_ExamPlanLessonEntity(keyValue);
if (!string.IsNullOrEmpty(Exam_ExamPlanLessonData.ExamTime))
{
var etime = Exam_ExamPlanLessonData.ExamTime.Split('-');
Exam_ExamPlanLessonData.ExamTimeStart = etime[0];
Exam_ExamPlanLessonData.ExamTimeEnd = etime[1];
}

var jsonData = new
{
Exam_ExamPlanLesson = Exam_ExamPlanLessonData,
};
return Success(jsonData);
@@ -119,6 +179,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success("删除成功!");
}
/// <summary>
/// 审核
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult Check(string keyValue)
{
exam_ExamPlanLessonIBLL.Check(keyValue);
return Success("审核成功!");
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
/// <param name="keyValue">主键</param>
@@ -130,10 +202,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
public ActionResult SaveForm(string keyValue, string strEntity)
{
Exam_ExamPlanLessonEntity entity = strEntity.ToObject<Exam_ExamPlanLessonEntity>();
exam_ExamPlanLessonIBLL.SaveEntity(keyValue,entity);
if (string.IsNullOrEmpty(keyValue))
DateTime time;
bool flag = DateTime.TryParse(entity.ExamTimeStart, out time);
if (!flag)
{
return Fail("考试开始时间格式不正确!");
}
if (!DateTime.TryParse(entity.ExamTimeEnd, out time))
{
return Fail("考试结束时间格式不正确!");
}

if (!string.IsNullOrEmpty(entity.ExamTimeStart) && !string.IsNullOrEmpty(entity.ExamTimeEnd))
{
entity.ExamTime = entity.ExamTimeStart.Trim() + "-" + entity.ExamTimeEnd;
}

exam_ExamPlanLessonIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}
#endregion


+ 8
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.cshtml Переглянути файл

@@ -3,17 +3,17 @@
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 class="col-xs-12 lr-form-item" data-table="Exam_ExamPlanLesson">
<div class="lr-form-item-title">考试日期<font face="宋体">*</font></div>
<input id="ExamDate" type="text" class="form-control lr-input-wdatepicker" isvalid="yes" checkexpession="NotNull" data-dateFmt="yyyy-MM-dd" 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="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" />
<input id="ExamTimeStart" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:09:00"/>
</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 class="col-xs-6 lr-form-item" data-table="Exam_ExamPlanLesson">
<div class="lr-form-item-title">结束时间<font face="宋体">*</font></div>
<input id="ExamTimeEnd" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请填写时分,例如:12:00"/>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Form.js")

+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.cshtml Переглянути файл

@@ -0,0 +1,44 @@
@{
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>
<input id="ClassName" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">班级代码</div>
<input id="ClassNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">系部</div>
<div id="DeptNo"></div>
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">专业</div>
<div id="MajorNo"></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>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js")

+ 128
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js Переглянути файл

@@ -0,0 +1,128 @@

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);
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' });
$('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' });
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GetPageList',
headData: [
{ label: "班级名称", name: "ClassName", width: 200, align: "left" },
{ label: "班级代码", name: "ClassNo", width: 100, align: "left" },
{
label: "系部", name: "DeptNo", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "MajorNo", width: 200, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{ label: "默认教室", name: "SerialNum", width: 100, align: "left" },
{
label: "班级类型", name: "ClassType", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'ClassType',
callback: function (_data) {
callback(_data.text);
}
});
}

},
{ label: "年级", name: "Grade", width: 80, align: "center" },
{ label: "学生人数", name: "StuNum", width: 80, align: "left" },
{
label: "班主任", name: "ClassDiredctorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_encode',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "辅导员", name: "ClassTutorNo", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata',
key: value,
keyId: 'f_encode',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}
},
{
label: "是否启用", name: "CheckMark", width: 80, align: "center",
formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
{
label: "是否拆分班", name: "IsSeparate", width: 80, align: "center",
formatter: function (cellvalue) {
return cellvalue == true ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
}
],
mainId: 'ClassId',
isPage: true,
isMultiselect: true,
sidx: 'ClassNo',
sord: 'ASC'
});
page.search();
},
search: function (param) {
param = param || {};
param.SqlParameter = " and CheckMark=1";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
page.init();
}

+ 14
- 6
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml Переглянути файл

@@ -13,17 +13,24 @@
width: 50%;
padding-left: 10px;
}

.tbTitle {
float: left;
line-height: 32px;
color: #666;
padding-left: 15px;
}

.examTimeShow {
line-height: 60px;
font-size: 12px;
margin-right: 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 class="lr-layout-title lrlg ">考试课程</div>
<div id="dataTree" class="lr-layout-body"></div>
</div>
</div>
@@ -34,15 +41,16 @@
</div>
<div class="lr-layout-tool">
<div class="lr-layout-tool-left">
<span class="examTimeShow">考试日期:<span id="examDate"></span></span>
<span class="examTimeShow"> 考试时间:<span id="examTime"></span></span>
</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>&nbsp;新增</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_ExamTime" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;设置考试时间</a>
<a id="lr_check" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;审核</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>
@@ -50,7 +58,7 @@
<div id="div_gridtable_Class">
<div>
<div class="tbTitle"><span>班级信息</span></div>
<div class=" btn-group btn-group-sm" style="float: right;">
<div class=" btn-group btn-group-sm" style="float: right;" learun-authorize="yes">
<a id="lr_add_Class" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit_Class" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete_Class" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
@@ -60,7 +68,7 @@
</div>
<div id="div_gridtable_Room">
<div class="tbTitle"><span>考场信息</span></div>
<div class=" btn-group btn-group-sm" style="float: right;">
<div class=" btn-group btn-group-sm" style="float: right;" learun-authorize="yes">
<a id="lr_add_Room" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;新增</a>
<a id="lr_edit_Room" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete_Room" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>


+ 73
- 31
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js Переглянути файл

@@ -7,6 +7,7 @@
var refreshGirdData;
//排考记录Id
var EPId = request('EPId');
var EPLId;
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -19,19 +20,39 @@ var bootstrap = function ($, learun) {
$('#dataTree').lrtree({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetTree',
nodeClick: function (item) {
page.search({ EPLId: item.value });
//安排课程表ID(Exam_ExamPlanLesson)
EPLId = item.id;
page.show(EPLId);
page.search({ EPLId: item.id });
}
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 新增
$('#lr_add').on('click', function () {
//设置考试时间
$('#lr_ExamTime').on('click', function () {
if (!!EPLId) {
learun.layerForm({
id: 'form',
title: '设置考试时间',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form?keyValue=' + EPLId,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
} else {
return learun.alert.warning("请选择考试课程!");
}
});
//班级 新增
$('#lr_add_Class').on('click', function () {
learun.layerForm({
id: 'form',
id: 'formclass',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormClass',
width: 600,
height: 400,
callBack: function (id) {
@@ -39,14 +60,14 @@ var bootstrap = function ($, learun) {
}
});
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPLId');
// 班级编辑
$('#lr_edit_Class').on('click', function () {
var keyValue = $('#gridtable_Class').jfGridValue('EPCId');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
id: 'formclass',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/Form?keyValue=' + keyValue,
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormClass?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
@@ -55,13 +76,13 @@ var bootstrap = function ($, learun) {
});
}
});
// 删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('EPLId');
// 班级删除
$('#lr_delete_Class').on('click', function () {
var keyValue = $('#gridtable_Class').jfGridValue('EPCId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteForm', { keyValue: keyValue }, function () {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteClass', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
@@ -75,33 +96,54 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetPageList',
//班级
$('#gridtable_Class').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetPageListForClass',
headData: [
{ label: "考试日期", name: "ExamDate", width: 100, align: "left" },
{ label: "考试开始时间", name: "ExamTime", width: 100, align: "left" },
{ label: "结束时间", name: "ClassNum", width: 100, align: "left" },
{ label: "班级名称", name: "ClassName", width: 100, align: "left" },
{ label: "班级编号", name: "ClassNo", width: 100, align: "left" },
{ label: "班级人数", name: "ClassStuNum", width: 100, align: "left" },
],
mainId: 'EPLId',
isPage: true
mainId: 'EPCId',
isPage: true,
isMultiselect: true,
});
//考场
$('#gridtable_Room').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetPageListForRoom',
headData: [
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left" },
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left" },
{ label: "考场座位数", name: "SeatCount", width: 100, align: "left" },
{ label: "监考老师编号", name: "EmpNo", width: 100, align: "left" },
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left" },
],
mainId: 'EPRId',
isPage: true,
isMultiselect: 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) });
$('#gridtable_Class').jfGridSet('reload', { queryJson: JSON.stringify(param) });
$('#gridtable_Room').jfGridSet('reload', { queryJson: JSON.stringify(param) });
},
//显示考试时间
show: function () {
if (!!EPLId) {
var res = learun.httpGet(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetFormData?keyValue=' + EPLId);

var data = res.data.Exam_ExamPlanLesson;
$('#examDate').html(learun.formatDate(data.ExamDate, 'yyyy-MM-dd'));
$('#examTime').html(data.ExamTime);
}
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
$('#gridtable_Class').jfGridSet('reload');
$('#gridtable_Room').jfGridSet('reload');
page.show();
};
page.init();
}

+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Переглянути файл

@@ -996,6 +996,7 @@
<Content Include="Areas\EducationalAdministration\Views\EvaHygieve\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\EvaViolationOfDiscipline\Index.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormClass.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\FormYearSemester.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Index.js" />
@@ -7648,6 +7649,7 @@
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\FormYearSemester.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Index.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormClass.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanClassMap.cs Переглянути файл

@@ -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 18:07
/// 描 述:排考安排班级
/// </summary>
public class Exam_ExamPlanClassMap : EntityTypeConfiguration<Exam_ExamPlanClassEntity>
{
public Exam_ExamPlanClassMap()
{
#region 表、主键
//表
this.ToTable("EXAM_EXAMPLANCLASS");
//主键
this.HasKey(t => t.EPCId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 29
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/Exam_ExamPlanRoomMap.cs Переглянути файл

@@ -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 18:12
/// 描 述:排考安排考场表
/// </summary>
public class Exam_ExamPlanRoomMap : EntityTypeConfiguration<Exam_ExamPlanRoomEntity>
{
public Exam_ExamPlanRoomMap()
{
#region 表、主键
//表
this.ToTable("EXAM_EXAMPLANROOM");
//主键
this.HasKey(t => t.EPRId);
#endregion

#region 配置关系
#endregion
}
}
}


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj Переглянути файл

@@ -577,6 +577,8 @@
<Compile Include="EducationalAdministration\Exam_InvigilateTeacherMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanLessonMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanClassMap.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanRoomMap.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


+ 125
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassBLL.cs Переглянути файл

@@ -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-15 15:03
/// 描 述:排考安排班级
/// </summary>
public class Exam_ExamPlanClassBLL : Exam_ExamPlanClassIBLL
{
private Exam_ExamPlanClassService exam_ExamPlanClassService = new Exam_ExamPlanClassService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanClassEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return exam_ExamPlanClassService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ExamPlanClassEntity GetEntity(string keyValue)
{
try
{
return exam_ExamPlanClassService.GetEntity(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_ExamPlanClassService.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_ExamPlanClassEntity entity)
{
try
{
exam_ExamPlanClassService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 68
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassEntity.cs Переглянути файл

@@ -0,0 +1,68 @@
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 18:07
/// 描 述:排考安排班级
/// </summary>
public class Exam_ExamPlanClassEntity
{
#region 实体成员
/// <summary>
/// EPCId
/// </summary>
/// <returns></returns>
[Column("EPCID")]
public string EPCId { get; set; }
/// <summary>
/// EPLId
/// </summary>
/// <returns></returns>
[Column("EPLID")]
public string EPLId { get; set; }
/// <summary>
/// ClassName
/// </summary>
/// <returns></returns>
[Column("CLASSNAME")]
public string ClassName { get; set; }
/// <summary>
/// ClassNo
/// </summary>
/// <returns></returns>
[Column("CLASSNO")]
public string ClassNo { get; set; }
/// <summary>
/// ClassStuNum
/// </summary>
/// <returns></returns>
[Column("CLASSSTUNUM")]
public int? ClassStuNum { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.EPCId = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.EPCId = keyValue;
}
#endregion
}
}


+ 49
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassIBLL.cs Переглянути файл

@@ -0,0 +1,49 @@
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_ExamPlanClassIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Exam_ExamPlanClassEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Exam_ExamPlanClassEntity GetEntity(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_ExamPlanClassEntity entity);
#endregion

}
}

+ 149
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs Переглянути файл

@@ -0,0 +1,149 @@
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_ExamPlanClassService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanClassEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.*
");
strSql.Append(" FROM Exam_ExamPlanClass t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["EPLId"].IsEmpty())
{
dp.Add("EPLId", queryParam["EPLId"].ToString(), DbType.String);
strSql.Append(" AND t.EPLId = @EPLId ");
}
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanClassEntity>(strSql.ToString(),dp, pagination);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ExamPlanClassEntity GetEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanClassEntity>(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_ExamPlanClassEntity>(t=>t.EPCId == 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_ExamPlanClassEntity 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

}
}

+ 25
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonBLL.cs Переглянути файл

@@ -81,7 +81,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
TreeModel node = new TreeModel
{
id = item["lessonno"].ToString(),
id = item["eplid"].ToString(),
text = item["lessonname"].ToString(),
value = item["lessonno"].ToString(),
showcheck = false,
@@ -132,6 +132,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 审核
/// </summary>
/// <param name="keyValue">主键</param>
public void Check(string keyValue)
{
try
{
exam_ExamPlanLessonService.Check(keyValue);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 初始化
/// </summary>


+ 20
- 9
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonEntity.cs Переглянути файл

@@ -20,10 +20,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[Column("EPLID")]
public string EPLId { get; set; }
/// <summary>
/// EPId
/// 排考记录主表Id
/// </summary>
[Column("EPID")]
public string EPId { get; set; }
/// <summary>
/// 考试课程表Id
/// </summary>
[Column("ELID")]
public string ELId { get; set; }
/// <summary>
/// LessonName
/// </summary>
@@ -35,42 +41,42 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
[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; }
@@ -94,6 +100,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
#endregion
#region 扩展字段
[NotMapped]
public string ExamTimeStart { get; set; }
[NotMapped]
public string ExamTimeEnd { get; set; }

#endregion
}
}


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonIBLL.cs Переглянути файл

@@ -41,6 +41,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// </summary>
/// <param name="keyValue">主键</param>
void DeleteEntity(string keyValue);
void Check(string keyValue);
void InitExamPlanLesson(string EPId);
/// <summary>
/// 保存实体数据(新增、修改)


+ 55
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs Переглянути файл

@@ -4,6 +4,7 @@ using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.EducationalAdministration
@@ -44,10 +45,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
var dp = new DynamicParameters(new { });
if (!queryParam["ExamDate"].IsEmpty())
{
dp.Add("ExamDate",queryParam["ExamDate"].ToString(), DbType.String);
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);
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanLessonEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -94,7 +95,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
return this.BaseRepository("CollegeMIS").FindTable(" select distinct LessonName,LessonNo from Exam_ExamPlanLesson");
return this.BaseRepository("CollegeMIS").FindTable(" select distinct EPLId,LessonName,LessonNo from Exam_ExamPlanLesson");
}
catch (Exception ex)
{
@@ -121,7 +122,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
this.BaseRepository("CollegeMIS").Delete<Exam_ExamPlanLessonEntity>(t=>t.EPLId == keyValue);
this.BaseRepository("CollegeMIS").Delete<Exam_ExamPlanLessonEntity>(t => t.EPLId == keyValue);
}
catch (Exception ex)
{
@@ -136,23 +137,71 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 审核
/// </summary>
/// <param name="keyValue"></param>
public void Check(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)
{
var db = this.BaseRepository("CollegeMIS");
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}'
string sql = $@"insert into Exam_ExamPlanLesson(EPLId,EPId,ELId,LessonName,LessonNo)
select NEWID(),'{EPId}',ELId,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);

db.BeginTrans();
//排考记录主表
var exam_ExamPlan = db.FindEntity<Exam_ExamPlanEntity>(x => x.EPId == EPId);
//排考课程表
var list = db.FindList<Exam_ExamPlanLessonEntity>(x => x.EPId == EPId);
//班级
var classInfo = db.FindList<ClassInfoEntity>();
foreach (var lesson in list)
{
//考试课程信息
var examLesson = db.FindEntity<Exam_ExamLessonEntity>(x => x.ELId == lesson.ELId);
//班级
var classList = classInfo.Where(x =>
x.DeptNo == examLesson.DeptNo && x.MajorNo == examLesson.MajorNo &&
x.Grade == examLesson.Grade);
//应排班级数
lesson.ClassNum = classList.Count();
//应考人数
lesson.StuCount = classList.Sum(x => x.StuNum);
db.Update(lesson);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;


+ 127
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomBLL.cs Переглянути файл

@@ -0,0 +1,127 @@
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_ExamPlanRoomBLL : Exam_ExamPlanRoomIBLL
{
private Exam_ExamPlanRoomService exam_ExamPlanRoomService = new Exam_ExamPlanRoomService();

#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">分页参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanRoomEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
return exam_ExamPlanRoomService.GetPageList(pagination, queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
public Exam_ExamPlanRoomEntity GetEntity(string keyValue)
{
try
{
return exam_ExamPlanRoomService.GetEntity(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_ExamPlanRoomService.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_ExamPlanRoomEntity entity)
{
try
{
exam_ExamPlanRoomService.SaveEntity(keyValue, entity);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}
}

+ 80
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomEntity.cs Переглянути файл

@@ -0,0 +1,80 @@
using Learun.Util;
using System;
using System.ComponentModel.DataAnnotations.Schema;
namespace Learun.Application.TwoDevelopment.EducationalAdministration

{
/// <summary>
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
/// 创 建:超级管理员
/// 日 期:2022-04-15 18:12
/// 描 述:排考安排考场表
/// </summary>
public class Exam_ExamPlanRoomEntity
{
#region 实体成员
/// <summary>
/// EPRId
/// </summary>
/// <returns></returns>
[Column("EPRID")]
public string EPRId { get; set; }
/// <summary>
/// EPLId
/// </summary>
/// <returns></returns>
[Column("EPLID")]
public string EPLId { get; set; }
/// <summary>
/// ClassroomName
/// </summary>
/// <returns></returns>
[Column("CLASSROOMNAME")]
public string ClassroomName { get; set; }
/// <summary>
/// 课程类型编号
/// </summary>
/// <returns></returns>
[Column("CLASSROOMNO")]
public string ClassroomNo { get; set; }
/// <summary>
/// SeatCount
/// </summary>
/// <returns></returns>
[Column("SEATCOUNT")]
public int? SeatCount { get; set; }
/// <summary>
/// EmpNo
/// </summary>
/// <returns></returns>
[Column("EMPNO")]
public string EmpNo { get; set; }
/// <summary>
/// EmpName
/// </summary>
/// <returns></returns>
[Column("EMPNAME")]
public string EmpName { get; set; }
#endregion

#region 扩展操作
/// <summary>
/// 新增调用
/// </summary>
public void Create()
{
this.EPRId = Guid.NewGuid().ToString();
}
/// <summary>
/// 编辑调用
/// </summary>
/// <param name="keyValue"></param>
public void Modify(string keyValue)
{
this.EPRId = keyValue;
}
#endregion
}
}


+ 49
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomIBLL.cs Переглянути файл

@@ -0,0 +1,49 @@
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_ExamPlanRoomIBLL
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Exam_ExamPlanRoomEntity> GetPageList(Pagination pagination, string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
Exam_ExamPlanRoomEntity GetEntity(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_ExamPlanRoomEntity entity);
#endregion

}
}

+ 151
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs Переглянути файл

@@ -0,0 +1,151 @@
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_ExamPlanRoomService : RepositoryFactory
{
#region 获取数据

/// <summary>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanRoomEntity> GetPageList(Pagination pagination, string queryJson)
{
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
t.*
");
strSql.Append(" FROM Exam_ExamPlanRoom t ");
strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
if (!queryParam["EPLId"].IsEmpty())
{
dp.Add("EPLId", queryParam["EPLId"].ToString(), DbType.String);
strSql.Append(" AND t.EPLId = @EPLId ");
}
return this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanRoomEntity>(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_ExamPlanRoomEntity GetEntity(string keyValue)
{
try
{
return this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanRoomEntity>(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_ExamPlanRoomEntity>(t=>t.EPRId == 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_ExamPlanRoomEntity 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

}
}

+ 8
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj Переглянути файл

@@ -156,6 +156,12 @@
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeEntity.cs" />
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeIBLL.cs" />
<Compile Include="EducationalAdministration\EADateArrange\EADateArrangeService.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanClass\Exam_ExamPlanClassBLL.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanClass\Exam_ExamPlanClassIBLL.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanClass\Exam_ExamPlanClassService.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanRoom\Exam_ExamPlanRoomBLL.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanRoom\Exam_ExamPlanRoomIBLL.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanRoom\Exam_ExamPlanRoomService.cs" />
<Compile Include="EducationalAdministration\Exam_ExamRoom\Exam_ExamRoomBLL.cs" />
<Compile Include="EducationalAdministration\Exam_ExamRoom\Exam_ExamRoomEntity.cs" />
<Compile Include="EducationalAdministration\Exam_ExamRoom\Exam_ExamRoomIBLL.cs" />
@@ -1787,6 +1793,8 @@
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonService.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonBLL.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanLesson\Exam_ExamPlanLessonIBLL.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanClass\Exam_ExamPlanClassEntity.cs" />
<Compile Include="EducationalAdministration\Exam_ExamPlanRoom\Exam_ExamPlanRoomEntity.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj">


Завантаження…
Відмінити
Зберегти