Parcourir la source

班级、考场新增删除

西昌缴费二期
zhangli il y a 2 ans
Parent
révision
9d0f60c788
15 fichiers modifiés avec 636 ajouts et 77 suppressions
  1. +48
    -22
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs
  2. +34
    -13
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js
  3. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.cshtml
  4. +104
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js
  5. +0
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml
  6. +55
    -30
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js
  7. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  8. +17
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs
  9. +44
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassBLL.cs
  10. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassIBLL.cs
  11. +116
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs
  12. +37
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomBLL.cs
  13. +3
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomIBLL.cs
  14. +109
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs
  15. +20
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomService.cs

+ 48
- 22
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ExamPlanLessonController.cs Voir le fichier

@@ -48,6 +48,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return View();
}

[HttpGet]
public ActionResult FormRoom()
{
return View();
}
#endregion

#region 获取数据
@@ -60,18 +65,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListForClass(string pagination, string queryJson)
public ActionResult GetListForClass(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);
var data = exam_ExamPlanClassIBLL.GetList(queryJson);

return Success(data);
}
/// <summary>
/// 获取页面显示列表数据
@@ -81,18 +79,11 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
/// <returns></returns>
[HttpGet]
[AjaxOnly]
public ActionResult GetPageListForRoom(string pagination, string queryJson)
public ActionResult GetListForRoom(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);
var data = exam_ExamPlanRoomIBLL.GetList(queryJson);

return Success(data);
}
/// <summary>
/// 获取页面显示列表数据
@@ -178,6 +169,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
exam_ExamPlanLessonIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
[HttpPost]
[AjaxOnly]
public ActionResult DeleteClass(string keyValue)
{
exam_ExamPlanClassIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}

[HttpPost]
[AjaxOnly]
public ActionResult DeleteRoom(string keyValue)
{
exam_ExamPlanRoomIBLL.DeleteEntity(keyValue);
return Success("删除成功!");
}
/// <summary>
/// 审核
/// </summary>
@@ -221,6 +227,26 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
exam_ExamPlanLessonIBLL.SaveEntity(keyValue, entity);
return Success("保存成功!");
}

[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveClass(string EPLId, List<Exam_ExamPlanClassEntity> list)
{
exam_ExamPlanClassIBLL.SaveList(list);
return Success("保存成功!");
}


[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveRoom(List<Exam_ExamPlanRoomEntity> list)
{
exam_ExamPlanRoomIBLL.SaveList(list);
return Success("保存成功!");
}

#endregion

}


+ 34
- 13
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormClass.js Voir le fichier

@@ -1,5 +1,9 @@

var refreshGirdData;
var acceptClick;
//考试安排课程表Id
var EPLId = request('EPLId');
var EPId = request('EPId');
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -17,7 +21,7 @@ var bootstrap = function ($, learun) {
$('#lr_refresh').on('click', function () {
location.reload();
});
},
// 初始化列表
initGird: function () {
@@ -94,18 +98,6 @@ var bootstrap = function ($, learun) {
});
}
},
{
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,
@@ -117,6 +109,8 @@ var bootstrap = function ($, learun) {
},
search: function (param) {
param = param || {};
//考试安排课程表Id
param.EPLId = EPLId;
param.SqlParameter = " and CheckMark=1";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
@@ -124,5 +118,32 @@ var bootstrap = function ($, learun) {
refreshGirdData = function () {
page.search();
};
// 保存数据
acceptClick = function (callBack) {
var selectedRow = $('#gridtable').jfGridGet('rowdata');
var list = [];
$.each(selectedRow,
function (i, item) {
var entity = {
ClassName: item.ClassName,
ClassNo: item.ClassNo,
ClassStuNum: item.StuNum,
EPCId: learun.newGuid(),
EPLId: EPLId
}
list.push(entity);

});
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveClass?EPLId=' + EPLId,
{ list: list }), function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
};
if (!!callBack) {
callBack();
}
};
page.init();
}

+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.cshtml Voir le fichier

@@ -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>
<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-6 lr-form-item">
<div class="lr-form-item-title">考场编号</div>
<input id="ClassroomNo" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item">
<div class="lr-form-item-title">考场名称</div>
<input id="ClassroomName" type="text" class="form-control" />
</div>
</div>
</div>
</div>
</div>
<div class="lr-layout-tool-right">
<div class=" btn-group btn-group-sm">
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a>
</div>
</div>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js")

+ 104
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/FormRoom.js Voir le fichier

@@ -0,0 +1,104 @@

var refreshGirdData;
var acceptClick;
//考试安排课程表Id
var EPLId = request('EPLId');
var EPId = request('EPId');
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
$('#AcademicYearNo').lrselect({
placeholder: "学年",
allowSearch: true,
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo',
value: 'value',
text: 'text'
});
//学期
$('#Semester').lrselect({
placeholder: "学期",
url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester',
value: 'value',
text: 'text'
});
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});

},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamRoom/GetPageList',
headData: [
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" },
{ label: "学期", name: "Semester", width: 100, align: "left" },
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left" },
{ label: "考场名称", name: "ClassroomName", width: 200, align: "left" },
{ label: "座位行数", name: "SeatRows", width: 100, align: "left" },
{ label: "座位列数", name: "SeatColumns", width: 100, align: "left" },
{ label: "考场座位数", name: "SeatCount", width: 100, align: "left" },
//{
// label: "是否启用", name: "EREnabled", width: 100, align: "left",
// formatter: function (cellvalue) {
// return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
// }
//},
],
mainId: 'ClassId',
isPage: true,
isMultiselect: true,
});
page.search();
},
search: function (param) {
param = param || {};
//考试安排课程表Id
param.EPLId = EPLId;
param.SqlParameter = " and t.EREnabled=1";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
page.search();
};
// 保存数据
acceptClick = function (callBack) {
var selectedRow = $('#gridtable').jfGridGet('rowdata');
var list = [];
$.each(selectedRow,
function (i, item) {
var entity = {
ClassroomName: item.ClassroomName,
ClassroomNo: item.ClassroomNo,
SeatCount: item.SeatCount,
EPRId: learun.newGuid(),
EPLId: EPLId
}
list.push(entity);

});
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/SaveRoom?EPLId=' + EPLId,
{ list: list }), function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
};
if (!!callBack) {
callBack();
}
};
page.init();
}

+ 0
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.cshtml Voir le fichier

@@ -60,7 +60,6 @@
<div class="tbTitle"><span>班级信息</span></div>
<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>
</div>
</div>
@@ -70,7 +69,6 @@
<div class="tbTitle"><span>考场信息</span></div>
<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>
</div>
<div class="lr-layout-body" id="gridtable_Room"></div>


+ 55
- 30
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ExamPlanLesson/Index.js Voir le fichier

@@ -7,6 +7,7 @@
var refreshGirdData;
//排考记录Id
var EPId = request('EPId');
//安排课程表Id
var EPLId;
var bootstrap = function ($, learun) {
"use strict";
@@ -49,38 +50,26 @@ var bootstrap = function ($, learun) {
});
//班级 新增
$('#lr_add_Class').on('click', function () {
learun.layerForm({
id: 'formclass',
title: '新增',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormClass',
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
// 班级编辑
$('#lr_edit_Class').on('click', function () {
var keyValue = $('#gridtable_Class').jfGridValue('EPCId');
if (learun.checkrow(keyValue)) {
if (!!EPLId) {
learun.layerForm({
id: 'formclass',
title: '编辑',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormClass?keyValue=' + keyValue,
width: 600,
height: 400,
title: '新增班级',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormClass?EPLId=' + EPLId + '&EPId=' + EPId,
width: 850,
height: 500,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
} else {
return learun.alert.warning("请选择考试课程!");
}
});
// 班级删除
$('#lr_delete_Class').on('click', function () {
var keyValue = $('#gridtable_Class').jfGridValue('EPCId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
learun.layerConfirm('是否确认删除选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteClass', { keyValue: keyValue }, function () {
refreshGirdData();
@@ -89,6 +78,38 @@ var bootstrap = function ($, learun) {
});
}
});
//考场 新增
$('#lr_add_Room').on('click', function () {
if (!!EPLId) {
learun.layerForm({
id: 'formroom',
title: '新增考场',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/FormRoom?EPLId=' + EPLId + '&EPId=' + EPId,
width: 850,
height: 500,
callBack: function (id) {
console.log('新增考场back');
return top[id].acceptClick(refreshGirdData);
}
});
} else {
return learun.alert.warning("请选择考试课程!");
}
});
// 考场删除
$('#lr_delete_Room').on('click', function () {
var keyValue = $('#gridtable_Room').jfGridValue('EPRId');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除选中记录!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/DeleteRoom', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
@@ -98,19 +119,19 @@ var bootstrap = function ($, learun) {
initGird: function () {
//班级
$('#gridtable_Class').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetPageListForClass',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForClass',
headData: [
{ label: "班级名称", name: "ClassName", width: 100, align: "left" },
{ label: "班级编号", name: "ClassNo", width: 100, align: "left" },
{ label: "班级人数", name: "ClassStuNum", width: 100, align: "left" },
],
mainId: 'EPCId',
isPage: true,
//isPage: true,
isMultiselect: true,
});
//考场
$('#gridtable_Room').jfGrid({
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetPageListForRoom',
url: top.$.rootUrl + '/EducationalAdministration/Exam_ExamPlanLesson/GetListForRoom',
headData: [
{ label: "考场名称", name: "ClassroomName", width: 100, align: "left" },
{ label: "考场编号", name: "ClassroomNo", width: 100, align: "left" },
@@ -119,15 +140,17 @@ var bootstrap = function ($, learun) {
{ label: "监考老师姓名", name: "EmpName", width: 100, align: "left" },
],
mainId: 'EPRId',
isPage: true,
//isPage: true,
isMultiselect: true,
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable_Class').jfGridSet('reload', { queryJson: JSON.stringify(param) });
$('#gridtable_Room').jfGridSet('reload', { queryJson: JSON.stringify(param) });
if (!!EPLId) {
param = param || {};
$('#gridtable_Class').jfGridSet('reload', { queryJson: JSON.stringify(param) });
$('#gridtable_Room').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
},
//显示考试时间
show: function () {
@@ -141,9 +164,11 @@ var bootstrap = function ($, learun) {
}
};
refreshGirdData = function () {
$('#gridtable_Class').jfGridSet('reload');
$('#gridtable_Room').jfGridSet('reload');
page.show();
if (!!EPLId) {
$('#gridtable_Class').jfGridSet('reload');
$('#gridtable_Room').jfGridSet('reload');
page.show();
}
};
page.init();
}

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Voir le fichier

@@ -996,8 +996,8 @@
<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\FormRoom.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormClass.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormImport.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\ClearForm.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\GenerateForm.js" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamRoom\Form.js" />
@@ -7642,7 +7642,6 @@
<Content Include="Areas\EducationalAdministration\Views\StuScoreNotPassTwo\IndexUnpassTwo.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuScore\AllStuScoreQueryIndex.cshtml" />
<Content Include="Areas\PersonnelManagement\Views\TimeTable\ClassIndexInEducation.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamLesson\FormImport.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\FormImport.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamStudent\Index.cshtml" />
@@ -7655,6 +7654,7 @@
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormClass.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\ClearForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlan\GenerateForm.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\Exam_ExamPlanLesson\FormRoom.cshtml" />
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />


+ 17
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ClassInfo/ClassInfoService.cs Voir le fichier

@@ -70,6 +70,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String);
strSql.Append(" AND t.MajorNo = @MajorNo ");
}
if (!queryParam["SqlParameter"].IsEmpty())
{
strSql.Append(queryParam["SqlParameter"].ToString());
}

if (!queryParam["EPLId"].IsEmpty())
{
var elSql =
$"select * from Exam_ExamLesson where ELId=(select ELId from Exam_ExamPlanLesson where EPLId='{queryParam["EPLId"].ToString()}')";
var entity = this.BaseRepository("CollegeMIS").FindList<Exam_ExamLessonEntity>(elSql).FirstOrDefault();
if (entity != null)
{
strSql.Append($" and deptno='{entity.DeptNo}' and majorno='{entity.MajorNo}' and grade='{entity.Grade}'");
strSql.Append($" and classno not in (select ClassNo from Exam_ExamPlanClass where EPLId='{queryParam["EPLId"].ToString()}')");

}
}
return this.BaseRepository("CollegeMIS").FindList<ClassInfoEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)


+ 44
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassBLL.cs Voir le fichier

@@ -43,6 +43,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

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

/// <summary>
/// 获取实体数据
/// </summary>
@@ -119,6 +144,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public void SaveList(List<Exam_ExamPlanClassEntity> list)
{
try
{
exam_ExamPlanClassService.SaveList(list);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

#endregion

}


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassIBLL.cs Voir le fichier

@@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Exam_ExamPlanClassEntity> GetPageList(Pagination pagination, string queryJson);
IEnumerable<Exam_ExamPlanClassEntity> GetList(string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
@@ -43,6 +44,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, Exam_ExamPlanClassEntity entity);

void SaveList(List<Exam_ExamPlanClassEntity> list);
#endregion

}


+ 116
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanClass/Exam_ExamPlanClassService.cs Voir le fichier

@@ -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,7 +45,47 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
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);
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="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanClassEntity> GetList(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);
}
catch (Exception ex)
{
@@ -95,7 +136,22 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
this.BaseRepository("CollegeMIS").Delete<Exam_ExamPlanClassEntity>(t=>t.EPCId == keyValue);
var entity = new Exam_ExamPlanClassEntity();
if (keyValue.Contains(","))
{
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanClassEntity>((keyValue.Split(','))[0]);
keyValue = string.Join("','", keyValue.Split(','));
}
else
{
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanClassEntity>(keyValue);
}

string sql = $"delete from Exam_ExamPlanClass where EPCId in ('{keyValue}')";

this.BaseRepository("CollegeMIS").ExecuteBySql(sql);

UpdateExamPlanLesson(entity.EPLId);
}
catch (Exception ex)
{
@@ -109,7 +165,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
/// <summary>
/// 保存实体数据(新增、修改)
/// </summary>
@@ -143,6 +199,63 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

/// <summary>
/// 排考安排班级
/// </summary>
/// <param name="list"></param>
public void SaveList(List<Exam_ExamPlanClassEntity> list)
{
try
{
this.BaseRepository("CollegeMIS").Insert(list);
//更新排考安排课程表实排班级数、实排人数
//排考安排课程表Id
var EPLId = list.Select(x => x.EPLId).FirstOrDefault();
UpdateExamPlanLesson(EPLId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
/// 更新排考安排课程
/// </summary>
/// <param name="EPLId">排考安排课程表Id</param>
private void UpdateExamPlanLesson(string EPLId)
{
try
{
//更新排考安排课程表实排班级数、实排人数
string sql = $@"update l
set l.RealStuCount=t.RealStuCount,l.RealClassNum=t.RealClassNum
from Exam_ExamPlanLesson l
join (select '{EPLId}' as EPLId,count(1) as RealClassNum,sum(ClassStuNum) as RealStuCount from Exam_ExamPlanClass where EPLId='{EPLId}'
)t on l.EPLId=t.EPLId
where l.EPLId='{EPLId}'
";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}


+ 37
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomBLL.cs Voir le fichier

@@ -43,6 +43,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public IEnumerable<Exam_ExamPlanRoomEntity> GetList(string queryJson)
{
try
{
return exam_ExamPlanRoomService.GetList(queryJson);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

/// <summary>
/// 获取实体数据
/// </summary>
@@ -121,6 +140,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public void SaveList(List<Exam_ExamPlanRoomEntity> list)
{
try
{
exam_ExamPlanRoomService.SaveList(list);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 3
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomIBLL.cs Voir le fichier

@@ -21,6 +21,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
IEnumerable<Exam_ExamPlanRoomEntity> GetPageList(Pagination pagination, string queryJson);

IEnumerable<Exam_ExamPlanRoomEntity> GetList(string queryJson);
/// <summary>
/// 获取实体数据
/// </summary>
@@ -43,6 +45,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, Exam_ExamPlanRoomEntity entity);
void SaveList (List<Exam_ExamPlanRoomEntity> list);
#endregion

}


+ 109
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanRoom/Exam_ExamPlanRoomService.cs Voir le fichier

@@ -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,7 +45,47 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
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);
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>
/// 获取页面显示列表数据
/// </summary>
/// <param name="pagination">查询参数</param>
/// <param name="queryJson">查询参数</param>
/// <returns></returns>
public IEnumerable<Exam_ExamPlanRoomEntity> GetList(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);
}
catch (Exception ex)
{
@@ -82,7 +123,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

#endregion

@@ -96,7 +137,23 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
{
try
{
this.BaseRepository("CollegeMIS").Delete<Exam_ExamPlanRoomEntity>(t=>t.EPRId == keyValue);
var entity = new Exam_ExamPlanRoomEntity();
if (keyValue.Contains(","))
{
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanRoomEntity>((keyValue.Split(','))[0]);
keyValue = string.Join("','", keyValue.Split(','));
}
else
{
entity = this.BaseRepository("CollegeMIS").FindEntity<Exam_ExamPlanRoomEntity>(keyValue);
}

string sql = $"delete from Exam_ExamPlanRoom where EPRId in ('{keyValue}')";

this.BaseRepository("CollegeMIS").ExecuteBySql(sql);

UpdateExamPlanLesson(entity.EPLId);
}
catch (Exception ex)
{
@@ -110,7 +167,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}

/// <summary>
/// 保存实体数据(新增、修改)
@@ -145,6 +202,54 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}

public void SaveList(List<Exam_ExamPlanRoomEntity> list)
{
try
{
this.BaseRepository("CollegeMIS").Insert(list);
//更新排考安排课程表考场座位数
//排考安排课程表Id
var EPLId = list.Select(x => x.EPLId).FirstOrDefault();
UpdateExamPlanLesson(EPLId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

private void UpdateExamPlanLesson(string EPLId)
{
try
{
//更新排考安排课程表考场座位数
string sql = $@"update l
set l.SeatCount=t.SeatCount
from Exam_ExamPlanLesson l
join (select '{EPLId}' as EPLId,sum(SeatCount) as SeatCount from Exam_ExamPlanRoom where EPLId='{EPLId}'
)t on l.EPLId=t.EPLId
where l.EPLId='{EPLId}'";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

}


+ 20
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamRoom/Exam_ExamRoomService.cs Voir le fichier

@@ -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
@@ -56,6 +57,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
dp.Add("ClassroomName", "%" + queryParam["ClassroomName"].ToString() + "%", DbType.String);
strSql.Append(" AND t.ClassroomName Like @ClassroomName ");
}
if (!queryParam["EPLId"].IsEmpty())
{
//排考安排课程表Id
var ELEntity = this.BaseRepository("CollegeMIS").FindList<Exam_ExamPlanEntity>($@"select * from Exam_ExamPlan where EPId=(
select EPId from Exam_ExamPlanLesson where EPLId='{queryParam["EPLId"].ToString()}')").FirstOrDefault();
if (ELEntity != null)
{
strSql.Append($" AND t.AcademicYearNo = '{ELEntity.AcademicYearNo}' ");
strSql.Append($" AND t.Semester = '{ELEntity.Semester}' ");
}

}

if (!queryParam["SqlParameter"].IsEmpty())
{
strSql.Append(queryParam["SqlParameter"].ToString());
}

return this.BaseRepository("CollegeMIS").FindList<Exam_ExamRoomEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
@@ -222,7 +241,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
/// <param name="SeatRows">座位行数</param>
/// <param name="SeatColumns">座位列数</param>
/// <returns></returns>
public int Import(string AcademicYearNo, string Semester,int SeatRows,int SeatColumns)
public int Import(string AcademicYearNo, string Semester, int SeatRows, int SeatColumns)
{
try
{


Chargement…
Annuler
Enregistrer