@@ -114,10 +114,10 @@ var bootstrap = function ($, learun) { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetList', | |||
headData: [ | |||
{ label: "资产类别编号", name: "ATCode", width: 200, align: "left" }, | |||
{ label: "资产类别名称", name: "AName", width: 200, align: "left" }, | |||
{ label: "资产分类编号", name: "ATCode", width: 200, align: "left" }, | |||
{ label: "资产分类名称", name: "AName", width: 200, align: "left" }, | |||
{ | |||
label: "上级资产类别", name: "ATPTId", width: 200, align: "left", | |||
label: "上级资产分类", name: "ATPTId", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_AssetsType', | |||
@@ -64,13 +64,23 @@ var bootstrap = function ($, learun) { | |||
$('#ValueType').lrDataItemSelect({ code: 'ValueType' }); | |||
$('#GetWay').lrDataItemSelect({ code: 'GetWay' }); | |||
$('#UseCondition').lrDataItemSelect({ code: 'AssState' }); | |||
$('#UseDepartment').lrDepartmentSelect(); | |||
$('#UseDepartment').lrDepartmentSelect({ | |||
select: function (item) { | |||
$('#UsePeople').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetList', | |||
param: { departmentId: item.value } | |||
}); | |||
} | |||
}); | |||
$('#ManageDepartment').lrDepartmentSelect(); | |||
$('#UsePeople').lrformselect({ | |||
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', | |||
layerUrlW: 400, | |||
layerUrlH: 300, | |||
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | |||
$('#UsePeople').lrselect({ | |||
value: 'F_UserId', | |||
text: 'F_RealName', | |||
title: 'F_RealName', | |||
// 展开最大高度 | |||
maxHeight: 110, | |||
// 是否允许搜索 | |||
allowSearch: true | |||
}); | |||
$('#Unit').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#CardStatus').lrDataItemSelect({ code: 'CardStatus' }); | |||
@@ -160,7 +170,7 @@ var bootstrap = function ($, learun) { | |||
$('#NetValue').val(netValue); | |||
netValue == 0 ? $('#NetValue').attr('style', 'color:red;') : $('#NetValue').removeAttr('style'); | |||
}); | |||
//计算:价值数据=财政拨款 + 非财政拨款 | |||
let calcValue = function (a, b) { | |||
return Number(a) + Number(b); | |||
@@ -177,7 +187,7 @@ var bootstrap = function ($, learun) { | |||
let calcNetValue = function (a, b) { | |||
return (Number(a) - Number(b)) > 0 ? (Number(a) - Number(b)) : 0; | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
@@ -64,13 +64,23 @@ var bootstrap = function ($, learun) { | |||
$('#ValueType').lrDataItemSelect({ code: 'ValueType' }); | |||
$('#GetWay').lrDataItemSelect({ code: 'GetWay' }); | |||
$('#UseCondition').lrDataItemSelect({ code: 'AssState' }); | |||
$('#UseDepartment').lrDepartmentSelect(); | |||
$('#UseDepartment').lrDepartmentSelect({ | |||
select: function (item) { | |||
$('#UsePeople').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetList', | |||
param: { departmentId: item.value } | |||
}); | |||
} | |||
}); | |||
$('#ManageDepartment').lrDepartmentSelect(); | |||
$('#UsePeople').lrformselect({ | |||
layerUrl: top.$.rootUrl + '/LR_OrganizationModule/User/SelectOnlyForm', | |||
layerUrlW: 400, | |||
layerUrlH: 300, | |||
dataUrl: top.$.rootUrl + '/LR_OrganizationModule/User/GetListByUserIds' | |||
$('#UsePeople').lrselect({ | |||
value: 'F_UserId', | |||
text: 'F_RealName', | |||
title: 'F_RealName', | |||
// 展开最大高度 | |||
maxHeight: 110, | |||
// 是否允许搜索 | |||
allowSearch: true | |||
}); | |||
$('#Unit').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#CardStatus').lrDataItemSelect({ code: 'CardStatus' }); | |||
@@ -182,7 +192,6 @@ var bootstrap = function ($, learun) { | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
console.log('formview@'+processId); | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_FixAssets/GetFormDataByProcessId?processId=' + processId, function (data) { | |||
for (var id in data) { | |||
@@ -37,9 +37,24 @@ var bootstrap = function ($, learun) { | |||
$('#ATId').lrselect({ allowSearch: true }); | |||
$('#GetWay').lrDataItemSelect({ code: 'GetWay' }); | |||
$('#UseCondition').lrDataItemSelect({ code: 'AssState' }); | |||
$('#UseDepartment').lrDepartmentSelect(); | |||
$('#UseDepartment').lrDepartmentSelect({ | |||
select: function (item) { | |||
$('#UsePeople').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetList', | |||
param: { departmentId: item.value } | |||
}); | |||
} | |||
}); | |||
$('#ManageDepartment').lrDepartmentSelect(); | |||
$('#UsePeople').lrUserSelect(0); | |||
$('#UsePeople').lrselect({ | |||
value: 'F_UserId', | |||
text: 'F_RealName', | |||
title: 'F_RealName', | |||
// 展开最大高度 | |||
maxHeight: 110, | |||
// 是否允许搜索 | |||
allowSearch: true | |||
}); | |||
$('#CardStatus').lrDataItemSelect({ code: 'CardStatus' }); | |||
$('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||
$('#DepreciationStatus').lrDataItemSelect({ code: 'DepreciationStatus' }); | |||
@@ -392,7 +407,8 @@ var bootstrap = function ($, learun) { | |||
], | |||
mainId: 'FAId', | |||
isPage: true, | |||
sidx: 'CreateTime desc' | |||
sidx: 'FACode,FAName', | |||
sord:'asc' | |||
}); | |||
page.search(); | |||
}, | |||
@@ -36,9 +36,24 @@ var bootstrap = function ($, learun) { | |||
$('#ATId').lrselect({ allowSearch: true }); | |||
$('#GetWay').lrDataItemSelect({ code: 'GetWay' }); | |||
$('#UseCondition').lrDataItemSelect({ code: 'AssState' }); | |||
$('#UseDepartment').lrDepartmentSelect(); | |||
$('#UseDepartment').lrDepartmentSelect({ | |||
select: function (item) { | |||
$('#UsePeople').lrselectRefresh({ | |||
url: top.$.rootUrl + '/LR_OrganizationModule/User/GetList', | |||
param: { departmentId: item.value } | |||
}); | |||
} | |||
}); | |||
$('#ManageDepartment').lrDepartmentSelect(); | |||
$('#UsePeople').lrUserSelect(0); | |||
$('#UsePeople').lrselect({ | |||
value: 'F_UserId', | |||
text: 'F_RealName', | |||
title: 'F_RealName', | |||
// 展开最大高度 | |||
maxHeight: 110, | |||
// 是否允许搜索 | |||
allowSearch: true | |||
}); | |||
$('#CardStatus').lrDataItemSelect({ code: 'CardStatus' }); | |||
$('#StorageId').lrDataSourceSelect({ code: 'Ass_StorageData', value: 'sid', text: 'sname' }); | |||
$('#DepreciationStatus').lrDataItemSelect({ code: 'DepreciationStatus' }); | |||
@@ -285,7 +300,8 @@ var bootstrap = function ($, learun) { | |||
], | |||
mainId: 'FAId', | |||
isPage: true, | |||
sidx: 'CreateTime desc' | |||
sidx: 'FACode,FAName', | |||
sord: 'asc' | |||
}); | |||
page.search(); | |||
}, | |||
@@ -71,6 +71,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 主页面【线上选修课程-设置选课专业】 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult IndexOfElectiveOnline() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -124,6 +133,13 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetElectiveOnlinePageList(string queryJson) | |||
{ | |||
var data = cdMajorIBLL.GetElectiveOnlinePageList(queryJson).OrderBy(x => x.MajorNo).ThenBy(x => x.Grade); | |||
return Success(data); | |||
} | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetListByDeptNo(string DeptNo) | |||
{ | |||
var data = cdMajorIBLL.GetListByDeptNo(DeptNo); | |||
@@ -0,0 +1,129 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Web.Mvc; | |||
using System.Collections.Generic; | |||
using Newtonsoft.Json; | |||
using System.Linq; | |||
namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-08-29 16:50 | |||
/// 描 述:选课专业 | |||
/// </summary> | |||
public class ElectiveMajorOnlineController : MvcControllerBase | |||
{ | |||
private ElectiveMajorOnlineIBLL electiveMajorOnlineIBLL = new ElectiveMajorOnlineBLL(); | |||
#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="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = electiveMajorOnlineIBLL.GetPageList(paginationobj, queryJson).OrderBy(x => x.MajorNo).ThenBy(x => x.Grade); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var ElectiveMajorOnlineData = electiveMajorOnlineIBLL.GetElectiveMajorOnlineEntity(keyValue); | |||
var jsonData = new | |||
{ | |||
ElectiveMajorOnline = ElectiveMajorOnlineData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue, string LIOEOId) | |||
{ | |||
electiveMajorOnlineIBLL.BatchDeleteEntity(keyValue, LIOEOId); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
ElectiveMajorOnlineEntity entity = strEntity.ToObject<ElectiveMajorOnlineEntity>(); | |||
electiveMajorOnlineIBLL.SaveEntity(keyValue, entity); | |||
return Success("保存成功!"); | |||
} | |||
/// <summary> | |||
/// 设置选课专业 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SetElectiveMajorOnline(string keyValue, string olpoeId) | |||
{ | |||
//electiveMajorOnlineIBLL.SetElectiveMajorOnline(keyValue, olpoeId); | |||
var dataList = JsonConvert.DeserializeObject<List<CdMajorEntity>>(keyValue); | |||
electiveMajorOnlineIBLL.SetElectiveMajorOnline(dataList, olpoeId); | |||
return Success("设置成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -37,6 +37,25 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 主页面-设置 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult SetIndex() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页-人数 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormNum() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -129,6 +148,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 设置可选/取消可选 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult SetUpIsAllowSelect(string keyValue, int IsAllowSelect) | |||
{ | |||
lessonInfoOfElectiveOnlineIBLL.SetUpIsAllowSelect(keyValue, IsAllowSelect); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 批量设置管理专业 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpPost] | |||
public ActionResult SaveStuNumMax(string keyValue, int StuNumMax) | |||
{ | |||
lessonInfoOfElectiveOnlineIBLL.SaveStuNumMax(keyValue, StuNumMax); | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
@@ -0,0 +1,49 @@ | |||
@{ | |||
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="MajorNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业名称</div> | |||
<input id="MajorName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">校区</div> | |||
<div id="F_SchoolId"></div> | |||
</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="Grade"></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"> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtableaddmajor"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/CdMajor/IndexOfElectiveOnline.js") |
@@ -0,0 +1,128 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-01-22 16:32 | |||
* 描 述:专业信息管理 | |||
*/ | |||
var refreshGirdData; | |||
var acceptClick; | |||
var LIOEOId = request('LIOEOId'); //选修课主键 | |||
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); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#Grade').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', | |||
value: 'value', | |||
text: 'text', | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtableaddmajor').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetElectiveOnlinePageList', | |||
headData: [ | |||
{ label: "专业名称", name: "MajorName", width: 150, align: "left" }, | |||
{ label: "专业编号", name: "MajorNo", width: 80, align: "left" }, | |||
{ label: "年级", name: "Grade", width: 80, align: "left" }, | |||
{ label: "学制", name: "LengthOfSchooling", width: 60, align: "left" }, | |||
{ | |||
label: "学科门类", name: "SubjectSpeciesNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'SubjectSpecies', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "校区", name: "F_SchoolId", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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: "GraduateNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'CollegeType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
} | |||
], | |||
mainId: 'ID', | |||
isMultiselect: true, | |||
sidx: 'MajorNo', | |||
sord: 'ASC' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.LIOEOId = LIOEOId; | |||
$('#gridtableaddmajor').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
var keyValue = $('#gridtableaddmajor').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
var dataList = $('#gridtableaddmajor').jfGridGet('rowdata'); | |||
learun.layerConfirm('是否确认添加?', function (res) { | |||
if (res) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/ElectiveMajorOnline/SetElectiveMajorOnline', { keyValue: JSON.stringify(dataList), olpoeId: LIOEOId }, function () { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
learun.layerClose(window.name); | |||
callBack(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,31 @@ | |||
@{ | |||
ViewBag.Title = "选课专业"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="ElectiveMajorOnline" > | |||
<div class="lr-form-item-title">学年<font face="宋体">*</font></div> | |||
<input id="AcademicYearNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ElectiveMajorOnline" > | |||
<div class="lr-form-item-title">学期<font face="宋体">*</font></div> | |||
<input id="Semester" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ElectiveMajorOnline" > | |||
<div class="lr-form-item-title">专业编号<font face="宋体">*</font></div> | |||
<input id="MajorNo" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ElectiveMajorOnline" > | |||
<div class="lr-form-item-title">创建用户编号<font face="宋体">*</font></div> | |||
<input id="CreateUserId" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ElectiveMajorOnline" > | |||
<div class="lr-form-item-title">创建用户名称<font face="宋体">*</font></div> | |||
<input id="CreateUserName" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="ElectiveMajorOnline" > | |||
<div class="lr-form-item-title">创建时间<font face="宋体">*</font></div> | |||
<input id="CreateDate" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ElectiveMajorOnline/Form.js") |
@@ -0,0 +1,50 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-08-29 16:50 | |||
* 描 述:选课专业 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/EducationalAdministration/ElectiveMajorOnline/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/ElectiveMajorOnline/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,51 @@ | |||
@{ | |||
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="MajorNo" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">专业名称</div> | |||
<input id="MajorName" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">校区</div> | |||
<div id="F_SchoolId"></div> | |||
</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="Grade"></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=""> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></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="gridtablemanagemajor"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/ElectiveMajorOnline/Index.js") |
@@ -0,0 +1,146 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2019-08-29 16:50 | |||
* 描 述:选课专业 | |||
*/ | |||
var refreshGirdData; | |||
var acceptClick; | |||
var LIOEOId = request("LIOEOId"); | |||
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); | |||
$('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); | |||
$('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); | |||
$('#Grade').lrselect({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', | |||
value: 'value', | |||
text: 'text', | |||
}); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 添加专业 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'formadd', | |||
title: '添加专业', | |||
url: top.$.rootUrl + '/EducationalAdministration/CdMajor/IndexOfElectiveOnline?LIOEOId=' + LIOEOId, | |||
width: 1000, | |||
height: 700, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtablemanagemajor').jfGridValue('ElectiveMajorOnlineId'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/ElectiveMajorOnline/DeleteForm', { keyValue: keyValue, LIOEOId: LIOEOId }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtablemanagemajor').lrAuthorizeJfGridLei({ | |||
url: top.$.rootUrl + '/EducationalAdministration/ElectiveMajorOnline/GetPageList', | |||
headData: [ | |||
{ label: "专业名称", name: "MajorName", width: 150, align: "left" }, | |||
{ label: "专业编号", name: "MajorNo", width: 80, align: "left" }, | |||
{ label: "年级", name: "Grade", width: 80, align: "left" }, | |||
{ label: "学制", name: "LengthOfSchooling", width: 60, align: "left" }, | |||
{ | |||
label: "学科门类", name: "SubjectSpeciesNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'SubjectSpecies', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "校区", name: "F_SchoolId", width: 200, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
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: "GraduateNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('dataItem', { | |||
key: value, | |||
code: 'CollegeType', | |||
callback: function (_data) { | |||
callback(_data.text); | |||
} | |||
}); | |||
} | |||
} | |||
], | |||
mainId: 'ElectiveMajorOnlineId', | |||
isMultiselect: true, | |||
isPage: true, | |||
sidx: 'MajorNo', | |||
sord: 'ASC' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.LIOEOId = LIOEOId; | |||
$('#gridtablemanagemajor').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!!callBack) { | |||
learun.layerClose(window.name); | |||
callBack(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,11 @@ | |||
@{ | |||
ViewBag.Title = "线上选修课程设置"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap"> | |||
<div class="col-xs-12 lr-form-item" data-table="LessonInfoOfElectiveOnline"> | |||
<div class="lr-form-item-title">报名人数上限 <font face="宋体">*</font></div> | |||
<input id="StuNumMax" type="text" class="form-control" isvalid="yes" checkexpession="Num" /> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/FormNum.js") |
@@ -0,0 +1,38 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-05-30 10:02 | |||
* 描 述:线上选修课程设置 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
}, | |||
initData: function () { | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
$.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/SaveStuNumMax?keyValue=' + keyValue, { StuNumMax: $('#StuNumMax').val() }, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -54,6 +54,10 @@ var bootstrap = function ($, learun) { | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
if (keyValue.indexOf(',') != -1) { | |||
learun.alert.warning("只能选择一条记录进行编辑!"); | |||
return; | |||
} | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark === "1") { | |||
learun.alert.warning("当前课程已启用不能编辑!"); | |||
@@ -76,17 +80,32 @@ var bootstrap = function ($, learun) { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark === "1") { | |||
learun.alert.warning("当前课程已启用不能删除!"); | |||
if (CheckMark.indexOf('1') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目,已启用不能删除!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
var rowdata = $('#gridtable').jfGridGet('rowdata'); | |||
//有报名数据、有选择专业不让删除 | |||
try { | |||
rowdata.forEach(function (item, index, row) { | |||
if (!!item.StuNumOfApply || !!item.StuNum) { | |||
throw learun.alert.warning("已报人数、通过人数大于0的不能删除!"); | |||
} | |||
if (!!item.ElectiveMajorOnlineList && item.ElectiveMajorOnlineList.length > 0) { | |||
throw learun.alert.warning("已管理选课专业的数据不允许删除!"); | |||
} | |||
}); | |||
learun.layerConfirm('是否确认删除选中项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DeleteForm', { keyValue: keyValue }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} catch (e) { | |||
} | |||
} | |||
}); | |||
//启用 | |||
@@ -94,13 +113,13 @@ var bootstrap = function ($, learun) { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark == "1") { | |||
learun.alert.warning("当前课程已启用!"); | |||
if (CheckMark.indexOf('1') != -1) { | |||
learun.alert.warning("选中记录中包含已启用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认启用该项!', function (res) { | |||
learun.layerConfirm('是否确认启用选中项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DoLock', { keyValue: keyValue, status: "1" }, function () { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DoLock', { keyValue: keyValue, status: "1" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
@@ -112,13 +131,13 @@ var bootstrap = function ($, learun) { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var CheckMark = $('#gridtable').jfGridValue('CheckMark'); | |||
if (CheckMark != "1") { | |||
learun.alert.warning("当前课程未启用无法停用!"); | |||
if (CheckMark.indexOf('0') != -1) { | |||
learun.alert.warning("选中记录中包含未启用项目!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认停用该项!', function (res) { | |||
learun.layerConfirm('是否确认停用选中项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DoLock', { keyValue: keyValue, status: "0" }, function () { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/DoLock', { keyValue: keyValue, status: "0" }, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
@@ -170,6 +189,7 @@ var bootstrap = function ($, learun) { | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'MakeDate desc' | |||
}); | |||
page.search(); | |||
@@ -0,0 +1,53 @@ | |||
@{ | |||
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" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">学期</div> | |||
<div id="Semester" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程名称</div> | |||
<div id="LessonName" type="lrselect" class="lr-select"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">课程号</div> | |||
<input id="LessonNo" 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 class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_editMajor" 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_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> | |||
<a id="lr_audit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 审核学生</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/SetIndex.js") |
@@ -0,0 +1,272 @@ | |||
/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) | |||
* Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-05-30 10:02 | |||
* 描 述:线上选修课程设置 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
page.bindSemesterAndYear(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
$('#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' | |||
}); | |||
$('#LessonName').lrDataSourceSelect({ code: 'LessonInfoOfElectiveOnline', value: 'lessonno', text: 'lessonname' }); | |||
//设置选课专业 | |||
$('#lr_editMajor').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
var rowdata = $('#gridtable').jfGridGet('rowdata'); | |||
//判断选中记录是否可以批量管理专业 | |||
$.ajax({ | |||
url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/IsBatchEditMajor', | |||
data: { data: JSON.stringify(rowdata) }, | |||
type: "post", | |||
dataType: "json", | |||
async: false, | |||
cache: false, | |||
success: function (data) { | |||
if (data.data == true) { | |||
learun.layerForm({ | |||
id: 'formMajor', | |||
title: '管理选课专业', | |||
url: top.$.rootUrl + '/EducationalAdministration/ElectiveMajorOnline/Index?LIOEOId=' + keyValue, | |||
width: 1000, | |||
height: 700, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} else { | |||
return learun.alert.warning('只有同学期同课程支持批量管理专业!'); | |||
} | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
learun.httpErrorLog(textStatus); | |||
}, | |||
beforeSend: function () { | |||
}, | |||
complete: function () { | |||
} | |||
}); | |||
} | |||
}); | |||
//设置人数 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formNum', | |||
title: '设置人数', | |||
url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/FormNum?keyValue=' + keyValue, | |||
width: 400, | |||
height: 300, | |||
callBack: function (id) { | |||
return top[id].acceptClick(refreshGirdData); | |||
} | |||
}); | |||
} | |||
}); | |||
//查看已审学生-----todo:待看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '查看学生', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/FinishIndex?OLPEId=' + keyValue, | |||
width: 1000, | |||
height: 700, | |||
btn: null, | |||
end: function () { | |||
refreshGirdData(); | |||
} | |||
}); | |||
} | |||
}); | |||
//审核学生------todo:待看 | |||
$('#lr_audit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '审核学生', | |||
url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/AuditIndex?OLPEId=' + keyValue, | |||
width: 1000, | |||
height: 700, | |||
btn: null, | |||
end: function () { | |||
refreshGirdData(); | |||
} | |||
}); | |||
} | |||
}); | |||
//设置可选 | |||
$('#lr_AllowSelect').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/SetUpIsAllowSelect', { keyValue: keyValue, IsAllowSelect: 1 }, | |||
function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
//取消可选 | |||
$('#lr_CancelSelect').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.postForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/SetUpIsAllowSelect', { keyValue: keyValue, IsAllowSelect: 0 }, | |||
function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
}, | |||
bindSemesterAndYear: function () { | |||
$.ajax({ | |||
url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetSemesterAndYear', | |||
type: "GET", | |||
dataType: "json", | |||
async: false, | |||
cache: false, | |||
success: function (res) { | |||
var data = res.data; | |||
if (!!data) { | |||
$('#AcademicYearNo').lrselectSet(data.AcademicYearShort); | |||
var Semester = data.Semester; | |||
$('#Semester').lrselectSet(Semester); | |||
var param = { "AcademicYearNo": data.AcademicYearShort, "Semester": data.Semester }; | |||
//todo:等待最后解除注释 | |||
//page.search(param); | |||
} | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
learun.httpErrorLog(textStatus); | |||
}, | |||
beforeSend: function () { | |||
}, | |||
complete: function () { | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/GetPageList', | |||
headData: [ | |||
{ label: "课程编号", name: "LessonNo", width: 150, align: "left" }, | |||
{ label: "课程名称", name: "LessonName", width: 150, align: "left" }, | |||
{ label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, | |||
{ label: "学期", name: "Semester", width: 100, align: "left" }, | |||
{ | |||
label: "建课教师", name: "EmpNo", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', | |||
key: value, | |||
keyId: 'empno', | |||
callback: function (_data) { | |||
callback(_data['empname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "建课学校", name: "F_SchoolId", width: 150, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company', | |||
key: value, | |||
keyId: 'f_companyid', | |||
callback: function (_data) { | |||
callback(_data['f_fullname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ label: "人数上限", name: "StuNumMax", width: 60, align: "left" }, | |||
{ label: "已报人数", name: "StuNumOfApply", width: 60, align: "left" }, | |||
{ label: "通过人数", name: "StuNum", width: 60, 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.ElectiveMajorOnlineList && row.ElectiveMajorOnlineList.length > 0) { | |||
return "<span class=\"label label-success\">是</span>"; | |||
} else { | |||
return "<span class=\"label label-default\">否</span>"; | |||
} | |||
} | |||
}, | |||
{ | |||
label: "选课专业", name: "ElectiveMajorOnlineList", width: 150, align: "left", formatter: function (cellvalue, row) { | |||
var str = ""; | |||
if (!!cellvalue && cellvalue.length > 0) { | |||
for (var i = 0; i < cellvalue.length; i++) { | |||
str += cellvalue[i].Grade + "级" + cellvalue[i].MajorName; | |||
if (i != cellvalue.length - 1) { | |||
str += ","; | |||
} | |||
} | |||
} | |||
return str; | |||
} | |||
} | |||
], | |||
mainId: 'Id', | |||
isPage: true, | |||
isMultiselect: true, | |||
sidx: 'AcademicYearNo DESC, Semester DESC, LessonName ASC', | |||
sord: 'desc' | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
param.CheckMark = "1";//已启用 | |||
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function () { | |||
page.search(); | |||
}; | |||
page.init(); | |||
} |
@@ -339,6 +339,7 @@ | |||
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_SupplierController.cs" /> | |||
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_UserChangeInfoController.cs" /> | |||
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_WarningController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ElectiveMajorOnlineController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\YKTStateMentController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonSyncController.cs" /> | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ArrangeLessonTermAttemperController.cs" /> | |||
@@ -1003,8 +1004,13 @@ | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Warning\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Acc_DormitoryChange\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\FormProvince.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexOfElectiveOnline.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexProvince.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ElectiveMajorOnline\Form.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ElectiveMajorOnline\Index.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\Exam_ArrangeExamTermNew\IndexClassRoom.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\FormNum.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\SetIndex.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\PsychologyInfo\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\FormView.js" /> | |||
<Content Include="Areas\EducationalAdministration\Views\SchoolLevelScholarship\IndexOfStudent.js" /> | |||
@@ -8186,6 +8192,11 @@ | |||
<Content Include="Content\excel\AssFixAssetsImport.xls" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssets\IndexOfTeacher.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_FixAssetsApply\IndexView.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\SetIndex.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\LessonInfoOfElectiveOnline\FormNum.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ElectiveMajorOnline\Form.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\ElectiveMajorOnline\Index.cshtml" /> | |||
<Content Include="Areas\EducationalAdministration\Views\CdMajor\IndexOfElectiveOnline.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.EducationalAdministration; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-08-29 16:50 | |||
/// 描 述:选课专业 | |||
/// </summary> | |||
public class ElectiveMajorOnlineMap : EntityTypeConfiguration<ElectiveMajorOnlineEntity> | |||
{ | |||
public ElectiveMajorOnlineMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("ELECTIVEMAJORONLINE"); | |||
//主键 | |||
this.HasKey(t => t.Id); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -83,6 +83,7 @@ | |||
<Compile Include="EducationalAdministration\DispatchAuditMap.cs" /> | |||
<Compile Include="EducationalAdministration\DispatchMap.cs" /> | |||
<Compile Include="EducationalAdministration\EADateArrangeMap.cs" /> | |||
<Compile Include="EducationalAdministration\ElectiveMajorOnlineMap.cs" /> | |||
<Compile Include="EducationalAdministration\ExamSubjectMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermItemNewMap.cs" /> | |||
<Compile Include="EducationalAdministration\Exam_ArrangeExamTermNewMap.cs" /> | |||
@@ -60,6 +60,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public IEnumerable<CdMajorEntity> GetElectiveOnlinePageList(string queryJson) | |||
{ | |||
try | |||
{ | |||
return cdMajorService.GetElectiveOnlinePageList(queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<CdMajorProvince> GetListForProvince(string queryJson) | |||
{ | |||
@@ -163,20 +163,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
#endregion | |||
#region 扩展字段 | |||
/// <summary> | |||
/// OpenLessonPlanOfElective主键 | |||
/// LessonInfoOfElectiveOnline主键 | |||
/// </summary> | |||
[NotMapped] | |||
public string OLPOEId { get; set; } | |||
public string LIOEOId { get; set; } | |||
/// <summary> | |||
/// 年级 | |||
/// </summary> | |||
[NotMapped] | |||
public string Grade { get; set; } | |||
/// <summary> | |||
/// ElectiveMajor主键 | |||
/// ElectiveMajorOnline主键 | |||
/// </summary> | |||
[NotMapped] | |||
public string ElectiveMajorId { get; set; } | |||
public string ElectiveMajorOnlineId { get; set; } | |||
/// <summary> | |||
/// 招生对象名称 | |||
/// </summary> | |||
@@ -22,6 +22,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <returns></returns> | |||
IEnumerable<CdMajorEntity> GetPageList(Pagination pagination, string queryJson); | |||
IEnumerable<CdMajorEntity> GetElectivePageList(string queryJson); | |||
IEnumerable<CdMajorEntity> GetElectiveOnlinePageList(string queryJson); | |||
IEnumerable<CdMajorProvince> GetListForProvince(string queryJson); | |||
IEnumerable<CdMajorEntity> GetListByProvince(string province); | |||
IEnumerable<CdMajorEntity> GetListByDeptNo(string DeptNo); | |||
@@ -151,6 +151,63 @@ t.Province | |||
} | |||
} | |||
public IEnumerable<CdMajorEntity> GetElectiveOnlinePageList(string queryJson) | |||
{ | |||
try | |||
{ | |||
var queryParam = queryJson.ToJObject(); | |||
var strSql = new StringBuilder(); | |||
strSql.Append("select bb.* from ( "); | |||
strSql.Append(" select b.Grade,m.* from CdMajor m "); | |||
strSql.Append(" inner join (select t.Grade from ClassInfo t where t.CheckMark=1 group by t.Grade) b on 1=1"); | |||
strSql.Append(" where 1=1 and m.CheckMark=1"); | |||
strSql.Append(" except"); | |||
strSql.Append(" select em.Grade,cm.* from ElectiveMajorOnline em left join CdMajor cm on em.MajorId=cm.ID where em.LIOEOId in ('" + string.Join("','", queryParam["LIOEOId"].ToString().Split(',')) + "') "); | |||
strSql.Append(" ) bb where 1=1 "); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", "%" + queryParam["MajorNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND bb.MajorNo Like @MajorNo "); | |||
} | |||
if (!queryParam["MajorName"].IsEmpty()) | |||
{ | |||
dp.Add("MajorName", "%" + queryParam["MajorName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND bb.MajorName Like @MajorName "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND bb.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["F_SchoolId"].IsEmpty()) | |||
{ | |||
dp.Add("F_SchoolId", queryParam["F_SchoolId"].ToString(), DbType.String); | |||
strSql.Append(" AND bb.F_SchoolId = @F_SchoolId "); | |||
} | |||
if (!queryParam["Grade"].IsEmpty()) | |||
{ | |||
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); | |||
strSql.Append(" AND bb.Grade = @Grade "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<CdMajorEntity>(strSql.ToString(), dp); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
public IEnumerable<CdMajorProvince> GetListForProvince(string queryJson) | |||
{ | |||
try | |||
@@ -0,0 +1,216 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-08-29 16:50 | |||
/// 描 述:选课专业 | |||
/// </summary> | |||
public class ElectiveMajorOnlineBLL : ElectiveMajorOnlineIBLL | |||
{ | |||
private ElectiveMajorOnlineService electiveMajorOnlineService = new ElectiveMajorOnlineService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<CdMajorEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return electiveMajorOnlineService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取ElectiveMajorOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public ElectiveMajorOnlineEntity GetElectiveMajorOnlineEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return electiveMajorOnlineService.GetElectiveMajorOnlineEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<ElectiveMajorOnlineEntity> GetList(string academicYearNo, string semester) | |||
{ | |||
try | |||
{ | |||
return electiveMajorOnlineService.GetList(academicYearNo, semester); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
electiveMajorOnlineService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void BatchDeleteEntity(string keyValue, string LIOEOId) | |||
{ | |||
try | |||
{ | |||
electiveMajorOnlineService.BatchDeleteEntity(keyValue, LIOEOId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, ElectiveMajorOnlineEntity entity) | |||
{ | |||
try | |||
{ | |||
electiveMajorOnlineService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 设置选课专业 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void SetElectiveMajorOnline(string keyValue, string olpoeId) | |||
{ | |||
try | |||
{ | |||
electiveMajorOnlineService.SetElectiveMajorOnline(keyValue,olpoeId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 设置选课专业 | |||
/// </summary> | |||
/// <param name="dataList">选中专业</param> | |||
public void SetElectiveMajorOnline(List<CdMajorEntity> dataList, string olpoeId) | |||
{ | |||
try | |||
{ | |||
electiveMajorOnlineService.SetElectiveMajorOnline(dataList, olpoeId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,80 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-08-29 16:50 | |||
/// 描 述:选课专业 | |||
/// </summary> | |||
public class ElectiveMajorOnlineEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// Id | |||
/// </summary> | |||
[Column("ID")] | |||
public string Id { get; set; } | |||
/// <summary> | |||
/// 选修课主键 | |||
/// </summary> | |||
[Column("LIOEOID")] | |||
public string LIOEOId { get; set; } | |||
/// <summary> | |||
/// 可选课的专业 | |||
/// </summary> | |||
[Column("MAJORID")] | |||
public string MajorId { get; set; } | |||
/// <summary> | |||
/// 年级 | |||
/// </summary> | |||
[Column("GRADE")] | |||
public string Grade { get; set; } | |||
/// <summary> | |||
/// CreateUserId | |||
/// </summary> | |||
[Column("CREATEUSERID")] | |||
public string CreateUserId { get; set; } | |||
/// <summary> | |||
/// CreateUserName | |||
/// </summary> | |||
[Column("CREATEUSERNAME")] | |||
public string CreateUserName { get; set; } | |||
/// <summary> | |||
/// CreateDate | |||
/// </summary> | |||
[Column("CREATEDATE")] | |||
public DateTime? CreateDate { 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 扩展字段 | |||
[NotMapped] | |||
public string MajorNo { get; set; } | |||
[NotMapped] | |||
public string MajorName { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,71 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-08-29 16:50 | |||
/// 描 述:选课专业 | |||
/// </summary> | |||
public interface ElectiveMajorOnlineIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<CdMajorEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取ElectiveMajorOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
ElectiveMajorOnlineEntity GetElectiveMajorOnlineEntity(string keyValue); | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<ElectiveMajorOnlineEntity> GetList(string academicYearNo, string semester); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
void DeleteEntity(string keyValue); | |||
void BatchDeleteEntity(string keyValue, string LIOEOId); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
void SaveEntity(string keyValue, ElectiveMajorOnlineEntity entity); | |||
#endregion | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 设置选课专业 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
void SetElectiveMajorOnline(string keyValue, string olpoeId); | |||
/// <summary> | |||
/// 设置选课专业 | |||
/// </summary> | |||
/// <param name="dataList">选中专业</param> | |||
void SetElectiveMajorOnline(List<CdMajorEntity> dataList, string olpoeId); | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,420 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Linq; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 | |||
/// Copyright (c) 2013-2018 北京泉江科技有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2019-08-29 16:50 | |||
/// 描 述:选课专业 | |||
/// </summary> | |||
public class ElectiveMajorOnlineService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<CdMajorEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT t.MajorName,t.MajorNo,t.LengthOfSchooling,t.SubjectSpeciesNo,t.F_SchoolId,t.DeptNo,t.GraduateNo,a.LIOEOId,a.Id as ElectiveMajorOnlineId,a.Grade FROM ElectiveMajorOnline a left join CdMajor t on a.majorid=t.id"); | |||
strSql.Append(" WHERE 1=1 and t.checkmark=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["LIOEOId"].IsEmpty()) | |||
{ | |||
if (queryParam["LIOEOId"].ToString().Contains(",")) | |||
{ | |||
//判断批量管理专业时 原先的专业是否一致。如果一致,显示列表,如果不一致,不显示 | |||
var OLPOEId_arr = queryParam["LIOEOId"].ToString().Split(','); | |||
var OLPOEIdfirst = OLPOEId_arr[0]; | |||
var listfirst = this.BaseRepository("CollegeMIS") | |||
.FindList<ElectiveMajorOnlineEntity>($@"SELECT t.MajorNo+a.Grade as Id,t.MajorNo,a.Grade FROM ElectiveMajorOnline a left join CdMajor t on a.majorid=t.id | |||
WHERE 1=1 and t.checkmark=1 AND a.LIOEOId ='{OLPOEIdfirst}'").ToList(); | |||
bool flag = true; | |||
foreach (var OLPOEId in OLPOEId_arr) | |||
{ | |||
if (OLPOEId != OLPOEIdfirst) | |||
{ | |||
var list = this.BaseRepository("CollegeMIS") | |||
.FindList<ElectiveMajorOnlineEntity>($@"SELECT t.MajorNo+a.Grade as Id,t.MajorNo,a.Grade FROM ElectiveMajorOnline a left join CdMajor t on a.majorid=t.id | |||
WHERE 1=1 and t.checkmark=1 AND a.LIOEOId ='{OLPOEId}'").ToList(); | |||
var Except1 = listfirst.Except(list, new ItemComparer()); | |||
var Except2 = list.Except(listfirst, new ItemComparer()); | |||
if (Except1.Count() > 0 || Except2.Count() > 0) | |||
{ | |||
strSql.Append(" AND a.LIOEOId = '' "); | |||
flag = false; | |||
break; | |||
} | |||
} | |||
} | |||
if (flag) | |||
{ | |||
strSql.Append($" AND a.LIOEOId = '{OLPOEIdfirst}' "); | |||
} | |||
} | |||
else | |||
{ | |||
dp.Add("LIOEOId", queryParam["LIOEOId"].ToString(), DbType.String); | |||
strSql.Append(" AND a.LIOEOId = @LIOEOId "); | |||
} | |||
} | |||
if (!queryParam["MajorNo"].IsEmpty()) | |||
{ | |||
dp.Add("MajorNo", "%" + queryParam["MajorNo"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.MajorNo Like @MajorNo "); | |||
} | |||
if (!queryParam["MajorName"].IsEmpty()) | |||
{ | |||
dp.Add("MajorName", "%" + queryParam["MajorName"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.MajorName Like @MajorName "); | |||
} | |||
if (!queryParam["DeptNo"].IsEmpty()) | |||
{ | |||
dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DeptNo = @DeptNo "); | |||
} | |||
if (!queryParam["F_SchoolId"].IsEmpty()) | |||
{ | |||
dp.Add("F_SchoolId", queryParam["F_SchoolId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.F_SchoolId = @F_SchoolId "); | |||
} | |||
if (!queryParam["Grade"].IsEmpty()) | |||
{ | |||
dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); | |||
strSql.Append(" AND a.Grade = @Grade "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<CdMajorEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取ElectiveMajorOnline表实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public ElectiveMajorOnlineEntity GetElectiveMajorOnlineEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindEntity<ElectiveMajorOnlineEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// <summary> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<ElectiveMajorOnlineEntity> GetList(string academicYearNo, string semester) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository("CollegeMIS").FindList<ElectiveMajorOnlineEntity>(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
if (keyValue.IndexOf(",") == -1) | |||
{ | |||
db.Delete<ElectiveMajorOnlineEntity>(x => x.Id == keyValue); | |||
} | |||
else | |||
{ | |||
//多个删除 | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
db.Delete<ElectiveMajorOnlineEntity>(t => t.Id == item); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 批量删除 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="OLPOEId"></param> | |||
public void BatchDeleteEntity(string keyValue, string LIOEOId) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS"); | |||
try | |||
{ | |||
db.BeginTrans(); | |||
if (LIOEOId.IndexOf(",") == -1) | |||
{ | |||
if (keyValue.IndexOf(",") == -1) | |||
{ | |||
db.Delete<ElectiveMajorOnlineEntity>(x => x.Id == keyValue); | |||
} | |||
else | |||
{ | |||
//多个删除 | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
db.Delete<ElectiveMajorOnlineEntity>(t => t.Id == item); | |||
} | |||
} | |||
} | |||
else | |||
{ | |||
var OLPOEIds = string.Join("','", LIOEOId.Split(',')); | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
var entity = db.FindEntity<ElectiveMajorOnlineEntity>(item); | |||
db.ExecuteBySql($"delete from ElectiveMajorOnline where MajorId='{entity.MajorId}' and Grade='{entity.Grade}' and LIOEOId in ('{OLPOEIds}')"); | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// <param name="keyValue">主键</param> | |||
/// <summary> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, ElectiveMajorOnlineEntity 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 | |||
#region 扩展数据 | |||
/// <summary> | |||
/// 设置选课专业 | |||
/// </summary> | |||
/// <param name="keyValue">专业列表</param> | |||
/// <param name="olpoeId">选修课主键</param> | |||
public void SetElectiveMajorOnline(string keyValue, string olpoeId) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
var now = DateTime.Now; | |||
var loginInfo = LoginUserInfo.Get(); | |||
//添加 | |||
var keyValueArr = keyValue.Split(','); | |||
foreach (var item in keyValueArr) | |||
{ | |||
var entity = new ElectiveMajorOnlineEntity(); | |||
entity.Create(); | |||
entity.LIOEOId = olpoeId; | |||
entity.MajorId = item; | |||
entity.CreateUserId = loginInfo.userId; | |||
entity.CreateUserName = loginInfo.realName; | |||
entity.CreateDate = now; | |||
db.Insert(entity); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 设置选课专业 | |||
/// </summary> | |||
/// <param name="dataList">选中专业</param> | |||
/// <param name="olpoeId">选修课主键</param> | |||
public void SetElectiveMajorOnline(List<CdMajorEntity> dataList, string olpoeId) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
var loginInfo = LoginUserInfo.Get(); | |||
var OLPOEId_arr = olpoeId.Split(','); | |||
//添加 | |||
foreach (var item in dataList) | |||
{ | |||
for (int i = 0; i < OLPOEId_arr.Length; i++) | |||
{ | |||
var OLPOEId = OLPOEId_arr[i]; | |||
var list = db.FindList<ElectiveMajorOnlineEntity>(x => x.LIOEOId == OLPOEId); | |||
//判断是否已选 | |||
if (list.Where(x => x.MajorId == item.ID && x.Grade == item.Grade).Count() <= 0) | |||
{ | |||
var entity = new ElectiveMajorOnlineEntity(); | |||
entity.Create(); | |||
entity.LIOEOId = OLPOEId;//olpoeId; | |||
entity.MajorId = item.ID; | |||
entity.Grade = item.Grade; | |||
entity.CreateUserId = loginInfo.userId; | |||
entity.CreateUserName = loginInfo.realName; | |||
entity.CreateDate = DateTime.Now; | |||
db.Insert(entity); | |||
} | |||
} | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
public class ElecticeMajorEntity | |||
{ | |||
public string Id { get; set; } | |||
public string MajorNo { get; set; } | |||
public string Grade { get; set; } | |||
} | |||
public class ItemComparer : IEqualityComparer<ElectiveMajorOnlineEntity> | |||
{ | |||
public bool Equals(ElectiveMajorOnlineEntity x, ElectiveMajorOnlineEntity y) | |||
{ | |||
if (x.Id == y.Id) | |||
return true; | |||
return false; | |||
} | |||
public int GetHashCode(ElectiveMajorOnlineEntity obj) | |||
{ | |||
return obj.Id.GetHashCode(); | |||
} | |||
} | |||
} | |||
} |
@@ -146,6 +146,54 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 设置可选/取消可选 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="IsAllowSelect"></param> | |||
public void SetUpIsAllowSelect(string keyValue, int IsAllowSelect) | |||
{ | |||
try | |||
{ | |||
lessonInfoOfElectiveOnlineService.SetUpIsAllowSelect(keyValue, IsAllowSelect); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 批量设置人数 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="StuNumMax"></param> | |||
public void SaveStuNumMax(string keyValue, int StuNumMax) | |||
{ | |||
try | |||
{ | |||
lessonInfoOfElectiveOnlineService.SaveStuNumMax(keyValue, StuNumMax); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
@@ -1,5 +1,6 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
@@ -269,6 +270,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
/// <summary> | |||
/// 已报名人数 | |||
/// </summary> | |||
[NotMapped] | |||
public int? StuNumOfApply { get; set; } | |||
/// <summary> | |||
/// 选课专业列表 | |||
/// </summary> | |||
[NotMapped] | |||
public List<ElectiveMajorOnlineEntity> ElectiveMajorOnlineList { get; set; } | |||
#endregion | |||
} | |||
} | |||
@@ -52,6 +52,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
void DoLock(string keyValue, string status); | |||
/// <summary> | |||
/// 设置可选/取消可选 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="IsAllowSelect"></param> | |||
void SetUpIsAllowSelect(string keyValue, int IsAllowSelect); | |||
/// <summary> | |||
/// 批量设置人数 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="StuNumMax"></param> | |||
void SaveStuNumMax(string keyValue, int StuNumMax); | |||
#endregion | |||
} | |||
@@ -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 | |||
@@ -66,7 +67,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("CheckMark", queryParam["CheckMark"].ToString(), DbType.String); | |||
strSql.Append(" AND t.CheckMark = @CheckMark "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<LessonInfoOfElectiveOnlineEntity>(strSql.ToString(), dp, pagination); | |||
var list = new List<LessonInfoOfElectiveOnlineEntity>(); | |||
list = this.BaseRepository("CollegeMIS").FindList<LessonInfoOfElectiveOnlineEntity>(strSql.ToString(), dp, pagination).ToList(); | |||
//选课专业 | |||
var majorSql = @"SELECT t.MajorName,t.MajorNo,a.* FROM ElectiveMajorOnline a left join CdMajor t on a.majorid=t.id"; | |||
var electiveMajorOnlineList = this.BaseRepository("CollegeMIS").FindList<ElectiveMajorOnlineEntity>(majorSql); | |||
foreach (var item in list) | |||
{ | |||
//模式二:正式选课 | |||
var aa = this.BaseRepository("CollegeMIS").FindList<StuSelectLessonListOfElectiveEntity>(x => x.OLPEId == item.Id);//todo:改实体,改字段 | |||
//已报名人数 | |||
item.StuNumOfApply = aa.Where(x => (x.Status == 1 || x.Status == 2)).Count(); | |||
//审核通过人数 | |||
item.StuNum = aa.Where(x => x.Status == 2).Count(); | |||
//选课专业 | |||
item.ElectiveMajorOnlineList = electiveMajorOnlineList.Where(x => x.LIOEOId == item.Id).ToList(); | |||
} | |||
return list; | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -115,12 +133,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
var db = this.BaseRepository("CollegeMIS").BeginTrans(); | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").Delete<LessonInfoOfElectiveOnlineEntity>(t => t.Id == keyValue); | |||
//单个删除 | |||
//this.BaseRepository("CollegeMIS").Delete<LessonInfoOfElectiveOnlineEntity>(t => t.Id == keyValue); | |||
//批量删除 | |||
foreach (var item in keyValue.Split(',')) | |||
{ | |||
//删除选课专业 | |||
db.ExecuteBySql($"delete from ElectiveMajorOnline where LIOEOId='{item}'"); | |||
//删除选修课课程表 | |||
db.ExecuteBySql($"delete from LessonInfoOfElectiveOnline where Id='{item}'"); | |||
} | |||
db.Commit(); | |||
} | |||
catch (Exception ex) | |||
{ | |||
db.Rollback(); | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
@@ -177,7 +209,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
{ | |||
try | |||
{ | |||
this.BaseRepository("CollegeMIS").ExecuteBySql($"update LessonInfoOfElectiveOnline set CheckMark='{status}' where Id='{keyValue}' "); | |||
//单个启用 | |||
//this.BaseRepository("CollegeMIS").ExecuteBySql($"update LessonInfoOfElectiveOnline set CheckMark='{status}' where Id='{keyValue}' "); | |||
if (keyValue.Contains(",")) | |||
{ | |||
keyValue = string.Join("','", keyValue.Split(',')); | |||
} | |||
string sql = $"update LessonInfoOfElectiveOnline set IsAllowSelect='{status}' where Id in ('{keyValue}')"; | |||
this.BaseRepository("CollegeMIS").ExecuteBySql(sql); | |||
} | |||
catch (Exception ex) | |||
{ | |||
@@ -192,6 +233,63 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
/// <summary> | |||
/// 设置可选/取消可选 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <param name="IsAllowSelect"></param> | |||
public void SetUpIsAllowSelect(string keyValue, int IsAllowSelect) | |||
{ | |||
try | |||
{ | |||
if (keyValue.Contains(",")) | |||
{ | |||
keyValue = string.Join("','", keyValue.Split(',')); | |||
} | |||
string sql = $"update LessonInfoOfElectiveOnline 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> | |||
/// <param name="keyValue"></param> | |||
/// <param name="StuNumMax"></param> | |||
public void SaveStuNumMax(string keyValue, int StuNumMax) | |||
{ | |||
try | |||
{ | |||
if (keyValue.Contains(",")) | |||
{ | |||
keyValue = string.Join("','", keyValue.Split(',')); | |||
} | |||
this.BaseRepository("CollegeMIS").ExecuteBySql($"update LessonInfoOfElectiveOnline set StuNumMax='{StuNumMax}' where Id in ('{keyValue}')"); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
@@ -91,6 +91,10 @@ | |||
<Compile Include="AssetManagementSystem\Ass_ScrapItem\Ass_ScrapItemEntity.cs" /> | |||
<Compile Include="AssetManagementSystem\Ass_ScrapItem\Ass_ScrapItemIBLL.cs" /> | |||
<Compile Include="AssetManagementSystem\Ass_ScrapItem\Ass_ScrapItemService.cs" /> | |||
<Compile Include="EducationalAdministration\ElectiveMajorOnline\ElectiveMajorOnlineBLL.cs" /> | |||
<Compile Include="EducationalAdministration\ElectiveMajorOnline\ElectiveMajorOnlineEntity.cs" /> | |||
<Compile Include="EducationalAdministration\ElectiveMajorOnline\ElectiveMajorOnlineIBLL.cs" /> | |||
<Compile Include="EducationalAdministration\ElectiveMajorOnline\ElectiveMajorOnlineService.cs" /> | |||
<Compile Include="EducationalAdministration\YKTStateMent\YKTStateMentBLL.cs" /> | |||
<Compile Include="EducationalAdministration\YKTStateMent\YKTStateMentEntity.cs" /> | |||
<Compile Include="EducationalAdministration\YKTStateMent\YKTStateMentIBLL.cs" /> | |||