diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/IndexOfTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/IndexOfTeacher.js index 563244fdc..5f2edc5b9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/IndexOfTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_FixAssets/IndexOfTeacher.js @@ -308,6 +308,7 @@ var bootstrap = function ($, learun) { search: function (param) { param = param || {}; param.IsTeacher = "1";//控制老师查看的参数 + param.Status = "2";//审核通过 $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoOfElectiveOnlineController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoOfElectiveOnlineController.cs index ae0d004dd..8b261d341 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoOfElectiveOnlineController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoOfElectiveOnlineController.cs @@ -3,6 +3,7 @@ using System.Data; using Learun.Application.TwoDevelopment.EducationalAdministration; using System.Web.Mvc; using System.Collections.Generic; +using System.Linq; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -16,6 +17,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public class LessonInfoOfElectiveOnlineController : MvcControllerBase { private LessonInfoOfElectiveOnlineIBLL lessonInfoOfElectiveOnlineIBLL = new LessonInfoOfElectiveOnlineBLL(); + private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); + CdMajorIBLL CdMajorIBLL = new CdMajorBLL(); #region 视图功能 @@ -56,6 +59,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 学子在线-线上课程选课 + /// + /// + [HttpGet] + public ActionResult StudentIndex() + { + var loginuser = LoginUserInfo.Get(); + var studentinfo = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(loginuser.account); + if (studentinfo != null) + { + ViewBag.StuMajorNo = CdMajorIBLL.GetCdMajorEntityByMajorNo(studentinfo.MajorNo)?.ID; + ViewBag.StuGrade = studentinfo.Grade; + } + ViewBag.WebApiUrl = Config.GetValue("WebApi"); + return View(); + } #endregion #region 获取数据 @@ -97,6 +117,27 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + /// + /// 获取页面显示列表数据【学子在线-线上课程选课】 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListOfStudent(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = lessonInfoOfElectiveOnlineIBLL.GetPageListOfStudent(paginationobj, queryJson).OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonNo).ThenBy(x => x.EmpNo); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + #endregion #region 提交数据 @@ -125,10 +166,23 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SaveForm(string keyValue, string strEntity) { LessonInfoOfElectiveOnlineEntity entity = strEntity.ToObject(); - lessonInfoOfElectiveOnlineIBLL.SaveEntity(keyValue, entity); + + var model = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntityByLessonNo(entity.LessonNo); if (string.IsNullOrEmpty(keyValue)) { + if (model != null) + { + return Fail("课程编号已存在!"); + } + } + else + { + if (model != null && model.Id != keyValue) + { + return Fail("课程编号已存在!"); + } } + lessonInfoOfElectiveOnlineIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } #endregion @@ -172,6 +226,21 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success("保存成功!"); } + /// + /// 判断选课是否开始 + /// + /// + public ActionResult IsSelectElectiveLesson() + { + var entity = lessonInfoOfElectiveOnlineIBLL.GetEADateArrangeEntityAboutElective(); + if (entity != null) + { + return Fail("线上选课已经开始!"); + } + + return Success("线上选课还未开始!"); + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuSelectLessonListOfElectiveOnlineController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuSelectLessonListOfElectiveOnlineController.cs new file mode 100644 index 000000000..cbaee1a3d --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuSelectLessonListOfElectiveOnlineController.cs @@ -0,0 +1,259 @@ +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 +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-05-15 10:33 + /// 描 述:选修课课程 + /// + public class StuSelectLessonListOfElectiveOnlineController : MvcControllerBase + { + private StuSelectLessonListOfElectiveOnlineIBLL stuSelectLessonListOfElectiveOnlineIBLL = new StuSelectLessonListOfElectiveOnlineBLL(); + private LessonInfoOfElectiveOnlineIBLL lessonInfoOfElectiveOnlineIBLL = new LessonInfoOfElectiveOnlineBLL(); + + #region 视图功能 + + /// + /// 主页面 + /// + /// + [HttpGet] + public ActionResult Index() + { + return View(); + } + [HttpGet] + public ActionResult QueryStuSelectResult() + { + return View(); + } + + [HttpGet] + public ActionResult QueryStuSelectResultForTeacher() + { + return View(); + } + /// + /// 教务-审核表单页 + /// + /// + [HttpGet] + public ActionResult AuditForm() + { + return View(); + } + + /// + /// 教务-审核页面 + /// + /// + [HttpGet] + public ActionResult AuditIndex() + { + return View(); + } + /// + /// 教务-报名结果页面 + /// + /// + [HttpGet] + public ActionResult FinishIndex() + { + return View(); + } + #endregion + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuSelectLessonListOfElectiveOnlineIBLL.GetPageList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + + [HttpGet] + [AjaxOnly] + public ActionResult GetQueryStuSelectResultList(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuSelectLessonListOfElectiveOnlineIBLL.GetQueryStuSelectResultList(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetFormData(string keyValue) + { + var StuSelectLessonListOfElectiveOnlineData = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineEntity(keyValue); + var jsonData = new + { + StuSelectLessonListOfElectiveOnline = StuSelectLessonListOfElectiveOnlineData, + }; + return Success(jsonData); + } + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult DeleteForm(string keyValue) + { + stuSelectLessonListOfElectiveOnlineIBLL.DeleteEntity(keyValue); + return Success("删除成功!"); + } + + [HttpPost] + [AjaxOnly] + public ActionResult Pass(string keyValue, string LIOEOId) + { + var stulist = keyValue.Split(','); + var olpentity = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(LIOEOId); + if (olpentity != null) + { + if (olpentity.StuNum + stulist.Length > olpentity.StuNumMax) + { + return Fail("当前选课人数已超出限制,请减少审批量!"); + } + else + { + stuSelectLessonListOfElectiveOnlineIBLL.Pass(stulist, olpentity); + } + } + else + { + return Fail("当前选课数据不存在!"); + } + return Success("操作成功!"); + } + /// + /// 批量拒绝【审核学生页面】 + /// + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult UnPass(string keyValue, string LIOEOId) + { + var stulist = keyValue.Split(','); + var olpentity = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(LIOEOId); + if (olpentity != null) + { + stuSelectLessonListOfElectiveOnlineIBLL.UnPass(stulist, olpentity); + } + else + { + return Fail("当前选课数据不存在!"); + } + return Success("操作成功!"); + } + /// + /// 批量拒绝【已审学生页面】 + /// + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult UnPassOfFinish(string keyValue, string LIOEOId) + { + var stulist = keyValue.Split(','); + var olpentity = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(LIOEOId); + if (olpentity != null) + { + stuSelectLessonListOfElectiveOnlineIBLL.UnPassOfFinish(stulist, olpentity); + } + else + { + return Fail("当前选课数据不存在!"); + } + return Success("操作成功!"); + } + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult SaveForm(string keyValue, string strEntity) + { + var sslleEntity = stuSelectLessonListOfElectiveOnlineIBLL.GetStuSelectLessonListOfElectiveOnlineEntity(keyValue); + if (sslleEntity == null) + { + return Fail("当前选课数据不存在!"); + } + var olpeEntity = lessonInfoOfElectiveOnlineIBLL.GetLessonInfoOfElectiveOnlineEntity(sslleEntity.LIOEOId); + if (olpeEntity == null) + { + return Fail("当前选课的课程不存在!"); + } + + StuSelectLessonListOfElectiveOnlineEntity entity = strEntity.ToObject(); + var aa = entity.Status; + if (aa == 1)//是 + { + //判断选课的课程的报名人数是否已满 + if (olpeEntity.StuNum >= olpeEntity.StuNumMax) + { + return Fail("当前选课的课程人数已满!"); + } + //选课的课程报名人数加1 + olpeEntity.StuNum = olpeEntity.StuNum + 1; + lessonInfoOfElectiveOnlineIBLL.SaveEntity(olpeEntity.Id, olpeEntity); + //报名成功 + sslleEntity.Status = 2; + sslleEntity.Remark = entity.Remark; + } + else + { + //报名失败 + sslleEntity.Status = 3; + sslleEntity.Remark = entity.Remark; + } + stuSelectLessonListOfElectiveOnlineIBLL.SaveEntity(keyValue, sslleEntity); + return Success("保存成功!"); + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js index 9a7a9fd9f..35b735caa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/Index.js @@ -190,7 +190,7 @@ var bootstrap = function ($, learun) { mainId: 'Id', isPage: true, isMultiselect: true, - sidx: 'MakeDate desc' + sidx: 'AcademicYearNo DESC, Semester DESC, LessonNo ASC,EmpNo ASC' }); page.search(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/SetIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/SetIndex.js index 4b597e0a3..0e3b4eada 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/SetIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/SetIndex.js @@ -96,14 +96,18 @@ var bootstrap = function ($, learun) { } }); - //查看已审学生-----todo:待看 + //查看已审学生 $('#lr_view').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行查看!"); + return; + } learun.layerForm({ id: 'form', title: '查看学生', - url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/FinishIndex?OLPEId=' + keyValue, + url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/FinishIndex?LIOEOId=' + keyValue, width: 1000, height: 700, btn: null, @@ -113,14 +117,18 @@ var bootstrap = function ($, learun) { }); } }); - //审核学生------todo:待看 + //审核学生 $('#lr_audit').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行查看!"); + return; + } learun.layerForm({ id: 'form', title: '审核学生', - url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/AuditIndex?OLPEId=' + keyValue, + url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/AuditIndex?LIOEOId=' + keyValue, width: 1000, height: 700, btn: null, @@ -254,8 +262,7 @@ var bootstrap = function ($, learun) { mainId: 'Id', isPage: true, isMultiselect: true, - sidx: 'AcademicYearNo DESC, Semester DESC, LessonName ASC', - sord: 'desc' + sidx: 'AcademicYearNo DESC, Semester DESC, LessonNo ASC,EmpNo ASC' }); page.search(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/StudentIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/StudentIndex.cshtml new file mode 100644 index 000000000..010f2a4c5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/StudentIndex.cshtml @@ -0,0 +1,48 @@ +@{ + ViewBag.Title = "选课中心"; + Layout = "~/Views/Shared/_Index.cshtml"; +} + +
+
+
+
+
+
+
+
+
+
课程编号
+ +
+
+
课程名称
+ +
+
+
+
+ @*
+ 选课要求:至少需要选择3门不同的课程 +
*@ +
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/StudentIndex.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/StudentIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/StudentIndex.js new file mode 100644 index 000000000..a1be98ab5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/LessonInfoOfElectiveOnline/StudentIndex.js @@ -0,0 +1,213 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-05-14 10:02 + * 描 述:选课中心 + */ +var weekChina = ["一", "二", "三", "四", "五", "六", "日"]; +var refreshGirdData; +//点击课程名称 +function LessonIntroduction(lessonno) { + var html = ""; + top.learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/LessonInfo/GetLessonInfoEntityByLessonNo?lessonNo=' + lessonno, function (result) { + if (result.code == 200) { + if (result.data.Introduction == null) { + top.learun.alert.warning("暂无课程简介。"); + return; + } + html = result.data.Introduction; + layer.open({ + type: 1, + closeBtn: 2, + title: "课程简介", + area: ['800px', '60%'], + content: html + }); + } else { + top.learun.alert.warning("暂无课程简介。"); + } + }); +} +//点击教师名称 +function EmpIntroduction(empno) { + var html = ""; + top.learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/EmpInfo/GetEmpInfoEntityByEmpNo?empNo=' + empno, function (result) { + if (result.code == 200) { + if (result.data.resume == null) { + top.learun.alert.warning("暂无教师简介。"); + return; + } + html = result.data.resume; + layer.open({ + type: 1, + closeBtn: 2, + title: "教师简介", + area: ['800px', '60%'], + content: html + }); + } else { + top.learun.alert.warning("暂无教师简介。"); + } + }); +} +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + //是否为选课时间 + learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/IsSelectElectiveLesson', function (result) { + if (result.code == 200) {//选课还未开始 + learun.alert.warning("当前时间不是线上选课时间!"); + return; + } else {//选课已经开始 + page.initGird(); + } + }); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + //todo:待一个个查看 + + // 报名 + $('#lr_apply').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status == "1" || Status == "2") {//审核中、报名成功 + learun.alert.warning("系统不记录重复报名数据!"); + return false; + } + learun.layerConfirm('是否确认报名该课程!', function (res) { + if (res) { + //模式二: + var _postData = {}; + _postData.keyValue = keyValue; + _postData.StuNo = learun.clientdata.get(['userinfo']).enCode; + $.ajax({ + url: WebApiUrl + '/Learun/LessonInfoOfElectiveOnlineStudent/SignIn', + data: _postData, + type: "POST", + dataType: "json", + async: false, + cache: false, + success: function (res) { + if (res.code == 200) { + learun.loading(true, '正在提交报名数据'); + //判断队列结果 + var timer = setInterval(function () { + $.ajax({ + url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/GetApplyResult', + data: { keyValue: keyValue }, + type: "POST", + dataType: "json", + async: false, + cache: false, + success: function (res) { + if (res.code == 200) { + refreshGirdData(); + clearInterval(timer); + learun.loading(false); + learun.alert.warning(res.info); + } + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + learun.alert.warning("网络出错,请刷新!"); + }, + }); + }, 5000); + + } else { + learun.alert.warning("系统异常,请稍后!"); + return false; + } + }, + error: function (XMLHttpRequest, textStatus, errorThrown) { + learun.alert.warning("网络出错,请刷新!"); + }, + }); + + } + }); + } + }); + //取消报名 + $('#lr_cancel').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认取消报名该课程!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/CancelApply', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/LessonInfoOfElectiveOnline/GetPageListOfStudent', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 100, align: "left" }, + { label: "学期", name: "Semester", width: 100, align: "left" }, + { label: "课程编号", name: "LessonNo", width: 150, align: "left" }, + { label: "课程名称", name: "LessonName", width: 150, align: "left" }, + { label: "建课教师", name: "EmpName", width: 100, align: "left" }, + { + 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: 100, align: "left" }, + { label: "已报人数", name: "StuNumOfApply", width: 100, align: "left" }, + { + label: "报名状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == 1) { + return '审核中'; + } else if (cellvalue == 2) { + return '已报名'; + } else if (cellvalue == 3) { + return '报名失败'; + } else { + return '未报名'; + } + } + }, + ], + mainId: 'Id', + isPage: true, + sidx: 'AcademicYearNo DESC, Semester DESC, LessonNo ASC,EmpNo ASC' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StuNo = learun.clientdata.get(['userinfo']).enCode; + param.StuMajorNo = StuMajorNo; + param.StuGrade = StuGrade; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditForm.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditForm.cshtml new file mode 100644 index 000000000..e55a3a56f --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditForm.cshtml @@ -0,0 +1,15 @@ +@{ + ViewBag.Title = "选修课报名审核表单"; + Layout = "~/Views/Shared/_Form.cshtml"; +} +
+
+
审核通过
+
+
+
+
备注
+ +
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditForm.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditForm.js new file mode 100644 index 000000000..82a262036 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditForm.js @@ -0,0 +1,54 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-05-15 10:33 + * 描 述:选修课报名审核表单 + */ +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 () { + $('#Status').lrRadioCheckbox({ + type: 'radio', + code: 'YesOrNoInt', + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/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/StuSelectLessonListOfElectiveOnline/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditIndex.cshtml new file mode 100644 index 000000000..c55a31e59 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditIndex.cshtml @@ -0,0 +1,40 @@ +@{ + ViewBag.Title = "选修课报名审核"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学号
+ +
+
+
姓名
+ +
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditIndex.js new file mode 100644 index 000000000..eae4488f2 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/AuditIndex.js @@ -0,0 +1,156 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-05-15 10:33 + * 描 述:选修课报名审核 + */ +var refreshGirdData; +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); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + //审核 + $('#lr_audit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + if (keyValue.indexOf(',') != -1) { + learun.alert.warning("只能选择一条记录进行此操作!"); + return; + } + var status = $('#gridtable').jfGridValue('Status'); + if (status != 1) { + learun.alert.warning("当前项目已完成审核!"); + return; + } + learun.layerForm({ + id: 'StuSelectLessonListOfElectiveOnlineAuditform', + title: '审核', + url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/AuditForm?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + //批量审核通过 + $('#lr_auditpass').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认通过?', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/Pass', { keyValue: keyValue, LIOEOId: LIOEOId }, function () { + refreshGirdData(); + }); + } + }); + } + }); + //批量拒绝 + $('#lr_auditunpass').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认拒绝?', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/UnPass', { keyValue: keyValue, LIOEOId: LIOEOId }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetPageList', + headData: [ + { label: "学号", name: "StuNo", width: 100, align: "left" }, + { label: "姓名", name: "StuName", 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: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { + label: "报名状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == 1) { + return '审核中'; + } else if (cellvalue == 2) { + return '报名成功'; + } else if (cellvalue == 3) { + return '报名失败'; + } else { + return '未报名'; + } + } + }, + ], + mainId: 'Id', + isPage: true, + isMultiselect: true, + sidx: 'StuNo', + sord: 'asc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.Status = 1;//审核中 + param.LIOEOId = LIOEOId; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/FinishIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/FinishIndex.cshtml new file mode 100644 index 000000000..cc5f858b8 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/FinishIndex.cshtml @@ -0,0 +1,38 @@ +@{ + ViewBag.Title = "选修课报名结果统计"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学号
+ +
+
+
姓名
+ +
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/FinishIndex.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/FinishIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/FinishIndex.js new file mode 100644 index 000000000..74fc6a942 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/FinishIndex.js @@ -0,0 +1,105 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-05-15 10:33 + * 描 述:选修课报名结果统计 + */ +var refreshGirdData; +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); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + + //批量拒绝 + $('#lr_auditunpass').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认拒绝?', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/UnPassOfFinish', { keyValue: keyValue, LIOEOId: LIOEOId }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElectiveOnline/GetPageList', + headData: [ + { label: "学号", name: "StuNo", width: 100, align: "left"}, + { label: "姓名", name: "StuName", 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: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + ], + mainId:'Id', + isPage: true, + isMultiselect: true, + sidx: 'StuNo', + sord:'asc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.Status = 2;//报名成功 + param.LIOEOId = LIOEOId; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/Index.cshtml new file mode 100644 index 000000000..26676a0c3 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/Index.cshtml @@ -0,0 +1,39 @@ +@{ + ViewBag.Title = "选修课课程"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+ +
+
+
学期
+ +
+
+
+
+
+ 选课要求:至少需要选择3门不同的课程 +
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/Index.js") + diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/Index.js new file mode 100644 index 000000000..397842faa --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/Index.js @@ -0,0 +1,178 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-05-15 10:33 + * 描 述:选修课课程 + */ +var weekChina = ["一", "二", "三", "四", "五", "六", "日"]; +var refreshGirdData; +//点击课程名称 +function LessonIntroduction(lessonno) { + var html = ""; + top.learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/LessonInfo/GetLessonInfoEntityByLessonNo?lessonNo=' + lessonno, function (result) { + if (result.code == 200) { + if (result.data.Introduction == null) { + top.learun.alert.warning("暂无课程简介。"); + return; + } + html = result.data.Introduction; + layer.open({ + type: 1, + closeBtn: 2, + title: "课程简介", + area: ['800px', '60%'], + content: html + }); + } else { + top.learun.alert.warning("暂无课程简介。"); + } + }); +} +//点击教师名称 +function EmpIntroduction(empno) { + var html = ""; + top.learun.httpAsyncGet(top.$.rootUrl + '/EducationalAdministration/EmpInfo/GetEmpInfoEntityByEmpNo?empNo=' + empno, function (result) { + if (result.code == 200) { + if (result.data.resume == null) { + top.learun.alert.warning("暂无教师简介。"); + return; + } + html = result.data.resume; + layer.open({ + type: 1, + closeBtn: 2, + title: "教师简介", + area: ['800px', '60%'], + content: html + }); + } else { + top.learun.alert.warning("暂无教师简介。"); + } + }); +} +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); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetPageList', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 100, align: "left"}, + { label: "学期", name: "Semester", width: 100, align: "left"}, + { + label: "课程名称", name: "LessonName", width: 200, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', + key: row.LessonNo, + keyId: 'lessonno', + callback: function (_data) { + //callback(_data['lessonname']); + callback('' + _data['lessonname'] + ''); + } + }); + } + }, + { + label: "课程类型", name: "LessonTypeId", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + console.log(row.LessonTypeId); + + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdLessonType', + key: row.LessonTypeId, + keyId: 'ltid', + callback: function (_data) { + callback(_data['lessontypename']); + } + }); + } + }, + { + label: "上课节次", name: "LessonSection", width: 150, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue.indexOf(',') == -1) + return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; + else + return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; + } + }, + { label: "上课时间", name: "LessonTime", width: 180, align: "left" }, + { label: "学分", name: "StudyScore", width: 80, align: "left" }, + { + label: "教师姓名", name: "EmpName", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: row.EmpNo, + keyId: 'empno', + callback: function (_data) { + //callback(_data['empname']); + callback('' + _data['empname'] + ''); + } + }); + } + }, + { + label: "教室名称", name: "ClassRoomNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo', + key: value, + keyId: 'classroomno', + callback: function (_data) { + callback(_data['classroomname']); + } + }); + } + }, + { label: "开始周", name: "StartWeek", width: 80, align: "left"}, + { label: "结束周", name: "EndWeek", width: 80, align: "left"}, + { label: "开始日期", name: "StartDate", width: 100, align: "left"}, + { label: "结束日期", name: "EndDate", width: 100, align: "left" }, + { + label: "报名状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == 1) { + return '审核中'; + } else if (cellvalue == 2) { + return '报名成功'; + } else if (cellvalue == 3) { + return '报名失败'; + } else { + return '未报名'; + } + } + }, + { label: "备注", name: "Remark", width: 100, align: "left"}, + ], + mainId:'Id', + isPage: true + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.StuNo = learun.clientdata.get(['userinfo']).enCode; + $('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResult.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResult.cshtml new file mode 100644 index 000000000..0114ad8b1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResult.cshtml @@ -0,0 +1,67 @@ +@{ + ViewBag.Title = "选修课课程"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
校区
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
教师
+
+
+
+
选修课程
+
+
+
+
选课状态
+
+
+
+
报名状态
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResult.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResult.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResult.js new file mode 100644 index 000000000..51b1447b5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResult.js @@ -0,0 +1,226 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-05-15 10:33 + * 描 述:选修课课程 + */ +var weekChina = ["一", "二", "三", "四", "五", "六", "日"]; +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + if ($("#AcademicYearNo").lrselectGet() == "" || $("#AcademicYearNo").lrselectGet() == null || $("#AcademicYearNo").lrselectGet() == undefined) { + top.learun.alert.warning("请先选择学年!"); + return false; + } + if ($("#Semester").lrselectGet() == "" || $("#Semester").lrselectGet() == null || $("#Semester").lrselectGet() == undefined) { + top.learun.alert.warning("请先选择学期!"); + return; + } + page.search(queryJson); + }, 330, 400); + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#ElectiveSelectStatus').lrDataItemSelect({ code: 'ElectiveSelectStatus' }); + $('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' }); + $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname' }); + $('#LessonNo').lrselect({ + allowSearch: true, + url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable?code=LessonInfo', + param: { strWhere: "1=1 AND LessonSortNo='2' " }, + value: "lessonno", + text: "lessonname" + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, + { label: "学期", name: "Semester", width: 60, align: "left" }, + { + 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: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { label: "学号", name: "StuNo", width: 100, align: "left" }, + { label: "姓名", name: "StuName", width: 100, align: "left" }, + { + label: "性别", name: "GenderNo", width: 80, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "男" : "女"; + } + }, + { + label: "选课状态", name: "Id", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == null || cellvalue == undefined || cellvalue == "") { + return '未报名'; + } else { + return '已报名'; + } + } + }, + { + label: "报名状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == 1) { + return '审核中'; + } else if (cellvalue == 2) { + return '报名成功'; + } else if (cellvalue == 3) { + return '报名失败'; + } else { + return '未报名'; + } + } + }, + { label: "所选课程号", name: "LessonNo", width: 100, align: "left" }, + { + label: "所选课程名称", name: "LessonName", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', + key: row.LessonNo, + keyId: 'lessonno', + callback: function (_data) { + callback(_data['lessonname']); + } + }); + } + }, + { label: "课程学分", name: "StudyScore", width: 100, align: "left" }, + { label: "教师编号", name: "EmpNo", width: 100, align: "left" }, + { + label: "教师姓名", name: "EmpName", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: row.EmpNo, + keyId: 'empno', + callback: function (_data) { + callback(_data['empname']); + } + }); + } + }, + { + label: "上课节次", name: "LessonSection", width: 150, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue != "" && cellvalue != undefined && cellvalue != null) { + if (cellvalue.indexOf(',') == -1) { + return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; + } else { + return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; + } + } + } + }, + { label: "上课时间", name: "LessonTime", width: 180, align: "left" }, + { + label: "教室名称", name: "ClassRoomName", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo', + key: row.ClassRoomNo, + keyId: 'classroomno', + callback: function (_data) { + callback(_data['classroomname']); + } + }); + } + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'StuId', + isPage: true, + sidx: 'StuNo', + sord: 'asc' + }); + }, + search: function (param) { + param = param || {}; + //param.SqlParameter = " and a.ChangeStatus<>1 "; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.cshtml new file mode 100644 index 000000000..f7c8f9b3c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.cshtml @@ -0,0 +1,59 @@ +@{ + ViewBag.Title = "选修课课程"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
校区
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
班级
+
+
+
+
选课状态
+
+
+
+
报名状态
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/QueryStuSelectResultForTeacher.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.js new file mode 100644 index 000000000..a773bbc7e --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectiveOnline/QueryStuSelectResultForTeacher.js @@ -0,0 +1,218 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-05-15 10:33 + * 描 述:选修课课程 + */ +var weekChina = ["一", "二", "三", "四", "五", "六", "日"]; +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + if ($("#AcademicYearNo").lrselectGet() == "" || $("#AcademicYearNo").lrselectGet() == null || $("#AcademicYearNo").lrselectGet() == undefined) { + top.learun.alert.warning("请先选择学年!"); + return false; + } + if ($("#Semester").lrselectGet() == "" || $("#Semester").lrselectGet() == null || $("#Semester").lrselectGet() == undefined) { + top.learun.alert.warning("请先选择学期!"); + return; + } + page.search(queryJson); + }, 300, 400); + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); + $('#ElectiveSelectStatus').lrDataItemSelect({ code: 'ElectiveSelectStatus' }); + $('#ElectiveSignUpStatus').lrDataItemSelect({ code: 'ElectiveSignUpStatus' }); + $('#F_SchoolId').lrDataSourceSelect({ code: 'company', value: 'f_companyid', text: 'f_fullname' }); + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuSelectLessonListOfElective/GetQueryStuSelectResultList', + headData: [ + { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, + { label: "学期", name: "Semester", width: 60, align: "left" }, + { + 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: "MajorNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo', + key: value, + keyId: 'majorno', + callback: function (_data) { + callback(_data['majorname']); + } + }); + } + }, + { + label: "班级", name: "ClassNo", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } + }, + { label: "学号", name: "StuNo", width: 100, align: "left" }, + { label: "姓名", name: "StuName", width: 100, align: "left" }, + { + label: "性别", name: "GenderNo", width: 80, align: "left", + formatter: function (cellvalue) { + return cellvalue == true ? "男" : "女"; + } + }, + { + label: "选课状态", name: "Id", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == null || cellvalue == undefined || cellvalue == "") { + return '未报名'; + } else { + return '已报名'; + } + } + }, + { + label: "报名状态", name: "Status", width: 100, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue == 1) { + return '审核中'; + } else if (cellvalue == 2) { + return '报名成功'; + } else if (cellvalue == 3) { + return '报名失败'; + } else { + return '未报名'; + } + } + }, + { label: "所选课程号", name: "LessonNo", width: 100, align: "left" }, + { + label: "所选课程名称", name: "LessonName", width: 150, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', + key: row.LessonNo, + keyId: 'lessonno', + callback: function (_data) { + callback(_data['lessonname']); + } + }); + } + }, + { label: "课程学分", name: "StudyScore", width: 100, align: "left" }, + { label: "教师编号", name: "EmpNo", width: 100, align: "left" }, + { + label: "教师姓名", name: "EmpName", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo', + key: row.EmpNo, + keyId: 'empno', + callback: function (_data) { + callback(_data['empname']); + } + }); + } + }, + { + label: "上课节次", name: "LessonSection", width: 150, align: "left", + formatter: function (cellvalue, row) { + if (cellvalue != "" && cellvalue != undefined && cellvalue != null) { + if (cellvalue.indexOf(',') == -1) { + return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1) + "节"; + } else { + return "星期" + weekChina[cellvalue.slice(0, 1) - 1] + "第" + cellvalue.slice(1, 2) + "、" + cellvalue.slice(4) + "节"; + } + } + } + }, + { label: "上课时间", name: "LessonTime", width: 180, align: "left" }, + { + label: "教室名称", name: "ClassRoomName", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'ClassRoomInfo', + key: row.ClassRoomNo, + keyId: 'classroomno', + callback: function (_data) { + callback(_data['classroomname']); + } + }); + } + }, + { label: "备注", name: "Remark", width: 100, align: "left" }, + ], + mainId: 'StuId', + isPage: true, + sidx: 'StuNo', + sord: 'asc' + }); + }, + search: function (param) { + param = param || {}; + param.EmpNo = learun.clientdata.get(['userinfo']).enCode; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj index 39d789100..ec299f091 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj @@ -340,6 +340,7 @@ + @@ -1011,6 +1012,7 @@ + @@ -1028,6 +1030,12 @@ + + + + + + @@ -8197,6 +8205,13 @@ + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuSelectLessonListOfElectiveOnlineMap.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuSelectLessonListOfElectiveOnlineMap.cs new file mode 100644 index 000000000..025683138 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/EducationalAdministration/StuSelectLessonListOfElectiveOnlineMap.cs @@ -0,0 +1,29 @@ +using Learun.Application.TwoDevelopment.EducationalAdministration; +using System.Data.Entity.ModelConfiguration; + +namespace Learun.Application.Mapping +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-05-15 10:33 + /// 描 述:选修课课程 + /// + public class StuSelectLessonListOfElectiveOnlineMap : EntityTypeConfiguration + { + public StuSelectLessonListOfElectiveOnlineMap() + { + #region 表、主键 + //表 + this.ToTable("STUSELECTLESSONLISTOFELECTIVEONLINE"); + //主键 + this.HasKey(t => t.Id); + #endregion + + #region 配置关系 + #endregion + } + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj index e5d6c0d64..5ce5ca424 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Mapping/Learun.Application.Mapping.csproj @@ -113,6 +113,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs index c4e94b75a..72141cac2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_FixAssets/Ass_FixAssetsService.cs @@ -109,6 +109,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem dp.Add("DepreciationStatus", queryParam["DepreciationStatus"].ToString(), DbType.String); strSql.Append(" AND t.DepreciationStatus = @DepreciationStatus "); } + if (!queryParam["Status"].IsEmpty()) + { + dp.Add("Status", queryParam["Status"].ToString(), DbType.String); + strSql.Append(" AND t.Status = @Status "); + } //判断是否是普通教师的列表:若是,则二级判断;若不是,则无; //二级判断登录用户是否是部门负责人:若是,则使用部门=本部门,或者使用人=本人;若不是,则使用人=本人; diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineBLL.cs index 508473bcd..361a4f58f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineBLL.cs @@ -67,6 +67,55 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取LessonInfoOfElectiveOnline表实体数据 + /// + /// 主键 + /// + public LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntityByLessonNo(string lessonNo) + { + try + { + return lessonInfoOfElectiveOnlineService.GetLessonInfoOfElectiveOnlineEntityByLessonNo(lessonNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取页面显示列表数据【学子在线-线上课程选课】 + /// + /// 分页参数 + /// 查询参数 + /// + public IEnumerable GetPageListOfStudent(Pagination pagination, string queryJson) + { + try + { + return lessonInfoOfElectiveOnlineService.GetPageListOfStudent(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion #region 提交数据 @@ -194,6 +243,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取选课时间管理 + /// + /// + public EADateArrangeEntity GetEADateArrangeEntityAboutElective() + { + try + { + return lessonInfoOfElectiveOnlineService.GetEADateArrangeEntityAboutElective(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineEntity.cs index 48669b63d..9468ab5b2 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineEntity.cs @@ -281,6 +281,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration ///
[NotMapped] public List ElectiveMajorOnlineList { get; set; } + + [NotMapped] + public string StuNo { get; set; } + [NotMapped] + public string StuName { get; set; } + /// + /// 报名状态 + /// + [NotMapped] + public int Status { get; set; } #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineIBLL.cs index 74258cac0..75fc6d7ba 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineIBLL.cs @@ -27,6 +27,20 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 主键 /// LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntity(string keyValue); + + /// + /// 获取LessonInfoOfElectiveOnline表实体数据 + /// + /// 主键 + /// + LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntityByLessonNo(string lessonNo); + /// + /// 获取页面显示列表数据【学子在线-线上课程选课】 + /// + /// 分页参数 + /// 查询参数 + /// + IEnumerable GetPageListOfStudent(Pagination pagination, string queryJson); #endregion #region 提交数据 @@ -66,6 +80,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// void SaveStuNumMax(string keyValue, int StuNumMax); + /// + /// 获取选课时间管理 + /// + /// + EADateArrangeEntity GetEADateArrangeEntityAboutElective(); + #endregion } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineService.cs index c65972529..fbe4acb69 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfoOfElectiveOnline/LessonInfoOfElectiveOnlineService.cs @@ -108,7 +108,131 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { try { - return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + var opeentity = BaseRepository("CollegeMIS").FindEntity(keyValue); + if (opeentity != null) + { + //模式二:正式选课 + var aa = this.BaseRepository("CollegeMIS").FindList(x => x.LIOEOId == opeentity.Id); + //已报名人数 + opeentity.StuNumOfApply = aa.Where(x => (x.Status == 1 || x.Status == 2)).Count(); + } + return opeentity; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取LessonInfoOfElectiveOnline表实体数据 + /// + /// 主键 + /// + public LessonInfoOfElectiveOnlineEntity GetLessonInfoOfElectiveOnlineEntityByLessonNo(string lessonNo) + { + try + { + return BaseRepository("CollegeMIS").FindEntity(x => x.LessonNo == lessonNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取页面显示列表数据【学子在线-线上课程选课】 + /// + /// 查询参数 + /// + public IEnumerable GetPageListOfStudent(Pagination pagination, string queryJson) + { + try + { + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + //学号 + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + } + //教学工作安排中“线上选课”工作设置的学年学期 + var now = DateTime.Now; + var EADateArrangeEntityAboutElective = this.BaseRepository("CollegeMIS").FindEntity(x => x.WorkName == "线上选课" && x.MakeDate <= now && x.EndDate >= now && x.CheckMark == "1"); + if (EADateArrangeEntityAboutElective == null) + { + return new List(); + } + + var strSql = new StringBuilder(); + strSql.Append(@"select b.*,c.StuNo,c.StuName,c.Status from ElectiveMajorOnline a + left join LessonInfoOfElectiveOnline b on a.LIOEOId=b.Id + left join StuSelectLessonListOfElectiveOnline c on b.Id=c.LIOEOId and c.StuNo=@StuNo + where not exists ( "); + //不显示与已选课程 相同课程名称相同教师的课程 + strSql.Append(" select * from StuSelectLessonListOfElectiveOnline s where s.AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and s.Semester='" + EADateArrangeEntityAboutElective.Semester + "' and s.StuNo=@StuNo and s.Status <>3 and s.LessonName=b.LessonName and s.EmpNo=b.EmpNo and s.LIOEOId!=b.Id "); + strSql.Append(" ) "); + //管理选课专业不为空 + strSql.Append(" and a.MajorId is not null and a.Grade is not null "); + strSql.Append(" AND b.CheckMark='1' "); + strSql.Append(" AND b.AcademicYearNo='" + EADateArrangeEntityAboutElective?.AcademicYearNo + "' and b.Semester='" + EADateArrangeEntityAboutElective?.Semester + "' "); + //学生选课显示‘是否可选’为‘是’的课程信息 + strSql.Append(" and b.IsAllowSelect=1 "); + if (!queryParam["StuMajorNo"].IsEmpty()) + { + dp.Add("StuMajorNo", queryParam["StuMajorNo"].ToString(), DbType.String); + strSql.Append(" and a.MajorId=@StuMajorNo "); + } + else + { + strSql.Append(" and a.MajorId='' "); + } + if (!queryParam["StuGrade"].IsEmpty()) + { + dp.Add("StuGrade", queryParam["StuGrade"].ToString(), DbType.String); + strSql.Append(" and a.Grade=@StuGrade "); + } + else + { + strSql.Append(" and a.Grade='' "); + } + + if (!queryParam["LessonNo"].IsEmpty()) + { + dp.Add("LessonNo", "%" + queryParam["LessonNo"].ToString() + "%", DbType.String); + strSql.Append(" AND b.LessonNo like @LessonNo "); + } + if (!queryParam["LessonName"].IsEmpty()) + { + dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); + strSql.Append(" AND b.LessonName Like @LessonName "); + } + var list = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + foreach (var item in list) + { + //模式二:正式选课 + var aa = this.BaseRepository("CollegeMIS").FindList(x => x.LIOEOId == item.Id); + //已报名人数 + item.StuNumOfApply = aa.Where(x => (x.Status == 1 || x.Status == 2)).Count(); + + } + return list; } catch (Exception ex) { @@ -217,7 +341,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration keyValue = string.Join("','", keyValue.Split(',')); } - string sql = $"update LessonInfoOfElectiveOnline set IsAllowSelect='{status}' where Id in ('{keyValue}')"; + string sql = $"update LessonInfoOfElectiveOnline set CheckMark='{status}' where Id in ('{keyValue}')"; this.BaseRepository("CollegeMIS").ExecuteBySql(sql); } catch (Exception ex) @@ -291,6 +415,34 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 获取选课时间管理 + /// + /// + public EADateArrangeEntity GetEADateArrangeEntityAboutElective() + { + try + { + var semesterAndYear = Common.GetSemesterAndYear(); + var strAcademicYear = semesterAndYear.AcademicYearShort; + var strSemester = semesterAndYear.Semester; + var now = DateTime.Now; + //不判断学年学期 + return this.BaseRepository("CollegeMIS").FindEntity(x => x.WorkName == "线上选课" && x.MakeDate <= now && x.EndDate >= now && x.CheckMark == "1"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineBLL.cs new file mode 100644 index 000000000..bfcb33704 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineBLL.cs @@ -0,0 +1,309 @@ +using Learun.Util; +using System; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-05-15 10:33 + /// 描 述:选修课课程 + /// + public class StuSelectLessonListOfElectiveOnlineBLL : StuSelectLessonListOfElectiveOnlineIBLL + { + private StuSelectLessonListOfElectiveOnlineService stuSelectLessonListOfElectiveService = new StuSelectLessonListOfElectiveOnlineService(); + + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + return stuSelectLessonListOfElectiveService.GetPageList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntity(string keyValue) + { + try + { + return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + stuSelectLessonListOfElectiveService.DeleteEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, StuSelectLessonListOfElectiveOnlineEntity entity) + { + try + { + stuSelectLessonListOfElectiveService.SaveEntity(keyValue, entity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + #endregion + + #region 扩展数据 + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(string stuno, string olpeid) + { + try + { + return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(stuno, olpeid); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + + public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByLessonInfo(string lessonNo, string lessonTime, string stuNo) + { + try + { + return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineEntityByLessonInfo(lessonNo, lessonTime, stuNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + public IEnumerable GetStuSelectLessonListOfElectiveOnlineListByStuNo(string stuno) + { + try + { + return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineListByStuNo(stuno); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetQueryStuSelectResultList(Pagination pagination, string queryJson) + { + try + { + return stuSelectLessonListOfElectiveService.GetQueryStuSelectResultList(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public void Pass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) + { + try + { + stuSelectLessonListOfElectiveService.Pass(stulist, olpentity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public void UnPass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) + { + try + { + stuSelectLessonListOfElectiveService.UnPass(stulist, olpentity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + public void UnPassOfFinish(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) + { + try + { + stuSelectLessonListOfElectiveService.UnPassOfFinish(stulist, olpentity); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + public IEnumerable GetAllElectiveLesson(string academicYearNo, string semester) + { + try + { + return stuSelectLessonListOfElectiveService.GetAllElectiveLesson(academicYearNo, semester); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + public IEnumerable GetStuSelectLessonListOfElectiveOnlineListByOLPEId(string olpeid) + { + try + { + return stuSelectLessonListOfElectiveService.GetStuSelectLessonListOfElectiveOnlineListByOLPEId(olpeid); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion + + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineEntity.cs new file mode 100644 index 000000000..bd3681776 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineEntity.cs @@ -0,0 +1,229 @@ +using Learun.Util; +using System; +using System.ComponentModel.DataAnnotations.Schema; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-05-15 10:33 + /// 描 述:选修课课程 + /// + public class StuSelectLessonListOfElectiveOnlineEntity + { + #region 实体成员 + /// + /// Id + /// + [Column("ID")] + public string Id { get; set; } + /// + /// LIOEOId + /// + [Column("LIOEOID")] + public string LIOEOId { get; set; } + /// + /// NoticeBookNo + /// + [Column("NOTICEBOOKNO")] + public string NoticeBookNo { get; set; } + /// + /// StuNo + /// + [Column("STUNO")] + public string StuNo { get; set; } + /// + /// DeptNo + /// + [Column("DEPTNO")] + public string DeptNo { get; set; } + /// + /// MajorNo + /// + [Column("MAJORNO")] + public string MajorNo { get; set; } + /// + /// ClassNo + /// + [Column("CLASSNO")] + public string ClassNo { get; set; } + /// + /// MajorDetailNo + /// + [Column("MAJORDETAILNO")] + public string MajorDetailNo { get; set; } + /// + /// MajorDetailName + /// + [Column("MAJORDETAILNAME")] + public string MajorDetailName { get; set; } + /// + /// StuName + /// + [Column("STUNAME")] + public string StuName { get; set; } + /// + /// GenderNo + /// + [Column("GENDERNO")] + public bool? GenderNo { get; set; } + /// + /// Grade + /// + [Column("GRADE")] + public string Grade { get; set; } + /// + /// AcademicYearNo + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// Semester + /// + [Column("SEMESTER")] + public string Semester { get; set; } + /// + /// LessonNo + /// + [Column("LESSONNO")] + public string LessonNo { get; set; } + /// + /// LessonName + /// + [Column("LESSONNAME")] + public string LessonName { get; set; } + /// + /// LessonSortNo + /// + [Column("LESSONSORTNO")] + public string LessonSortNo { get; set; } + /// + /// LessonSection + /// + [Column("LESSONSECTION")] + public string LessonSection { get; set; } + /// + /// LessonTime + /// + [Column("LESSONTIME")] + public string LessonTime { get; set; } + /// + /// EmpNo + /// + [Column("EMPNO")] + public string EmpNo { get; set; } + /// + /// EmpName + /// + [Column("EMPNAME")] + public string EmpName { get; set; } + /// + /// ClassRoomNo + /// + [Column("CLASSROOMNO")] + public string ClassRoomNo { get; set; } + /// + /// ClassRoomName + /// + [Column("CLASSROOMNAME")] + public string ClassRoomName { get; set; } + /// + /// StudyScore + /// + [Column("STUDYSCORE")] + public decimal? StudyScore { get; set; } + /// + /// StartWeek + /// + [Column("STARTWEEK")] + public int? StartWeek { get; set; } + /// + /// EndWeek + /// + [Column("ENDWEEK")] + public int? EndWeek { get; set; } + /// + /// StartDate + /// + [Column("STARTDATE")] + public DateTime? StartDate { get; set; } + /// + /// EndDate + /// + [Column("ENDDATE")] + public DateTime? EndDate { get; set; } + /// + /// CreateTime + /// + [Column("CREATETIME")] + public DateTime? CreateTime { get; set; } + /// + /// Remark + /// + [Column("REMARK")] + public string Remark { get; set; } + /// + /// Status:1审核中,2报名成功,3报名失败 + /// + [Column("STATUS")] + public int? Status { get; set; } + + /// + /// F_SchoolId + /// + [Column("F_SCHOOLID")] + public string F_SchoolId { get; set; } + /// + /// OrdinaryScoreScale + /// + [Column("ORDINARYSCORESCALE")] + public decimal? OrdinaryScoreScale { get; set; } + /// + /// TermInScoreScale + /// + [Column("TERMINSCORESCALE")] + public decimal? TermInScoreScale { get; set; } + /// + /// TermEndScoreScale + /// + [Column("TERMENDSCORESCALE")] + public decimal? TermEndScoreScale { get; set; } + /// + /// OtherScoreScale + /// + [Column("OTHERSCORESCALE")] + public decimal? OtherScoreScale { get; set; } + #endregion + + #region 扩展操作 + /// + /// 新增调用 + /// + public void Create() + { + this.Id = Guid.NewGuid().ToString(); + } + /// + /// 编辑调用 + /// + /// + public void Modify(string keyValue) + { + this.Id = keyValue; + } + #endregion + #region 扩展字段 + [NotMapped] public string LessonTypeId { get; set; } + /// + /// 已报名人数 + /// + [NotMapped] + public int? StuNumOfApply { get; set; } + [NotMapped] + public int? StuNumMax { get; set; } + #endregion + } +} + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineIBLL.cs new file mode 100644 index 000000000..7be9d24be --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineIBLL.cs @@ -0,0 +1,76 @@ +using Learun.Util; +using System.Data; +using System.Collections.Generic; + +namespace Learun.Application.TwoDevelopment.EducationalAdministration +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-05-15 10:33 + /// 描 述:选修课课程 + /// + public interface StuSelectLessonListOfElectiveOnlineIBLL + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageList(Pagination pagination, string queryJson); + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntity(string keyValue); + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + void DeleteEntity(string keyValue); + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + void SaveEntity(string keyValue, StuSelectLessonListOfElectiveOnlineEntity entity); + #endregion + + #region 扩展数据 + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(string stuno, string olpeid); + StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByLessonInfo(string lessonNo, string lessonTime, string account); + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + IEnumerable GetStuSelectLessonListOfElectiveOnlineListByStuNo(string stuno); + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + IEnumerable GetStuSelectLessonListOfElectiveOnlineListByOLPEId(string olpeid); + #endregion + + IEnumerable GetQueryStuSelectResultList(Pagination pagination, string queryJson); + void Pass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity); + void UnPass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity); + void UnPassOfFinish(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity); + IEnumerable GetAllElectiveLesson(string academicYearNo, string semester); + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineService.cs new file mode 100644 index 000000000..f8c1a4ac4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElectiveOnline/StuSelectLessonListOfElectiveOnlineService.cs @@ -0,0 +1,554 @@ +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 +{ + /// + /// 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园 + /// Copyright (c) 2013-2018 北京泉江科技有限公司 + /// 创 建:超级管理员 + /// 日 期:2019-05-15 10:33 + /// 描 述:选修课课程 + /// + public class StuSelectLessonListOfElectiveOnlineService : RepositoryFactory + { + #region 获取数据 + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageList(Pagination pagination, string queryJson) + { + try + { + var strSql = new StringBuilder(); + strSql.Append("SELECT t.*,b.StuNumMax,b.StuNum "); + strSql.Append(" FROM StuSelectLessonListOfElectiveOnline t left join LessonInfoOfElectiveOnline b on t.LIOEOId=b.id "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", "%" + queryParam["AcademicYearNo"].ToString() + "%", DbType.String); + strSql.Append(" AND t.AcademicYearNo Like @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); + strSql.Append(" AND t.LessonNo = @LessonNo "); + } + if (!queryParam["LessonName"].IsEmpty()) + { + dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.LessonName Like @LessonName "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); + strSql.Append(" AND t.EmpNo = @EmpNo "); + } + if (!queryParam["EmpName"].IsEmpty()) + { + dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.EmpName Like @EmpName "); + } + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + + if (!queryParam["Status"].IsEmpty()) + { + dp.Add("Status", queryParam["Status"].ToInt(), DbType.Int32); + strSql.Append(" AND t.Status = @Status "); + } + if (!queryParam["LIOEOId"].IsEmpty()) + { + dp.Add("LIOEOId", queryParam["LIOEOId"].ToString(), DbType.String); + strSql.Append(" AND t.LIOEOId = @LIOEOId "); + } + var list= this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + foreach (var item in list) + { + //模式二:正式选课 + var aa = this.BaseRepository("CollegeMIS").FindList(x => x.LIOEOId == item.LIOEOId); + //已报名人数 + item.StuNumOfApply = aa.Where(x => (x.Status == 1 || x.Status == 2)).Count(); + } + + return list; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntity(string keyValue) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 提交数据 + + /// + /// 删除实体数据 + /// 主键 + /// + /// + public void DeleteEntity(string keyValue) + { + try + { + this.BaseRepository("CollegeMIS").Delete(t => t.Id == keyValue); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 保存实体数据(新增、修改) + /// 主键 + /// + /// + public void SaveEntity(string keyValue, StuSelectLessonListOfElectiveOnlineEntity 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); + } + } + } + + public void Pass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) + { + var db = BaseRepository("CollegeMIS"); + try + { + db.BeginTrans(); + foreach (var item in stulist) + { + db.ExecuteBySql("update StuSelectLessonListOfElectiveOnline set Status=2 where Id='" + item + "'"); + } + olpentity.StuNum += stulist.Length; + db.Update(olpentity); + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public void UnPass(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) + { + var db = BaseRepository("CollegeMIS"); + try + { + db.BeginTrans(); + foreach (var item in stulist) + { + db.ExecuteBySql("update StuSelectLessonListOfElectiveOnline set Status=3 where Id='" + item + "'"); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + public void UnPassOfFinish(string[] stulist, LessonInfoOfElectiveOnlineEntity olpentity) + { + var db = BaseRepository("CollegeMIS"); + try + { + db.BeginTrans(); + int count = 0;//待拒绝学生数量 + foreach (var item in stulist) + { + var model = db.FindEntity(item); + if (model != null) + { + count++; + db.ExecuteBySql("update StuSelectLessonListOfElectiveOnline set Status=3 where Id='" + item + "'"); + } + } + //修改LessonInfoOfElectiveOnline通过人数 + if (count > 0) + { + olpentity.StuNum = olpentity.StuNum - count; + db.Update(olpentity); + } + db.Commit(); + } + catch (Exception ex) + { + db.Rollback(); + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + #endregion + + #region 扩展数据 + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByStuNo(string stuno, string olpeid) + { + try + { + //本学年本学期 + var semesterAndYear = Common.GetSemesterAndYear(); + var strAcademicYear = semesterAndYear.AcademicYearShort; + var strSemester = semesterAndYear.Semester; + var data = new StuSelectLessonListOfElectiveOnlineEntity(); + if (string.IsNullOrEmpty(olpeid)) + { + data = this.BaseRepository("CollegeMIS").FindEntity(x => x.StuNo == stuno && x.AcademicYearNo == strAcademicYear && x.Semester == strSemester); + } + else + { + data = this.BaseRepository("CollegeMIS").FindEntity(x => x.StuNo == stuno && x.LIOEOId == olpeid); + } + return data; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + public StuSelectLessonListOfElectiveOnlineEntity GetStuSelectLessonListOfElectiveOnlineEntityByLessonInfo(string lessonNo, string lessonTime, string stuNo) + { + try + { + return this.BaseRepository("CollegeMIS").FindEntity(x => x.LessonNo == lessonNo && x.LessonSection == lessonTime && x.StuNo == stuNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + public IEnumerable GetStuSelectLessonListOfElectiveOnlineListByStuNo(string stuno) + { + try + { + return this.BaseRepository("CollegeMIS").FindList(x => x.StuNo == stuno); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + /// + /// 获取StuSelectLessonListOfElectiveOnline表实体数据 + /// 主键 + /// + /// + public IEnumerable GetStuSelectLessonListOfElectiveOnlineListByOLPEId(string olpeid) + { + try + { + return this.BaseRepository("CollegeMIS").FindList(x => x.LIOEOId == olpeid); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + + #endregion + + public IEnumerable GetQueryStuSelectResultList(Pagination pagination, string queryJson) + { + try + { + var queryParam = queryJson.ToJObject(); + var strSql = new StringBuilder(); + strSql.Append("select a.StuNo,a.StuName,a.GenderNo,a.DeptNo,a.MajorNo,a.F_SchoolId,a.ClassNo,b.remark,b.Status,b.Id,"); + strSql.Append("'" + queryParam["AcademicYearNo"].ToString() + "' as AcademicYearNo,'" + queryParam["Semester"].ToString() + "' as Semester,"); + //strSql.Append("b.AcademicYearNo,b.Semester,"); + strSql.Append("c.LessonSection,c.LessonTime,c.StudyScore,c.LessonNo,c.LessonName,c.EmpNo,c.EmpName,c.ClassRoomNo,c.ClassRoomName"); + //strSql.Append(@"c.LessonSection,c.LessonTime,c.StudyScore,c.LessonNo,c.LessonName,c.EmpNo,c.EmpName,c.ClassRoomNo,c.ClassRoomName from stuinfobasic a + //left join StuSelectLessonListOfElectiveOnline + // b on a.stuno = b.stuno left join LessonInfoOfElectiveOnline c + //on b.OLPEId = c.Id AND c.AcademicYearNo = '" + queryParam["AcademicYearNo"].ToString() + "' AND c.Semester = '" + queryParam["Semester"].ToString() + "' "); + strSql.Append(" from stuinfobasic a"); + strSql.Append(" left join StuSelectLessonListOfElectiveOnline b on a.stuno = b.stuno and b.AcademicYearNo = '" + queryParam["AcademicYearNo"].ToString() + "' AND b.Semester = '" + queryParam["Semester"].ToString() + "' "); + strSql.Append(" left join LessonInfoOfElectiveOnline c on b.OLPEId = c.Id and c.AcademicYearNo = '" + queryParam["AcademicYearNo"].ToString() + "' AND c.Semester = '" + queryParam["Semester"].ToString() + "' "); + strSql.Append(" where 1=1 "); + //未选课的学分为空导出报错liang 为了导出数据零时增加了条件 此处暂放待处理 and c.LessonNo is not null + //去掉转校、休学 退学的学生 + strSql.Append(" and a.StuNo not in (SELECT distinct StuNo FROM StuInfoBasicChange where stuchangetype in ('06','04','05') and checkstatus=1) "); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND a.StuNo = @StuNo "); + } + //if (!queryParam["AcademicYearNo"].IsEmpty()) + //{ + // dp.Add("AcademicYearNo", "" + queryParam["AcademicYearNo"].ToString() + "", DbType.String); + // strSql.Append(" AND b.AcademicYearNo = @AcademicYearNo "); + //} + //if (!queryParam["Semester"].IsEmpty()) + //{ + // dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + // strSql.Append(" AND b.Semester = @Semester "); + //} + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND a.DeptNo = @DeptNo "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND a.MajorNo = @MajorNo "); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + dp.Add("ClassNo", queryParam["ClassNo"].ToString(), DbType.String); + strSql.Append(" AND a.ClassNo = @ClassNo "); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + dp.Add("LessonNo", queryParam["LessonNo"].ToString(), DbType.String); + strSql.Append(" AND c.LessonNo = @LessonNo "); + } + if (!queryParam["LessonName"].IsEmpty()) + { + dp.Add("LessonName", "%" + queryParam["LessonName"].ToString() + "%", DbType.String); + strSql.Append(" AND c.LessonName Like @LessonName "); + } + if (!queryParam["EmpNo"].IsEmpty()) + { + dp.Add("EmpNo", queryParam["EmpNo"].ToString(), DbType.String); + strSql.Append(" AND c.EmpNo = @EmpNo "); + } + if (!queryParam["EmpName"].IsEmpty()) + { + dp.Add("EmpName", "%" + queryParam["EmpName"].ToString() + "%", DbType.String); + strSql.Append(" AND c.EmpName Like @EmpName "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND a.StuName Like @StuName "); + } + if (!queryParam["Status"].IsEmpty()) + { + dp.Add("Status", queryParam["Status"].ToInt(), DbType.Int32); + strSql.Append(" AND Status = @Status "); + } + if (!queryParam["F_SchoolId"].IsEmpty()) + { + dp.Add("F_SchoolId", queryParam["F_SchoolId"].ToString(), DbType.String); + strSql.Append(" AND a.F_SchoolId = @F_SchoolId "); + } + if (!queryParam["ElectiveSelectStatus"].IsEmpty()) + { + if (queryParam["ElectiveSelectStatus"].ToString() == "1") + strSql.Append(" AND b.id is not null "); + else + strSql.Append(" AND b.id is null "); + } + if (!queryParam["ElectiveSignUpStatus"].IsEmpty()) + { + if (queryParam["ElectiveSignUpStatus"].ToString() != "0") + { + dp.Add("Status", queryParam["ElectiveSignUpStatus"].ToString(), DbType.String); + strSql.Append(" AND b.Status = @Status "); + } + else + { + strSql.Append(" AND b.Status is null "); + } + } + if (!queryParam["SqlParameter"].IsEmpty()) + { + strSql.Append(queryParam["SqlParameter"].ToString()); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + + public IEnumerable GetAllElectiveLesson(string academicYearNo, string semester) + { + try + { + return this.BaseRepository("CollegeMIS").FindList("select * from StuSelectLessonListOfElectiveOnline where AcademicYearNo='" + academicYearNo + "' and Semester='" + semester + "'"); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + } +} diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj index baa4af633..104ca2923 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Learun.Application.TwoDevelopment.csproj @@ -95,6 +95,10 @@ + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_FixAssetsMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_FixAssetsMethod.cs index df962bcbf..0e193b2f7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_FixAssetsMethod.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_FixAssetsMethod.cs @@ -20,7 +20,7 @@ namespace Learun.Application.WorkFlow } else { - asset.ChangeStatusByProcessId(parameter.processId, 3); + asset.ChangeStatusByProcessId(parameter.processId, 0); } } }