From 766463cf31c4b76fd50409cc56451d215a80c5c1 Mon Sep 17 00:00:00 2001 From: dyy <18335927079@163.com> Date: Tue, 8 Sep 2020 17:29:50 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=89=E4=BF=AE=E8=AF=BE=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=8C=89=E5=AD=A6=E5=B9=B4=E3=80=81=E5=AD=A6?= =?UTF-8?q?=E6=9C=9F=E3=80=81=E8=AF=BE=E7=A8=8B=E5=90=8D=E7=A7=B0=E6=8E=92?= =?UTF-8?q?=E5=BA=8F=EF=BC=9B=E6=9F=A5=E7=9C=8B=E5=B7=B2=E5=AE=A1=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E9=A1=B5=E9=9D=A2=E5=A2=9E=E5=8A=A0=E2=80=9C=E6=89=B9?= =?UTF-8?q?=E9=87=8F=E6=8B=92=E7=BB=9D=E2=80=9D=E6=8C=89=E9=92=AE=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OpenLessonPlanOfElectiveController.cs | 2 +- ...StuSelectLessonListOfElectiveController.cs | 28 ++++++++++++++ .../OpenLessonPlanOfElective/MergeIndex.js | 27 ++++++++------ .../AuditIndex.cshtml | 2 +- .../AuditIndex.js | 3 +- .../FinishIndex.cshtml | 3 ++ .../FinishIndex.js | 15 ++++++++ .../AuditIndex.cshtml | 2 +- .../AuditIndex.js | 3 +- .../FinishIndex.cshtml | 3 ++ .../FinishIndex.js | 15 ++++++++ .../Views/LR_Content/plugin/grid/jfgrid.js | 1 - .../StuSelectLessonListOfElectiveBLL.cs | 18 +++++++++ .../StuSelectLessonListOfElectiveIBLL.cs | 1 + .../StuSelectLessonListOfElectiveService.cs | 37 +++++++++++++++++++ 15 files changed, 142 insertions(+), 18 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs index d6405dc55..f28f87b8d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/OpenLessonPlanOfElectiveController.cs @@ -108,7 +108,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult GetPageListOfMerge(string pagination, string queryJson) { Pagination paginationobj = pagination.ToObject(); - var data = openLessonPlanOfElectiveIBLL.GetPageListOfMerge(paginationobj, queryJson).OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonNo); + var data = openLessonPlanOfElectiveIBLL.GetPageListOfMerge(paginationobj, queryJson); var jsonData = new { rows = data, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuSelectLessonListOfElectiveController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuSelectLessonListOfElectiveController.cs index 0dc17c2ba..cc47418eb 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuSelectLessonListOfElectiveController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuSelectLessonListOfElectiveController.cs @@ -157,6 +157,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } return Success("操作成功!"); } + /// + /// 批量拒绝【审核学生页面】 + /// + /// + /// + /// [HttpPost] [AjaxOnly] public ActionResult UnPass(string keyValue, string OLPEId) @@ -174,6 +180,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success("操作成功!"); } /// + /// 批量拒绝【已审学生页面】 + /// + /// + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult UnPassOfFinish(string keyValue, string OLPEId) + { + var stulist = keyValue.Split(','); + var olpentity = openLessonPlanOfElectiveIBLL.GetOpenLessonPlanOfElectiveEntity(OLPEId); + if (olpentity != null) + { + stuSelectLessonListOfElectiveIBLL.UnPassOfFinish(stulist, olpentity); + } + else + { + return Fail("当前选课数据不存在!"); + } + return Success("操作成功!"); + } + /// /// 保存实体数据(新增、修改) /// 主键 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js index a0be91c73..b9446da71 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/MergeIndex.js @@ -162,18 +162,21 @@ var bootstrap = function ($, learun) { { label: "学年", name: "AcademicYearNo", width: 45, align: "left" }, { label: "学期", name: "Semester", width: 35, align: "left" }, { label: "课程号", name: "LessonNo", width: 70, align: "left" }, + //{ + // label: "课程名称", name: "LessonNo2", width: 170, align: "left", + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', + // key: value, + // keyId: 'lessonno', + // callback: function (_data) { + // callback(_data['lessonname']); + // } + // }); + // } + //}, { - label: "课程名称", name: "LessonNo2", width: 170, align: "left", - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'LessonInfo', - key: value, - keyId: 'lessonno', - callback: function (_data) { - callback(_data['lessonname']); - } - }); - } + label: "课程名称", name: "LessonName", width: 170, align: "left" }, { label: "上课节次", name: "LessonSection", width: 100, align: "left", @@ -233,7 +236,7 @@ var bootstrap = function ($, learun) { ], mainId: 'Id', isPage: true, - sidx: 'AcademicYearNo,Semester', + sidx: 'AcademicYearNo DESC, Semester DESC, LessonName ASC', sord: 'desc' }); page.search(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/AuditIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/AuditIndex.cshtml index b9d0c621e..607380332 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/AuditIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/AuditIndex.cshtml @@ -28,7 +28,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/AuditIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/AuditIndex.js index 7f38b8027..d8ee4b9ce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/AuditIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/AuditIndex.js @@ -46,7 +46,7 @@ var bootstrap = function ($, learun) { }); } }); - //批量审核 + //批量审核通过 $('#lr_auditpass').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { @@ -59,6 +59,7 @@ var bootstrap = function ($, learun) { }); } }); + //批量拒绝 $('#lr_auditunpass').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/FinishIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/FinishIndex.cshtml index ff8b46a33..93adbc37a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/FinishIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/FinishIndex.cshtml @@ -26,6 +26,9 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/FinishIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/FinishIndex.js index 883e9f958..2c1974320 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/FinishIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElective/FinishIndex.js @@ -21,6 +21,20 @@ var bootstrap = function ($, learun) { $('#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/StuSelectLessonListOfElective/UnPassOfFinish', { keyValue: keyValue, OLPEId: OLPEId }, function () { + refreshGirdData(); + }); + } + }); + } + }); }, // 初始化列表 initGird: function () { @@ -71,6 +85,7 @@ var bootstrap = function ($, learun) { ], mainId:'Id', isPage: true, + isMultiselect: true, sidx: 'StuNo', sord:'asc' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/AuditIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/AuditIndex.cshtml index 21924b2c3..6eb645c8a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/AuditIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/AuditIndex.cshtml @@ -28,7 +28,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/AuditIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/AuditIndex.js index ed5150f0f..4582d3275 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/AuditIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/AuditIndex.js @@ -46,7 +46,7 @@ var bootstrap = function ($, learun) { }); } }); - //批量审核 + //批量审核通过 $('#lr_auditpass').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { @@ -59,6 +59,7 @@ var bootstrap = function ($, learun) { }); } }); + //批量拒绝 $('#lr_auditunpass').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/FinishIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/FinishIndex.cshtml index c7e5d3645..8e3594825 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/FinishIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/FinishIndex.cshtml @@ -26,6 +26,9 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/FinishIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/FinishIndex.js index 2b17353d0..54ebc5971 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/FinishIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuSelectLessonListOfElectivePre/FinishIndex.js @@ -21,6 +21,20 @@ var bootstrap = function ($, learun) { $('#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/StuSelectLessonListOfElectivePre/UnPass', { keyValue: keyValue, OLPEId: OLPEId }, function () { + refreshGirdData(); + }); + } + }); + } + }); }, // 初始化列表 initGird: function () { @@ -71,6 +85,7 @@ var bootstrap = function ($, learun) { ], mainId:'Id', isPage: true, + isMultiselect: true, sidx: 'StuNo', sord:'asc' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js index 2a1b83667..a9736ccd8 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Views/LR_Content/plugin/grid/jfgrid.js @@ -1545,7 +1545,6 @@ } } - console.log(head); }, // 单击行 clickRow: function ($self, $et, op) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveBLL.cs index a9fca82ed..67db95afa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveBLL.cs @@ -242,6 +242,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public void UnPassOfFinish(string[] stulist, OpenLessonPlanOfElectiveEntity 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) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveIBLL.cs index acabf92b1..353f44469 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveIBLL.cs @@ -70,6 +70,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration IEnumerable GetQueryStuSelectResultList(Pagination pagination, string queryJson); void Pass(string[] stulist, OpenLessonPlanOfElectiveEntity olpentity); void UnPass(string[] stulist, OpenLessonPlanOfElectiveEntity olpentity); + void UnPassOfFinish(string[] stulist, OpenLessonPlanOfElectiveEntity olpentity); IEnumerable GetAllElectiveLesson(string academicYearNo, string semester); } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveService.cs index f64bebed0..1ff93c134 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonListOfElective/StuSelectLessonListOfElectiveService.cs @@ -243,6 +243,43 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + public void UnPassOfFinish(string[] stulist, OpenLessonPlanOfElectiveEntity 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 StuSelectLessonListOfElective set Status=3 where Id='" + item + "'"); + } + } + //修改OpenLessonPlanOfElective通过人数 + 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