@@ -0,0 +1,124 @@ | |||
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-10-26 11:05 | |||
/// 描 述:学生选课次数维护 | |||
/// </summary> | |||
public class OLPElectiveStuSelectCountController : MvcControllerBase | |||
{ | |||
private OLPElectiveStuSelectCountIBLL oLPElectiveStuSelectCountIBLL = new OLPElectiveStuSelectCountBLL(); | |||
#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 = oLPElectiveStuSelectCountIBLL.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 OLPElectiveStuSelectCountData = oLPElectiveStuSelectCountIBLL.GetOLPElectiveStuSelectCountEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
OLPElectiveStuSelectCount = OLPElectiveStuSelectCountData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
oLPElectiveStuSelectCountIBLL.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) | |||
{ | |||
OLPElectiveStuSelectCountEntity entity = strEntity.ToObject<OLPElectiveStuSelectCountEntity>(); | |||
var model = oLPElectiveStuSelectCountIBLL.GetOLPElectiveStuSelectCountEntity(entity.AcademicYearNo, entity.Semester, entity.DeptNo); | |||
if (model != null) | |||
{ | |||
if (string.IsNullOrEmpty(keyValue)||(!string.IsNullOrEmpty(keyValue) && keyValue != model.Id)) | |||
{ | |||
return Fail("当前系部已存在,不可重复添加!"); | |||
} | |||
} | |||
oLPElectiveStuSelectCountIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -276,6 +276,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 设置是否可选 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SetUpIsAllowSelect(string keyValue, int IsAllowSelect) | |||
{ | |||
openLessonPlanOfElectiveIBLL.SetUpIsAllowSelect(keyValue, IsAllowSelect); | |||
return Success("保存成功!"); | |||
} | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteElective(string keyValue) | |||
@@ -0,0 +1,23 @@ | |||
@{ | |||
ViewBag.Title = "学生选课次数维护"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="OLPElectiveStuSelectCount" > | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<div id="AcademicYearNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="OLPElectiveStuSelectCount" > | |||
<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="OLPElectiveStuSelectCount" > | |||
<div class="lr-form-item-title">系部<font face="宋体">*</font></div> | |||
<div id="DeptNo" isvalid="yes" checkexpession="NotNull" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="OLPElectiveStuSelectCount" > | |||
<div class="lr-form-item-title">选课次数上限<font face="宋体">*</font></div> | |||
<input id="SelectMaxCount" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/OLPElectiveStuSelectCount/Form.js") |
@@ -0,0 +1,66 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-10-26 11:05 | |||
* 描 述:学生选课次数维护 | |||
*/ | |||
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' | |||
}); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OLPElectiveStuSelectCount/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/OLPElectiveStuSelectCount/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -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-12 lr-form-item"> | |||
<div class="lr-form-item-title">学年</div> | |||
<div id="AcademicYearNo"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></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> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/OLPElectiveStuSelectCount/Index.js") |
@@ -0,0 +1,120 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2022-10-26 11:05 | |||
* 描 述:学生选课次数维护 | |||
*/ | |||
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' | |||
}); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo',value: 'deptno',text: 'deptname' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/EducationalAdministration/OLPElectiveStuSelectCount/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/EducationalAdministration/OLPElectiveStuSelectCount/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/OLPElectiveStuSelectCount/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/OLPElectiveStuSelectCount/GetPageList', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left"}, | |||
{ label: "学期", name: "Semester", width: 100, align: "left"}, | |||
{ label: "系部", name: "DeptNo", width: 100, 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: "SelectMaxCount", width: 100, align: "left"}, | |||
], | |||
mainId:'Id', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
$('#gridtable').jfGridSet('reload'); | |||
}; | |||
page.init(); | |||
} |
@@ -42,6 +42,8 @@ | |||
@*<a id="lr_initStuSelectLesson" class="btn btn-default"><i class="fa fa-plus"></i> 初始化学生选课记录</a>*@ | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-group"></i> 设置人数</a> | |||
<a id="lr_modify" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 异动</a> | |||
<a id="lr_AllowSelect" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 设置可选</a> | |||
<a id="lr_CancelSelect" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 取消可选</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看已审学生</a> | |||
@@ -50,6 +52,7 @@ | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_viewPre" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 查看已审学生(预)</a> | |||
<a id="lr_auditPre" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 审核学生(预)</a> | |||
<a id="lr_StuSelectCount" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 学生选课次数维护</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -161,6 +161,21 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
//学生选课次数维护 | |||
$('#lr_StuSelectCount').on('click', function () { | |||
learun.layerForm({ | |||
id: 'StuSelectCountIndex', | |||
title: '学生选课次数', | |||
url: top.$.rootUrl + '/EducationalAdministration/OLPElectiveStuSelectCount/Index', | |||
width: 1000, | |||
height: 700, | |||
btn: null, | |||
end: function () { | |||
//refreshGirdData(); | |||
} | |||
}); | |||
}); | |||
//审核学生 | |||
$('#lr_audit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
@@ -262,7 +277,6 @@ var bootstrap = function ($, learun) { | |||
throw learun.alert.warning("已选专业的数据不允许删除!"); | |||
} | |||
}); | |||
console.log(keyValue); | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/DeleteElective', { keyValue: keyValue }, | |||
function () { | |||
refreshGirdData(); | |||
@@ -271,6 +285,26 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}); | |||
//设置可选 | |||
$('#lr_AllowSelect').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/SetUpIsAllowSelect', { keyValue: keyValue, IsAllowSelect: 1 }, | |||
function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
//取消可选 | |||
$('#lr_CancelSelect').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/SetUpIsAllowSelect', { keyValue: keyValue, IsAllowSelect: 0 }, | |||
function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
}, | |||
bindSemesterAndYear: function () { | |||
$.ajax({ | |||
@@ -303,7 +337,7 @@ var bootstrap = function ($, learun) { | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetPageListOfMerge', | |||
headData: [ | |||
{ label: "学年", name: "AcademicYearNo", width: 45, align: "left" }, | |||
@@ -369,6 +403,13 @@ var bootstrap = function ($, learun) { | |||
{ label: "通过人数", name: "StuNum", width: 60, align: "left" }, | |||
{ label: "已报人数(预)", name: "StuNumOfApplyPre", width: 80, align: "left" }, | |||
{ label: "通过人数(预)", name: "StuNumPre", width: 80, align: "left" }, | |||
{ | |||
label: "是否可选", name: "IsAllowSelect", width: 80, align: "left", | |||
formatter: function (cellvalue, rowObject) { | |||
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>"; | |||
} | |||
}, | |||
{ | |||
label: "是否已选专业", name: "IsElectiveMajor", width: 100, align: "left", formatter: function (cellvalue, row) { | |||
if (!!row.ElectiveMajorList && row.ElectiveMajorList.length > 0) { | |||
@@ -846,6 +846,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\Acc_DormitoryChangeController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\VaccinationInfoController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\EmailManagementController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\OLPElectiveStuSelectCountController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -6625,6 +6626,10 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\EmailManagement\Index.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\EmailManagement\Form.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\EmailManagement\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OLPElectiveStuSelectCount\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OLPElectiveStuSelectCount\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OLPElectiveStuSelectCount\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\OLPElectiveStuSelectCount\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\EducationalAdministration\Views\HomeStatistics\" /> | |||
@@ -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-10-26 11:05 | |||
/// 描 述:学生选课次数维护 | |||
/// </summary> | |||
public class OLPElectiveStuSelectCountMap : EntityTypeConfiguration<OLPElectiveStuSelectCountEntity> | |||
{ | |||
public OLPElectiveStuSelectCountMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("OLPELECTIVESTUSELECTCOUNT"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -600,6 +600,7 @@ | |||
<Compile Include="LR_Desktop\EnrollTemplateMap.cs" /> | |||
<Compile Include="LR_Desktop\EnrollDataMap.cs" /> | |||
<Compile Include="PersonnelManagement\EmailManagementMap.cs" /> | |||
<Compile Include="EducationalAdministration\OLPElectiveStuSelectCountMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,143 @@ | |||
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-10-26 11:05 | |||
/// 描 述:学生选课次数维护 | |||
/// </summary> | |||
public class OLPElectiveStuSelectCountBLL : OLPElectiveStuSelectCountIBLL | |||
{ | |||
private OLPElectiveStuSelectCountService oLPElectiveStuSelectCountService = new OLPElectiveStuSelectCountService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<OLPElectiveStuSelectCountEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return oLPElectiveStuSelectCountService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取OLPElectiveStuSelectCount表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return oLPElectiveStuSelectCountService.GetOLPElectiveStuSelectCountEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string AcademicYearNo, string Semester, string DeptNo) | |||
{ | |||
try | |||
{ | |||
return oLPElectiveStuSelectCountService.GetOLPElectiveStuSelectCountEntity(AcademicYearNo, Semester, DeptNo); | |||
} | |||
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 | |||
{ | |||
oLPElectiveStuSelectCountService.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, OLPElectiveStuSelectCountEntity entity) | |||
{ | |||
try | |||
{ | |||
oLPElectiveStuSelectCountService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,65 @@ | |||
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-10-26 11:05 | |||
/// 描 述:学生选课次数维护 | |||
/// </summary> | |||
public class OLPElectiveStuSelectCountEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 学年度 | |||
/// </summary> | |||
[Column("ACADEMICYEARNO")] | |||
public string AcademicYearNo { get; set; } | |||
/// <summary> | |||
/// 学期 | |||
/// </summary> | |||
[Column("SEMESTER")] | |||
public string Semester { get; set; } | |||
/// <summary> | |||
/// DeptNo | |||
/// </summary> | |||
[Column("DEPTNO")] | |||
public string DeptNo { get; set; } | |||
/// <summary> | |||
/// 选课次数上限 | |||
/// </summary> | |||
[Column("SELECTMAXCOUNT")] | |||
public int? SelectMaxCount { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.Id = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.Id = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,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-10-26 11:05 | |||
/// 描 述:学生选课次数维护 | |||
/// </summary> | |||
public interface OLPElectiveStuSelectCountIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<OLPElectiveStuSelectCountEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取OLPElectiveStuSelectCount表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string keyValue); | |||
OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string AcademicYearNo,string Semester,string DeptNo); | |||
#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, OLPElectiveStuSelectCountEntity entity); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,183 @@ | |||
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-10-26 11:05 | |||
/// 描 述:学生选课次数维护 | |||
/// </summary> | |||
public class OLPElectiveStuSelectCountService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">查询参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<OLPElectiveStuSelectCountEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.AcademicYearNo, | |||
t.Semester, | |||
t.DeptNo, | |||
t.SelectMaxCount | |||
"); | |||
strSql.Append(" FROM OLPElectiveStuSelectCount 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["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<OLPElectiveStuSelectCountEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取OLPElectiveStuSelectCount表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<OLPElectiveStuSelectCountEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public OLPElectiveStuSelectCountEntity GetOLPElectiveStuSelectCountEntity(string AcademicYearNo, | |||
string Semester, string DeptNo) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<OLPElectiveStuSelectCountEntity>(x => x.AcademicYearNo == AcademicYearNo && x.Semester == Semester && x.DeptNo == DeptNo); | |||
} | |||
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<OLPElectiveStuSelectCountEntity>(t => t.Id == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, OLPElectiveStuSelectCountEntity 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 | |||
} | |||
} |
@@ -186,7 +186,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public void SetUpIsAllowSelect(string keyValue, int IsAllowSelect) | |||
{ | |||
try | |||
{ | |||
openLessonPlanOfElectiveService.SetUpIsAllowSelect(keyValue, IsAllowSelect); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void DeleteElective(string keyValue) | |||
{ | |||
try | |||
@@ -183,6 +183,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
[Column("OTHERSCORESCALE")] | |||
public decimal? OtherScoreScale { get; set; } | |||
/// <summary> | |||
/// 是否可选 | |||
/// </summary> | |||
[Column("ISALLOWSELECT")] | |||
public int? IsAllowSelect { get; set; } | |||
public bool? IsAllowEdit { get; set; } | |||
@@ -63,6 +63,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <summary> | |||
/// <returns></returns> | |||
void DeleteEntity(string keyValue); | |||
void SetUpIsAllowSelect(string keyValue, int IsAllowSelect); | |||
void DeleteElective(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
@@ -401,6 +401,31 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public void SetUpIsAllowSelect(string keyValue, int IsAllowSelect) | |||
{ | |||
try | |||
{ | |||
if (keyValue.Contains(",")) | |||
{ | |||
keyValue = string.Join("','", keyValue.Split(',')); | |||
} | |||
string sql = $"update OpenLessonPlanOfElective set IsAllowSelect='{IsAllowSelect}' where Id in ('{keyValue}')"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 删除选修课课程 | |||
/// </summary> | |||
@@ -430,7 +455,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var lessonTimeArr = entity.LessonTime.Split(','); | |||
//选修课课程异动 | |||
db.ExecuteBySql($"delete from OpenLessonPlanOfElectiveChange where OLPEId='{entity.Id}'"); | |||
for (int i = 0; i < lessonSectionArr.Length; i++) | |||
{ | |||
//合班历史记录 | |||
@@ -728,26 +753,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.Id, | |||
t.AcademicYearNo, | |||
t.Semester, | |||
t.LessonNo, | |||
t.LessonNo as LessonNo2, | |||
t.LessonName, | |||
t.LessonSortNo, | |||
t.LessonSection, | |||
t.LessonTime, | |||
t.StudyScore, | |||
t.EmpNo, | |||
t.EmpNo as EmpNo2, | |||
t.EmpName, | |||
t.ClassRoomNo, | |||
t.ClassRoomName, | |||
t.StuNumMax, | |||
t.StuNum, | |||
t.ModifyTime, | |||
t.ModifyUserId, | |||
t.ModifyUserName | |||
t.* | |||
"); | |||
strSql.Append(" FROM OpenLessonPlanOfElective t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
@@ -1827,6 +1827,10 @@ | |||
<Compile Include="PersonnelManagement\EmailManagement\EmailManagementService.cs" /> | |||
<Compile Include="PersonnelManagement\EmailManagement\EmailManagementBLL.cs" /> | |||
<Compile Include="PersonnelManagement\EmailManagement\EmailManagementIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\OLPElectiveStuSelectCount\OLPElectiveStuSelectCountEntity.cs" /> | |||
<Compile Include="EducationalAdministration\OLPElectiveStuSelectCount\OLPElectiveStuSelectCountService.cs" /> | |||
<Compile Include="EducationalAdministration\OLPElectiveStuSelectCount\OLPElectiveStuSelectCountBLL.cs" /> | |||
<Compile Include="EducationalAdministration\OLPElectiveStuSelectCount\OLPElectiveStuSelectCountIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||