From 034f33a1224e8b2cbd37c2314d9f38b14ce65ff7 Mon Sep 17 00:00:00 2001 From: ndbs Date: Wed, 15 Jun 2022 14:26:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E9=80=89=E4=BF=AE=E8=AF=BE?= =?UTF-8?q?=E6=88=90=E7=BB=A9=20=E6=9C=AA=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ClassPlanController.cs | 50 +------ .../Controllers/ClassPlanTeachController.cs | 19 ++- .../OpenLessonPlanOfElectiveController.cs | 40 ++++++ .../Views/ClassPlan/Form.cshtml | 4 - .../Views/ClassPlan/Form.js | 2 +- .../Views/ClassPlanTeach/Index.js | 12 +- .../Views/ClassPlanTeach/TeachForm.js | 3 +- .../Views/ClassPlanTeach/TeachFormQZ.js | 4 +- .../FormOfElective.cshtml | 47 ++++++ .../FormOfElective.js | 62 ++++++++ .../IndexElective.cshtml | 42 ++++++ .../OpenLessonPlanOfElective/IndexElective.js | 134 ++++++++++++++++++ .../Learun.Application.Web.csproj | 4 + .../OpenLessonPlanOfElectiveBLL.cs | 25 +++- .../OpenLessonPlanOfElectiveEntity.cs | 29 ++++ .../OpenLessonPlanOfElectiveIBLL.cs | 6 + .../OpenLessonPlanOfElectiveService.cs | 87 ++++++++++++ .../StuSelectLessonListService.cs | 3 +- .../TeachClass/TeachClassService.cs | 6 +- 19 files changed, 505 insertions(+), 74 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs index 581e10704..7be2dbf20 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanController.cs @@ -21,9 +21,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers private ClassPlanIBLL classPlanIBLL = new ClassPlanBLL(); private ClassInfoIBLL classInfoIBLL = new ClassInfoBLL(); private TeachClassIBLL teachClassIBLL = new TeachClassBLL(); - private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); - private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL(); - private StuSelectLessonListIBLL stuSelectLessonListBLL = new StuSelectLessonListBLL(); #region 视图功能 @@ -152,6 +149,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } entity.State = 0; entity.IsAllowEdit = true; + entity.LessonSortNo = "1"; + entity.CheckMark = "1"; entity.MakeDate = DateTime.Now; var model = classPlanIBLL.GetRepetitions(entity.F_SchoolId, entity.AcademicYearNo, entity.Semester, entity.DeptNo, entity.MajorNo, entity.Grade, entity.LessonNo); if (model != null) @@ -178,12 +177,9 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult CourseArranging(string keyValue) { var entity = classPlanIBLL.GetListById(keyValue); - var stuinfobasicData = stuInfoBasicIBLL.GetAllList(); - var lessonData = lessonInfoIBLL.GetAllLesson(); List TeachList = new List(); - List StuSelectLessonList = new List(); - + for (int i = 0; i < entity.Count; i++) { var lessonList = classInfoIBLL.GetAllClass(). @@ -204,45 +200,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers TeachEntity.StuNum = entity[i].StuNum; TeachEntity.LessonSortNo = entity[i].LessonSortNo; TeachEntity.F_SchoolId = entity[i].F_SchoolId; - TeachList.Add(TeachEntity); - var classstulist = stuinfobasicData.Where(m => m.ClassNo == TeachEntity.TeachClassNo) - .ToList(); - foreach (var stu in classstulist) - { - var insertDatastuselect = new StuSelectLessonListEntity(); - insertDatastuselect.NoticeBookNo = stu.NoticeNo; - insertDatastuselect.StuNo = stu.StuNo; - insertDatastuselect.DeptNo = stu.DeptNo; - insertDatastuselect.ClassNo = stu.ClassNo; - insertDatastuselect.MajorNo = stu.MajorNo; - insertDatastuselect.StuName = stu.StuName; - insertDatastuselect.GenderNo = stu.GenderNo != null && stu.GenderNo.Value ? "1" : "0"; - insertDatastuselect.AcademicYearNo = TeachEntity.AcademicYearNo; - insertDatastuselect.Semester = TeachEntity.Semester; - insertDatastuselect.OpenLessonDeptNo = TeachEntity.DeptNo; - insertDatastuselect.OpenLessonMajorNo = TeachEntity.MajorNo; - insertDatastuselect.LessonNo = TeachEntity.LessonNo; - insertDatastuselect.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == TeachEntity.LessonNo)?.LessonName; - insertDatastuselect.PartCode = ""; - insertDatastuselect.OrdinaryScoreScale = 1; - insertDatastuselect.TermInScoreScale = 1; - insertDatastuselect.TermEndScoreScale = 1; - insertDatastuselect.OtherScoreScale = 1; - insertDatastuselect.TeachClassNo = stu.ClassNo; - insertDatastuselect.LessonSortNo = lessonData.FirstOrDefault(m => m.LessonNo == TeachEntity.LessonNo)?.LessonSortNo; - insertDatastuselect.StuSortNo = "02"; - insertDatastuselect.Grade = stu.Grade; - insertDatastuselect.StudyScore = 0; - insertDatastuselect.TotalStudyHour = 0; - insertDatastuselect.IsInEffect = "1"; - insertDatastuselect.EmpNo = TeachEntity.EmpNo; - insertDatastuselect.IsPitchOn = "1"; - insertDatastuselect.CheckMark = "1"; - insertDatastuselect.InsertTime = DateTime.Now; - insertDatastuselect.F_SchoolId = TeachEntity.F_SchoolId; - StuSelectLessonList.Add(insertDatastuselect); - } + TeachList.Add(TeachEntity); } } else @@ -251,7 +210,6 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } } teachClassIBLL.SaveEntityList(TeachList); - stuSelectLessonListBLL.SaveEntityList(StuSelectLessonList); classPlanIBLL.SaveEntityList(keyValue, entity); return Success("排课成功"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs index 192479ee4..512b8cd1d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ClassPlanTeachController.cs @@ -23,6 +23,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers private StuSelectLessonListIBLL StuSelectLesson = new StuSelectLessonListBLL(); private StuInfoBasicIBLL stuInfoBasicIBLL = new StuInfoBasicBLL(); private StuScoreIBLL stuScoreIBLL = new StuScoreBLL(); + private LessonInfoIBLL lessonInfoIBLL = new LessonInfoBLL(); + #region 视图功能 /// @@ -150,7 +152,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult SetTeach(string keyValue, string EmpNo) { var entityList = teachClassIBLL.GetTeachListById(keyValue); + var lessonData = lessonInfoIBLL.GetAllLesson(); + List TeachList = new List(); + for (int i = 0; i < entityList.Count; i++) { var stuDataList = stuInfoBasicIBLL.GetAllList().Where(s => s.DeptNo == entityList[i].DeptNo @@ -162,31 +167,33 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers for (int j = 0; j < stuDataList.Count; j++) { StuSelectLessonListEntity TeachEntity = new StuSelectLessonListEntity(); + TeachEntity.NoticeBookNo = stuDataList[j].StuNo; TeachEntity.StuNo = stuDataList[j].StuNo; TeachEntity.DeptNo = entityList[i].DeptNo; TeachEntity.MajorNo = entityList[i].MajorNo; TeachEntity.ClassNo = stuDataList[j].ClassNo; - TeachEntity.MajorDetailNo = entityList[i].MajorDetailNo; - TeachEntity.MajorDetailName = entityList[i].MajorDetailName; TeachEntity.StuName = stuDataList[j].StuName; + TeachEntity.GenderNo = Convert.ToInt32(stuDataList[j].GenderNo).ToString(); TeachEntity.AcademicYearNo = entityList[i].AcademicYearNo; TeachEntity.Semester = entityList[i].Semester; TeachEntity.OpenLessonDeptNo = entityList[i].DeptNo; TeachEntity.OpenLessonMajorNo = entityList[i].MajorNo; TeachEntity.LessonNo = entityList[i].LessonNo; - TeachEntity.PartCode = entityList[i].PartCode; + TeachEntity.LessonName = lessonData.FirstOrDefault(m => m.LessonNo == TeachEntity.LessonNo)?.LessonName; + TeachEntity.PartCode = ""; TeachEntity.OrdinaryScoreScale = 0; TeachEntity.TermInScoreScale = 0; TeachEntity.TermEndScoreScale = 0; TeachEntity.OtherScoreScale = 0; TeachEntity.TeachClassNo = entityList[i].TeachClassNo; TeachEntity.LessonSortNo = entityList[i].LessonSortNo; - TeachEntity.StuSortNo = entityList[i].LessonSortNo; + TeachEntity.StuSortNo = "02"; TeachEntity.Grade = entityList[i].Grade; - TeachEntity.StudyScore = 2; - TeachEntity.TotalStudyHour = 2; + TeachEntity.StudyScore = 0; + TeachEntity.TotalStudyHour = 0; TeachEntity.IsInEffect = "1"; TeachEntity.IsPitchOn = "1"; + TeachEntity.EmpNo = EmpNo; TeachEntity.F_SchoolId = entityList[i].F_SchoolId; TeachEntity.CheckMark = "1"; TeachEntity.InsertTime = DateTime.Now; 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 a2ff405f1..783df263e 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 @@ -87,6 +87,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 选 成绩比例设置 + /// + /// + [HttpGet] + public ActionResult IndexElective() + { + return View(); + } + /// + /// 选 成绩比例设置 + /// + /// + [HttpGet] + public ActionResult FormOfElective() + { + return View(); + } #endregion #region 获取数据 @@ -111,6 +129,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListElective(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = openLessonPlanOfElectiveIBLL.GetPageListElective(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + [HttpGet] [AjaxOnly] public ActionResult GetPageListOfMerge(string pagination, string queryJson) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml index 9f664a33d..e8a8160a4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.cshtml @@ -32,10 +32,6 @@
- @*
-
课程类别码
-
-
*@
课程细类码
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js index eb03c43cc..1da2073ca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlan/Form.js @@ -89,7 +89,7 @@ var bootstrap = function ($, learun) { }); } $('#StuSortNo').val('02'); - $('#LessonSortNo').val('2'); + $('#LessonSortNo').val('1'); $('#CheckStyleNo').val('1'); $('#ScoreRecordStyleNo').val('1'); $('#CheckMark').val('1'); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js index 7cc95e2cb..4c44259ce 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/Index.js @@ -39,14 +39,8 @@ var bootstrap = function ($, learun) { $('#EmpNo').lrDataSourceSelect({ code: 'teacheruserdata', value: 'f_encode', text: 'f_realname' }); $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); - $('#LessonNo').lrselect({ - placeholder: "请选择课程", - allowSearch: true, - url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', - value: 'value', - text: 'text', - maxHeight: 200 - }); + $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname' }); + // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -217,7 +211,7 @@ var bootstrap = function ($, learun) { { label: "上机课时", name: "PracticeHour", width: 80, align: "left" }, { label: "班级编号", name: "TeachClassNo", width: 80, align: "left" }, { - label: "班级名称", name: "TeachClassNo", width: 80, align: "left" , + label: "班级名称", name: "TeachClassNo", width: 80, align: "left", formatterAsync: function (callback, value, row, op, $cell) { learun.clientdata.getAsync('custmerData', { url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.js index db907b115..f67ed63ad 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachForm.js @@ -24,8 +24,7 @@ var bootstrap = function ($, learun) { } var postData = $('#form').lrGetFormData(); var EmpNo = postData.EmpNo; - console.log(EmpNo); - learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/SetTeach', { keyValue: keyValue, EmpNo: EmpNo}, function () { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/SetTeach', { keyValue: keyValue, EmpNo: EmpNo }, function () { }); }; page.init(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js index 02ee00152..e3366d758 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ClassPlanTeach/TeachFormQZ.js @@ -24,9 +24,9 @@ var bootstrap = function ($, learun) { } var postData = $('#form').lrGetFormData(); var EmpNo = postData.EmpNo; - console.log(EmpNo); - learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/QZSetTeach', { keyValue: keyValue, EmpNo: EmpNo}, function () { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/ClassPlanTeach/QZSetTeach', { keyValue: keyValue, EmpNo: EmpNo }, function () { }); }; page.init(); + } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.cshtml new file mode 100644 index 000000000..53e18db28 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.cshtml @@ -0,0 +1,47 @@ +@{ + ViewBag.Title = "成绩比例设置"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
平时成绩占比*
+ + % +
+
+
期中成绩占比*
+ + % +
+
+
期末成绩占比*
+ + % +
+
+
其他成绩占比*
+ + % +
+
+
是否允许编辑*
+
+
+ + +
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.js new file mode 100644 index 000000000..a8c9402a5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/FormOfElective.js @@ -0,0 +1,62 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-08-21 17:28 + * 描 述:成绩比例设置 + */ +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 () { + $('#IsAllowEdit').lrDataItemSelect({ code: 'YesOrNoBit' }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/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 OrdinaryScoreScale = $('#OrdinaryScoreScale').val(); + var TermInScoreScale = $('#TermInScoreScale').val(); + var TermEndScoreScale = $('#TermEndScoreScale').val(); + var OtherScoreScale = $('#OtherScoreScale').val(); + var totalScale = Number(OrdinaryScoreScale) + Number(TermInScoreScale) + Number(TermEndScoreScale) + Number(OtherScoreScale); + if (totalScale !== 100) { + learun.alert.warning("成绩比例之和必须等于100!"); + return false; + } + + var postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlan/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.cshtml new file mode 100644 index 000000000..7a4d1bbc6 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.cshtml @@ -0,0 +1,42 @@ +@{ + ViewBag.Title = "选修课课程信息"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
课程
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js new file mode 100644 index 000000000..d85c7ca36 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/OpenLessonPlanOfElective/IndexElective.js @@ -0,0 +1,134 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-08-21 17:28 + * 描 述:成绩比例设置 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + page.bindSelect(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 200, 400); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/FormOfElective', + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerForm({ + id: 'form', + title: '成绩比例设置', + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/FormOfElective?keyValue=' + keyValue, + width: 600, + height: 400, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + }, + bindSelect: function () { + //校区 + $('#F_SchoolId').lrDataSourceSelect({ + code: 'company', value: 'f_companyid', text: 'f_fullname', select: function (item) { } + }); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetAcademicYearNoData', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + $('#LessonNo').lrselect({ + placeholder: "请选择课程", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataOfAllWithNo', + value: 'value', + text: 'text' + }); + + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/OpenLessonPlanOfElective/GetPageListElective', + headData: [ + { label: "校区", name: "F_School", width: 150, align: "left" }, + { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, + { label: "学期", name: "Semester", width: 80, align: "left" }, + { label: "课程编号", name: "LessonNo", width: 100, align: "left" }, + { label: "课程名称", name: "LessonName", width: 150, align: "left" }, + { label: "平时成绩占比", name: "OrdinaryScoreScale", width: 100, align: "left" }, + { label: "期中成绩占比", name: "TermInScoreScale", width: 100, align: "left" }, + { label: "期末成绩占比", name: "TermEndScoreScale", width: 100, align: "left" }, + { label: "其他成绩占比", name: "OtherScoreScale", width: 100, align: "left" }, + { + label: "是否允许编辑", name: "IsAllowEdit", width: 100, align: "left", formatter: function (cellvalue) { + return (cellvalue === true || cellvalue === "true") ? "" : ""; + } + }, + ], + mainId: 'Id', + isPage: true, + isMultiselect: true, + sidx: 'AcademicYearNo,Semester', + sord: 'desc' + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#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 20185ec92..41845996d 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 @@ -1035,6 +1035,8 @@ + + @@ -7848,6 +7850,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs index cda5ed42b..9c7a6345e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveBLL.cs @@ -42,6 +42,29 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + public IEnumerable GetPageListElective(Pagination pagination, string queryJson) + { + try + { + return openLessonPlanOfElectiveService.GetPageListElective(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取页面显示列表数据【学子在线-选课中心】 /// /// 查询参数 @@ -141,7 +164,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } - + public void AddForm(string keyValue, OpenLessonPlanOfElectiveEntity entity) { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs index c7b3e472e..5f574df36 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveEntity.cs @@ -162,6 +162,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [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; } + + public bool? IsAllowEdit { get; set; } + #endregion #region 扩展操作 @@ -182,6 +206,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion #region 扩展字段 + /// + /// 校区名称 + /// + [NotMapped] + public string F_School { get; set; } [NotMapped] public string StuNo { get; set; } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs index ee3178329..ce7c6d08d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveIBLL.cs @@ -22,6 +22,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// IEnumerable GetPageList(Pagination pagination, string queryJson); /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + IEnumerable GetPageListElective(Pagination pagination, string queryJson); + /// /// 获取页面显示列表数据【学子在线-选课中心】 /// /// 查询参数 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs index 43d2a0eb2..c9c2aa932 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/OpenLessonPlanOfElective/OpenLessonPlanOfElectiveService.cs @@ -79,6 +79,93 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } /// + /// 选修成绩比例设置 + /// + /// 查询参数 + /// + public IEnumerable GetPageListElective(Pagination pagination, string queryJson) + { + try + { + var basedbname = BaseRepository().getDbConnection().Database; + + var strSql = new StringBuilder(); + strSql.Append("select t.*,c.F_FullName as F_School from OpenLessonPlanOfElective t "); + strSql.Append(" left join " + basedbname + ".dbo.LR_Base_Company c on t.F_SchoolId=c.f_CompanyId "); + strSql.Append(" WHERE 1=1 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["F_SchoolId"].IsEmpty()) + { + dp.Add("F_SchoolId", queryParam["F_SchoolId"].ToString(), DbType.String); + strSql.Append(" AND t.F_SchoolId = @F_SchoolId "); + } + if (!queryParam["F_School"].IsEmpty()) + { + dp.Add("F_School", "%" + queryParam["F_School"].ToString() + "%", DbType.String); + strSql.Append(" AND c.F_FullName Like @F_School "); + } + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + if (!queryParam["Grade"].IsEmpty()) + { + dp.Add("Grade", queryParam["Grade"].ToString(), DbType.String); + strSql.Append(" AND t.Grade = @Grade "); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + dp.Add("DeptNo", queryParam["DeptNo"].ToString(), DbType.String); + strSql.Append(" AND t.DeptNo = @DeptNo "); + } + if (!queryParam["DeptName"].IsEmpty()) + { + dp.Add("DeptName", "%" + queryParam["DeptName"].ToString() + "%", DbType.String); + strSql.Append(" AND d.DeptName Like @DeptName "); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + dp.Add("MajorNo", queryParam["MajorNo"].ToString(), DbType.String); + strSql.Append(" AND t.MajorNo = @MajorNo "); + } + if (!queryParam["MajorName"].IsEmpty()) + { + dp.Add("MajorName", "%" + queryParam["MajorName"].ToString() + "%", DbType.String); + strSql.Append(" AND m.MajorName Like @MajorName "); + } + 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 "); + } + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); + } + 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/EducationalAdministration/StuSelectLessonList/StuSelectLessonListService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListService.cs index e45e7762f..a50586234 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuSelectLessonList/StuSelectLessonListService.cs @@ -167,6 +167,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration stuLessonList.F_SchoolId = item.F_SchoolId; stuLessonList.NoticeBookNo = item.NoticeBookNo; stuLessonList.StuNo = item.StuNo; + stuLessonList.StuNo = item.StuNo; stuLessonList.DeptNo = item.DeptNo; stuLessonList.MajorNo = item.MajorNo; stuLessonList.ClassNo = item.ClassNo; @@ -203,7 +204,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration stuLessonList.CheckMark = "1"; if (db.FindEntity(x => x.AcademicYearNo == item.AcademicYearNo && x.Semester == item.Semester && x.DeptNo == item.DeptNo && x.StuNo == item.StuNo && x.EmpNo == item.EmpNo - && x.MajorNo == item.MajorNo && x.Grade == item.Grade && x.LessonNo == item.LessonNo && x.F_SchoolId == item.F_SchoolId) == null) + && x.MajorNo == item.MajorNo && x.ClassNo == item.ClassNo && x.Grade == item.Grade && x.LessonNo == item.LessonNo && x.F_SchoolId == item.F_SchoolId) == null) { db.Insert(stuLessonList); } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs index f0ffb5769..d50031bb3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/TeachClass/TeachClassService.cs @@ -312,8 +312,10 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration Teach.LessonSortNo = item.LessonSortNo; Teach.F_SchoolId = item.F_SchoolId; - if (db.FindEntity(x => x.AcademicYearNo == Teach.AcademicYearNo && x.Semester == Teach.Semester && x.DeptNo == Teach.DeptNo && x.EmpNo == Teach.EmpNo - && x.MajorNo == Teach.MajorNo && x.Grade == Teach.Grade && x.LessonNo == Teach.LessonNo && x.F_SchoolId == Teach.F_SchoolId) == null) + if (db.FindEntity(x => x.AcademicYearNo == Teach.AcademicYearNo && x.Semester == Teach.Semester + && x.DeptNo == Teach.DeptNo && x.TeachClassNo == Teach.TeachClassNo + && x.MajorNo == Teach.MajorNo && x.Grade == Teach.Grade + && x.LessonNo == Teach.LessonNo && x.F_SchoolId == Teach.F_SchoolId) == null) { db.Insert(Teach); }