From 0f9d363b97c29875b95f409535e3045029bf12d2 Mon Sep 17 00:00:00 2001 From: yxq Date: Thu, 15 Jun 2023 11:54:35 +0800 Subject: [PATCH 1/7] =?UTF-8?q?=E6=88=91=E7=9A=84=E8=AF=BE=E8=A1=A8=20?= =?UTF-8?q?=E5=91=A8=E6=AC=A1=E7=AD=9B=E9=80=89=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LearunApp-2.2.0/pages/timeTable/list.vue | 59 +++++++++++++++---- 1 file changed, 48 insertions(+), 11 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/list.vue index e71538603..62976e4d9 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/timeTable/list.vue @@ -6,12 +6,21 @@ {{ semester }} - + + + + @@ -56,6 +65,9 @@ import common from '@/common/js/common.js' export default { data() { return { + timeValue:'', + timeOptions:[], + semester: '', num: 0, user: null, @@ -99,10 +111,8 @@ export default { }, methods: { async init(obj) { - //console.log(obj) let _this = this; _this.todayWeek = common.weekday(obj); - //console.log(_this.todayWeek) _this.semester = common.judgeDate(obj); _this.weekDayTime = 7 * common.oneDayTime(); _this.user = _this.GET_GLOBAL('loginUser'); @@ -126,14 +136,31 @@ export default { _this.semester = common.judgeDate(_this.todayWeek.SundayTime); _this.loadData(_this.todayWeek.Monday, _this.todayWeek.Sunday); }, - loadData(start, end) { - let param = { StartDate: start, EndDate: end }; - // let param = { StartDate: '2018-11-05', EndDate: '2018-11-11' }; + async loadData(start, end) { + // let param = { StartDate: start, EndDate: end }; let _this = this; _this.LOADING('加载数据中…'); + if(!this.timeValue){ + // 加载下拉框 + let timeOptionRes = await this.HTTP_GET('learun/adms/timetable/weeklist', {}, '加载数据时出错') + if(!timeOptionRes){ + this.HIDE_LOADING(); + return + } + this.timeOptions = timeOptionRes.map(e=>{return {value:e.startdate+'~'+e.enddate,text:e.textweek}}) + // 加载当前周次 + let currentWeekres = await this.HTTP_GET('learun/adms/timetable/currentweek', {}, '加载数据时出错') + if(!currentWeekres){ + this.HIDE_LOADING(); + return + } + let currentweek = currentWeekres.currentweek + let obj = timeOptionRes.find(e=>e.week == currentweek) + this.timeValue = obj.startdate + '~' + obj.enddate + } + let param = { StartDate: this.timeValue.split('~')[0], EndDate: this.timeValue.split('~')[1] }; _this.HTTP_GET('learun/adms/timetable/list', param, '加载数据时出错').then(res => { this.HIDE_LOADING(); - // console.log(res); _this.ProcessingData(res); }); @@ -191,14 +218,10 @@ export default { }, classTap(data) { let _this = this; - // console.log(_this.user) if (_this.user.Description == "教师") { - //console.log("教师"); } else if (_this.user.Description == "学生") { let LeaveType = data.LeaveType; - //console.log(LeaveType); let IsCheck = data.IsCheck; - //console.log(IsCheck); if (LeaveType == "1") { let msg = "请假申请中"; if (IsCheck == "1") { @@ -216,6 +239,13 @@ export default { }, onfun(obj){ this.init(obj); + }, + getTimeOptions(){ + return this.HTTP_GET('learun/adms/timetable/weeklist', {}, '加载数据时出错') + }, + timeChange(e){ + this.timeValue = e + this.loadData() } }, created() { @@ -382,4 +412,11 @@ export default { text-align: center; font-size: 14px; } + +.timeSelectBox .cu-form-group{ + background-color: unset; + border-bottom:none; + width: calc(100% - 80px); + margin: 0 auto; +} From 93d597d70295ae63ea63aacc3fd20d6367ba4477 Mon Sep 17 00:00:00 2001 From: yxq Date: Thu, 15 Jun 2023 14:53:26 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E8=80=83=E8=AF=95=E5=AE=89=E6=8E=92?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ArrangeExamTerm/list.vue | 11 +++++++++-- .../ArrangeExamTermNew/list.vue | 12 ++++++++++-- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/ArrangeExamTerm/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/ArrangeExamTerm/list.vue index b7f74ad90..6fa4c72fa 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/ArrangeExamTerm/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/ArrangeExamTerm/list.vue @@ -102,10 +102,12 @@ import set from 'lodash/set' import pickBy from 'lodash/pickBy' import mapValues from 'lodash/mapValues' + import common from '@/common/js/common.js' export default { data() { return { + semester:'', // 数据项的数据类型、结构 scheme: { ClassroomName: { @@ -182,6 +184,7 @@ }, async onLoad() { + this.semester = common.judgeDate(); await this.init() }, onUnload() { @@ -217,7 +220,11 @@ // 拉取列表 async fetchList(isConcat = true) { // if (this.page > this.total) { return } - + let AcademicYearNo = '',Semester = ''; + if(this.semester){ + AcademicYearNo = this.semester.substring(2,4) + '-' +this.semester.substring(7,9) + Semester = this.semester.substring(12,13) == '二'?'2':'1' + } const result = await this.HTTP_GET( 'learun/ask/teststulist', { // 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序) @@ -228,7 +235,7 @@ sidx: 'ExamDate desc,ExamTime asc,LessonNo asc,ClassroomNo asc', sord: 'DESC' }, - queryJson: JSON.stringify(this.searchData) + queryJson: JSON.stringify({...this.searchData,AcademicYearNo,Semester}) }, '加载数据时出错' ) diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/ArrangeExamTermNew/list.vue b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/ArrangeExamTermNew/list.vue index 86708e937..29f25371c 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/ArrangeExamTermNew/list.vue +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/EducationalAdministration/ArrangeExamTermNew/list.vue @@ -91,10 +91,12 @@ import set from 'lodash/set' import pickBy from 'lodash/pickBy' import mapValues from 'lodash/mapValues' + import common from '@/common/js/common.js' export default { data() { return { + semester:'', // 数据项的数据类型、结构 scheme: { ClassroomName: { @@ -164,6 +166,7 @@ }, async onLoad() { + this.semester = common.judgeDate(); await this.init() }, onUnload() { @@ -193,7 +196,12 @@ // 拉取列表 async fetchList(isConcat = true) { // if (this.page > this.total) { return } - + let AcademicYearNo = '',Semester = ''; + if(this.semester){ + console.log(this.semester) + AcademicYearNo = this.semester.substring(2,4) + '-' +this.semester.substring(7,9) + Semester = this.semester.substring(12,13) == '二'?'2':'1' + } const result = await this.HTTP_GET( 'learun/ask/testlist', { // 这里 sidx 表示排序字段,sord 表示排序方式(DESC=降序,ASC=升序) @@ -204,7 +212,7 @@ sidx: 'ExamDate desc,ExamTime asc,LessonNo asc,ClassroomNo asc', sord: 'DESC' }, - queryJson: JSON.stringify(this.searchData) + queryJson: JSON.stringify({...this.searchData,AcademicYearNo,Semester}) }, '加载数据时出错' ) From 6ac1b26fecb8075ad251648e3016df9e0cdc761f Mon Sep 17 00:00:00 2001 From: liangkun Date: Thu, 15 Jun 2023 15:02:39 +0800 Subject: [PATCH 3/7] =?UTF-8?q?=E7=B3=BB=E9=83=A8=E5=AE=89=E6=8E=92?= =?UTF-8?q?=E6=95=99=E5=B8=88=E3=80=81=E6=95=99=E5=AE=A4=E8=B0=83=E6=95=B4?= =?UTF-8?q?=EF=BC=8C=E8=80=83=E5=8A=A1=E6=9F=A5=E8=AF=A2=E9=BB=98=E8=AE=A4?= =?UTF-8?q?=E5=BD=93=E5=89=8D=E5=AD=A6=E6=9C=9F=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Exam_ArrangeExamTermNewController.cs | 43 +++++++++++++- .../Views/ArrangeExamTermNew/IndexStudent.js | 10 +++- .../Views/ArrangeExamTermNew/IndexTeach.js | 10 +++- .../IndexClassRoom.cshtml | 4 ++ .../Exam_ArrangeExamTermNew/IndexClassRoom.js | 16 ++++- .../IndexForClass.cshtml | 4 ++ .../Exam_ArrangeExamTermNew/IndexForClass.js | 15 ++++- .../Exam_ArrangeExamTermNew/IndexItem.cshtml | 4 ++ .../Exam_ArrangeExamTermNew/IndexItem.js | 15 ++++- .../Modules/TimeTable.cs | 59 +++++++++++++++++++ .../Exam_ArrangeExamTermNewBLL.cs | 4 +- .../Exam_ArrangeExamTermNewIBLL.cs | 2 +- .../Exam_ArrangeExamTermNewService.cs | 47 ++++++++++++++- .../Exam_ExamPlanLessonService.cs | 2 +- 14 files changed, 220 insertions(+), 15 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs index 3a40da078..21216a2f6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/Exam_ArrangeExamTermNewController.cs @@ -5,6 +5,7 @@ using System.Web.Mvc; using System.Collections.Generic; using System.Linq; using System; +using Learun.Application.Organization; namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { @@ -19,6 +20,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { private Exam_ArrangeExamTermNewIBLL exam_ArrangeExamTermNewIBLL = new Exam_ArrangeExamTermNewBLL(); private Exam_ExamRoomIBLL exam_ExamRoomIBLL = new Exam_ExamRoomBLL(); + private EmpInfoIBLL empInfoIbll = new EmpInfoBLL(); + private RoleIBLL roleIbll = new RoleBLL(); #region 视图功能 @@ -47,11 +50,29 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult IndexForClass() { + if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) + { + ViewBag.IsTwoDept = true; + var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); + if (empinfo != null) + { + ViewBag.DeptNo = empinfo.DeptNo; + } + } return View(); } [HttpGet] public ActionResult IndexItem() { + if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) + { + ViewBag.IsTwoDept = true; + var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); + if (empinfo != null) + { + ViewBag.DeptNo = empinfo.DeptNo; + } + } return View(); } /// @@ -71,6 +92,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult IndexClassRoom() { + if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) + { + ViewBag.IsTwoDept = true; + var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); + if (empinfo != null) + { + ViewBag.DeptNo = empinfo.DeptNo; + } + } return View(); } #endregion @@ -95,7 +125,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers [HttpGet] public ActionResult GetClassTree() { - return Success(exam_ArrangeExamTermNewIBLL.GetClassTree()); + if (LoginUserInfo.Get().roleIds.Contains(roleIbll.GetEntityByRoleCode("paikaoerji").F_RoleId)) + { + var empinfo = empInfoIbll.GetEmpInfoEntityByEmpNo(LoginUserInfo.Get().account); + if (empinfo != null) + { + return Success(exam_ArrangeExamTermNewIBLL.GetClassTree(empinfo.DeptNo)); + } + else + return Success(exam_ArrangeExamTermNewIBLL.GetClassTree("")); + } + else + return Success(exam_ArrangeExamTermNewIBLL.GetClassTree("")); } /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js index 69d06fd10..e99a46bbc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexStudent.js @@ -14,7 +14,6 @@ var bootstrap = function ($, learun) { var ClassNo = ''; var page = { init: function () { - page.initGird(); page.bind(); }, bind: function () { @@ -69,6 +68,13 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); + $.get('/Home/GetYearAndSemesteResult', function (ref) { + if (ref.code == "200") { + $('#AcademicYearNo').lrselectSet(ref.data.Item1); + $('#Semester').lrselectSet(ref.data.Item3); + page.initGird(); + } + }.bind(this), "json"); $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder: '请选择课程' }); $('#ClassRoomNo').lrDataSourceSelect({ code: 'ClassRoomInfo', value: 'classroomno', text: 'classroomname', placeholder: '请选择教室' }); $('#EmpNo').lrDataSourceSelect({ code: 'EmpInfo', value: 'empno', text: 'empname', placeholder: '请选择教师' }); @@ -105,6 +111,8 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + param.Semester = $('#Semester').lrselectGet(); param.StartTime = datebegin; param.EndTime = dateend; var loginInfo = learun.clientdata.get(['userinfo']); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js index 27f229dbd..c7881aa5b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ArrangeExamTermNew/IndexTeach.js @@ -13,7 +13,6 @@ var bootstrap = function ($, learun) { var dateend = ''; var page = { init: function () { - page.initGird(); page.bind(); }, bind: function () { @@ -68,6 +67,13 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); + $.get('/Home/GetYearAndSemesteResult', function (ref) { + if (ref.code == "200") { + $('#AcademicYearNo').lrselectSet(ref.data.Item1); + $('#Semester').lrselectSet(ref.data.Item3); + page.initGird(); + } + }.bind(this), "json"); //课程 $('#LessonNo').lrDataSourceSelect({ code: 'LessonInfo', value: 'lessonno', text: 'lessonname', placeholder:'请选择课程' }); }, @@ -98,6 +104,8 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + param.Semester = $('#Semester').lrselectGet(); param.StartTime = datebegin; param.EndTime = dateend; var loginInfo = learun.clientdata.get(['userinfo']); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml index f72030d04..f9f364722 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.cshtml @@ -48,4 +48,8 @@ + @Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js index 41bb19165..563090285 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexClassRoom.js @@ -11,7 +11,6 @@ var bootstrap = function ($, learun) { var logend = ''; var page = { init: function () { - page.initGird(); page.bind(); }, bind: function () { @@ -40,7 +39,6 @@ var bootstrap = function ($, learun) { selectfn: function (begin, end) { logbegin = begin; logend = end; - page.search(); } }); @@ -67,6 +65,14 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); + $.get('/Home/GetYearAndSemesteResult', function (ref) { + if (ref.code == "200") { + $('#AcademicYearNo').lrselectSet(ref.data.Item1); + $('#Semester').lrselectSet(ref.data.Item3); + page.initGird(); + + } + }.bind(this), "json"); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -138,8 +144,14 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + param.Semester = $('#Semester').lrselectGet(); param.StartTime = logbegin; param.EndTime = logend; + if (IsTwoDept) + param.ImportDeptNo = CurrentDeptNo; + else + param.ImportDeptNo = "0"; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml index 140f63d8f..2e4585995 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.cshtml @@ -48,4 +48,8 @@ + @Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js index bdfac26da..c2426ca5c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexForClass.js @@ -14,7 +14,6 @@ var bootstrap = function ($, learun) { var ClassNo = ''; var page = { init: function () { - page.initGird(); page.bind(); }, bind: function () { @@ -78,6 +77,13 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); + $.get('/Home/GetYearAndSemesteResult', function (ref) { + if (ref.code == "200") { + $('#AcademicYearNo').lrselectSet(ref.data.Item1); + $('#Semester').lrselectSet(ref.data.Item3); + page.initGird(); + } + }.bind(this), "json"); //课程 //$('#LessonNo').lrselect({ // placeholder: "请选择课程", @@ -119,9 +125,14 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + param.Semester = $('#Semester').lrselectGet(); param.StartTime = datebegin; param.EndTime = dateend; - //console.log(param); + if (IsTwoDept) + param.ImportDeptNo = CurrentDeptNo; + else + param.ImportDeptNo = "0"; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml index 133107ba9..3d45cadbf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.cshtml @@ -48,4 +48,8 @@ + @Html.AppendJsFile("/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js index 2507f5f7c..1563c2a5d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/Exam_ArrangeExamTermNew/IndexItem.js @@ -14,7 +14,6 @@ var bootstrap = function ($, learun) { var ClassNo = ''; var page = { init: function () { - page.initGird(); page.bind(); }, bind: function () { @@ -78,6 +77,13 @@ var bootstrap = function ($, learun) { value: 'value', text: 'text' }); + $.get('/Home/GetYearAndSemesteResult', function (ref) { + if (ref.code == "200") { + $('#AcademicYearNo').lrselectSet(ref.data.Item1); + $('#Semester').lrselectSet(ref.data.Item3); + page.initGird(); + } + }.bind(this), "json"); //课程 //$('#LessonNo').lrselect({ // placeholder: "请选择课程", @@ -121,9 +127,14 @@ var bootstrap = function ($, learun) { }, search: function (param) { param = param || {}; + param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + param.Semester = $('#Semester').lrselectGet(); param.StartTime = datebegin; param.EndTime = dateend; - console.log(param); + if (IsTwoDept) + param.ImportDeptNo = CurrentDeptNo; + else + param.ImportDeptNo = "0"; $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } }; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs index b92d60748..88738766e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.WebApi/Modules/TimeTable.cs @@ -22,12 +22,71 @@ namespace Learun.Application.WebApi.Modules Get["/StuList"] = GetStuInfo; Get["/StuLessonInfo"] = GetStuLessonInfo; Get["/timeTableData"] = GetTimeTableData; + Get["/weeklist"] = GetWeeksData; + Get["/currentweek"] = GetCurrentWeek; } private ArrangeLessonTermIBLL arrangeLessonTermIBLL = new ArrangeLessonTermBLL(); private ArrangeLessonTermOfElectiveIBLL arrangeLessonTermOfElectiveIBLL = new ArrangeLessonTermOfElectiveBLL(); private StuAttendanceLeaveIBLL stuAttendanceLeaveIBLL = new StuAttendanceLeaveBLL(); private StuAttendanceIBLL stuAttendanceIBLL = new StuAttendanceBLL(); + + public class WeekDate + { + public int week { get; set; } + public string startdate { get; set; } + public string enddate { get; set; } + public string textweek { get; set; } + } + + public Response GetWeeksData(dynamic _) + { + var weekdatelist = new List(); + var yearsemester = Common.GetSemesterAndYear(); + var arrangelessonlist = arrangeLessonTermIBLL.GetListForTimeTable("{\"AcademicYearNo\":\"" + yearsemester.AcademicYearShort + "\",\"Semester\":\"" + yearsemester.Semester + "\"}").OrderBy(m => m.LessonDate); + if (arrangelessonlist.Any()) + { + var firstday = arrangelessonlist.First(); + var lastday = arrangelessonlist.Last(); + var monday = firstday.LessonDate.Value.AddDays(-Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek) + 1); + var sunday = lastday.LessonDate.Value.AddDays(7 - Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek)); + //总周数 + var weekCount = Math.Ceiling(Convert.ToDouble((sunday - monday).Days + 1) / 7); + for (var i = 0; i < weekCount; i++) + { + var wentity = new WeekDate(); + wentity.week = i + 1; + wentity.startdate = monday.AddDays(i * 7).ToString("yyyy-MM-dd"); + wentity.enddate = monday.AddDays(i * 7 + 6).ToString("yyyy-MM-dd"); + wentity.textweek = "第" + wentity.week + "周 (" + wentity.startdate + "~" + wentity.enddate + ")"; + weekdatelist.Add(wentity); + } + return Success(weekdatelist); + } + else + return Success(new { }); + } + + /// + /// 获取当前日期是第几周 + /// + /// + public Response GetCurrentWeek(dynamic _) + { + var yearsemester = Common.GetSemesterAndYear(); + var arrangelessonlist = arrangeLessonTermIBLL.GetListForTimeTable("{\"AcademicYearNo\":\"" + yearsemester.AcademicYearShort + "\",\"Semester\":\"" + yearsemester.Semester + "\"}").OrderBy(m => m.LessonDate); + if (arrangelessonlist.Any()) + { + var firstday = arrangelessonlist.First(); + var lastday = arrangelessonlist.Last(); + var monday = firstday.LessonDate.Value.AddDays(-(Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek) == 0 ? 7 : Convert.ToInt32(firstday.LessonDate.Value.DayOfWeek)) + 1); + var sunday = lastday.LessonDate.Value.AddDays(7 - (Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek) == 0 ? 7 : Convert.ToInt32(lastday.LessonDate.Value.DayOfWeek))); + var currentweek = Util.Time.GetWeekOfDay(monday, sunday); + return Success(new {currentweek}); + } + return Success(new {currentweek=1}); + } + /// /// 课程表【教师功能、学生功能】 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs index e811a1bee..ff1aaab12 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewBLL.cs @@ -18,11 +18,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration #region 获取数据 - public List GetClassTree() + public List GetClassTree(string DeptNo) { try { - var list = exam_ArrangeExamTermNewService.GetClassTree(); + var list = exam_ArrangeExamTermNewService.GetClassTree(DeptNo); List treeList = new List(); foreach (var item in list) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs index efe5ab32a..44762844a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewIBLL.cs @@ -15,7 +15,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { #region 获取数据 - List GetClassTree(); + List GetClassTree(string DeptNo); List GetClassRoomTree(string AcademicYearNo, string Semester); IEnumerable GetPageListForClass(Pagination pagination, string queryJson); IEnumerable GetItemPageList(Pagination pagination, string queryJson); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs index 8e5bd6173..06ab46c1a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ArrangeExamTermNew/Exam_ArrangeExamTermNewService.cs @@ -19,11 +19,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public class Exam_ArrangeExamTermNewService : RepositoryFactory { #region 获取数据 - public IEnumerable GetClassTree() + public IEnumerable GetClassTree(string DeptNo) { try { - return this.BaseRepository("CollegeMIS").FindList("select ClassNo,ClassName from Exam_ArrangeExamTermItemNew where ClassNo is not null group by ClassNo,ClassName order by ClassNo"); + return this.BaseRepository("CollegeMIS").FindList($@"select ClassNo,ClassName from Exam_ArrangeExamTermItemNew t + left join Exam_ExamPlan e on t.EPId = e.EPId where ClassNo is not null and e.importdeptno='{DeptNo}' group by ClassNo,ClassName order by ClassNo"); } catch (Exception ex) { @@ -109,6 +110,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); } + if (!queryParam["ImportDeptNo"].IsEmpty()) + { + if (queryParam["ImportDeptNo"].ToString() == "0") + { + strSql.Append(" AND e.ImportDeptNo='' "); + } + else + { + strSql.Append(" AND e.ImportDeptNo ='"+ queryParam["ImportDeptNo"].ToString() + "'"); + } + } strSql.Append(@" group by AcademicYearNo, Semester, ExamDate, ExamTime,LessonNo, LessonName,ClassRoomNo,ClassRoomName,EmpNo, EmpName, ClassNo,ClassName,t.EPId having count(StuNo)>0"); @@ -180,6 +192,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { strSql.Append(" AND ( t.ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND t.ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); } + if (!queryParam["ImportDeptNo"].IsEmpty()) + { + if (queryParam["ImportDeptNo"].ToString() == "0") + { + strSql.Append(" AND e.ImportDeptNo='' "); + } + else + { + strSql.Append(" AND e.ImportDeptNo ='"+ queryParam["ImportDeptNo"].ToString() + "' "); + } + + } strSql.Append(@"group by t.lessonName,t.lessonno,t.Examdate,t.examtime,t.EmpName,t.EmpNo,t.ClassroomNo,t.ClassroomName ,l.TeachMajorNo,e.AcademicYearNo ,e.Semester "); return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); } @@ -256,7 +280,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); } + if (!queryParam["ImportDeptNo"].IsEmpty()) + { + if (queryParam["ImportDeptNo"].ToString() == "0") + { + strSql.Append(" AND e.ImportDeptNo='' "); + } + else + { + strSql.Append(" AND e.ImportDeptNo ='" + queryParam["ImportDeptNo"].ToString() + "' "); + } + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), null, pagination); } catch (Exception ex) @@ -329,6 +364,14 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { strSql.Append(" AND ( ExamDate >= '" + queryParam["StartTime"].ToString() + "' AND ExamDate <= '" + queryParam["EndTime"].ToString() + "' ) "); } + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and e.AcademicYearNo='" + queryParam["AcademicYearNo"].ToString() + "' "); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and e.Semester='" + queryParam["Semester"].ToString() + "' "); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs index 7813e7ee1..4067a5035 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/Exam_ExamPlanLesson/Exam_ExamPlanLessonService.cs @@ -546,7 +546,7 @@ left join CdLessonType ltype on info.LessonTypeId=ltype.LTId where t.EPId='{ExamPlanLesson.EPId}' and info.CheckMark=1 "); } var EPLesson = EPLessonList.Where(x => x.EPLId == ExamPlanLesson.EPLId).FirstOrDefault(); - if (EPLessonList.ToList().Exists(x => x.EPLId != entity.EPLId && x.TeachMajorNo == EPLesson.TeachMajorNo && x.ExamLength == EPLesson.ExamLength && x.ExamDate != null && x.ExamDate == entity.ExamDate && x.ExamTime == entity.ExamTime)) + if (EPLessonList.ToList().Exists(x => x.EPLId != entity.EPLId && x.TeachMajorNo == EPLesson.TeachMajorNo&&x.Grade== ExamPlanLesson.Grade && x.ExamLength == EPLesson.ExamLength && x.ExamDate != null && x.ExamDate == entity.ExamDate && x.ExamTime == entity.ExamTime)) { return (false, "同专业同时段只能安排一门课程!"); } From 1e689a1f90679a98f24b404347614e4bf4a2d659 Mon Sep 17 00:00:00 2001 From: yxq Date: Thu, 15 Jun 2023 17:58:56 +0800 Subject: [PATCH 4/7] =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E7=AE=A1=E7=90=86=20jqer?= =?UTF-8?q?uybug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Areas/LR_SystemModule/Views/Interface/Form.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Interface/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Interface/Form.js index 28169c808..10371ee68 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Interface/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_SystemModule/Views/Interface/Form.js @@ -89,7 +89,9 @@ var bootstrap = function ($, learun) { initData: function () { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/LR_SystemModule/Interface/GetEntity?keyValue=' + keyValue, function (data) { - $('#form1').lrSetFormData(data); + // $('#form1').lrSetFormData(data); + $('#F_Name').val(data.F_Name); + $('#F_Address').val(data.F_Address); var formatdata = JSON.parse(data.F_FieldsJson); $('#gridtable').jfGridSet('refreshdata', formatdata); }); From d043133c44e1fab1651ead980ef225eaa3c94601 Mon Sep 17 00:00:00 2001 From: yxq Date: Fri, 16 Jun 2023 11:45:54 +0800 Subject: [PATCH 5/7] =?UTF-8?q?=E6=AF=95=E4=B8=9A=E7=A6=BB=E6=A0=A1?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E2=80=98=E9=A1=B5=E9=9D=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuScore/ScoreQueryAllIndexTeacher.js | 33 ++++++++++--------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/ScoreQueryAllIndexTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/ScoreQueryAllIndexTeacher.js index c6df00e6d..8233b9cca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/ScoreQueryAllIndexTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/ScoreQueryAllIndexTeacher.js @@ -37,22 +37,23 @@ var bootstrap = function ($, learun) { learun.alert.warning("请选择班级!"); return; } - $.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoData', p, - function (data) { - var temparr = []; - for (var i = 0; i < data.length; i++) { - var item = {}; - item.label = data[i].text; - item.name = data[i].value; - item.width = 150; - item.align = "left"; - temparr.push(item); - } - LessonTemp = temparr; - - page.initGird(); - page.search(p); - }); + //$.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoData', { }, + // function (data) { + // var temparr = []; + // for (var i = 0; i < data.length; i++) { + // var item = {}; + // item.label = data[i].text; + // item.name = data[i].value; + // item.width = 150; + // item.align = "left"; + // temparr.push(item); + // } + // LessonTemp = temparr; + // page.initGird(); + // page.search(p); + // }); + page.initGird(); + page.search(p); }); // 刷新 From 5c3c73215f847af1cde9ce256070bfa59e3a339b Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 16 Jun 2023 14:05:08 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=AD=A6=E7=94=9F=E6=88=90=E7=BB=A9?= =?UTF-8?q?=E6=9F=A5=E7=9C=8B=E6=96=B0=20=E8=A1=8C=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuScoreController.cs | 6 + .../StuScore/StuScoreQueryIndexRow.cshtml | 35 ++++++ .../Views/StuScore/StuScoreQueryIndexRow.js | 113 ++++++++++++++++++ .../Learun.Application.Web.csproj | 2 + 4 files changed, 156 insertions(+) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs index 672fda519..dfbd0f6fc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs @@ -44,6 +44,12 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + + [HttpGet] + public ActionResult StuScoreQueryIndexRow() + { + return View(); + } [HttpGet] public ActionResult Monitor() { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.cshtml new file mode 100644 index 000000000..961fa964a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.cshtml @@ -0,0 +1,35 @@ +@{ ViewBag.Title = "全院学生成绩查看"; Layout = "~/Views/Shared/_Index.cshtml"; } + +
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+ @*
+  打印 +
*@ +
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.js") \ No newline at end of file diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.js new file mode 100644 index 000000000..e521ff479 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.js @@ -0,0 +1,113 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-06-14 11:02 + * 描 述:全院学生成绩查看 + */ +var selectedRow; +var refreshGirdData; +var bootstrap = function ($, learun) { + var stuinfo = learun.clientdata.get(['userinfo']).account; + "use strict"; + var page = { + init: function () { + page.bind(); + }, + bind: function () { + // 查询 + $('#btn_Search').on('click', function () { + var p = {}; + p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + p.Semester = $('#Semester').lrselectGet(); + p.StuNo = stuinfo; + page.search(p); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + //打印 + $('#lr_print').on('click', function () { + var AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + var Semester = $('#Semester').lrselectGet(); + var StuNo = $.trim($('#StuNo').val()); + if (StuNo == null || StuNo == "") { + learun.alert.warning("请输入学号!"); + return; + } + learun.layerForm({ + id: 'AllStuScoreQueryPrint', + title: '学生成绩单', + url: top.$.rootUrl + '/EducationalAdministration/StuScore/AllStuScoreQueryPrint?StuNo=' + StuNo + '&AcademicYearNo=' + AcademicYearNo + '&Semester=' + Semester, + width: 1200, + height: 800, + btn: null + }); + }); + //学年 + $('#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' + }); + $.get({ + url: '/Home/GetYearAndSemesteResult', + dataType:'json', + success: function (ref) { + if (ref.code == 200) { + $('#AcademicYearNo').lrselectSet(ref.data.Item1); + $('#Semester').lrselectSet(ref.data.Item3); + setTimeout(page.initGird,1000); + } + } + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScoreListByStuInfo', + headData: [ + { label: '学号', name: 'StuNo', width: 100, align: "left" }, + { label: '姓名', name: 'StuName', width: 200, align: "left" }, + { label: '专业', name: 'MajorName', width: 100, align: "left" }, + { label: '班级', name: 'ClassName', width: 100, align: "left" }, + { label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, + { label: '学期', name: 'Semester', width: 50, align: "left" }, + { label: '科目类型', name: 'LessonSortName', width: 60, align: "left" }, + { label: '科目', name: 'LessonName', width: 300, align: "left" }, + { label: '学分', name: 'StudyScore', width: 50, align: "left" }, + { label: '成绩', name: 'Score', width: 100, align: "left" }, + { label: '第一次补考成绩', name: 'ScoreOfNotPass', width: 100, align: "left" }, + { label: '第二次补考成绩', name: 'ScoreOfNotPassTwo', width: 100, align: "left" }, + { label: '专业排名', name: 'RankInMajor', width: 100, align: "left" }, + { label: '班级排名', name: 'RankInClass', width: 100, align: "left" }, + ], + mainId: 'StuNo', + isPage: false, + sidx: '', + sord: '', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + param.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + param.Semester = $('#Semester').lrselectGet(); + param.StuNo = stuinfo; + $('#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 bb975cf12..d927cd965 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,7 @@ + @@ -8223,6 +8224,7 @@ + From 79757c2d864e4eb6ca87ee5a09b1e22777b1a5df Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 16 Jun 2023 16:37:01 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E5=AD=A6=E5=AD=90=E5=9C=A8=E7=BA=BF=20?= =?UTF-8?q?=E8=80=83=E8=AF=95=E6=88=90=E7=BB=A9=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/StuScore/AllStuScoreQueryIndex.js | 3 ++- .../Views/StuScore/StuScoreQueryIndexRow.js | 3 ++- .../EducationalAdministration/StuScore/StuScoreEntity.cs | 3 +++ .../EducationalAdministration/StuScore/StuScoreService.cs | 3 ++- Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js | 2 +- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js index a8553a604..ab9e81d94 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js @@ -79,7 +79,8 @@ var bootstrap = function ($, learun) { { label: '班级', name: 'ClassName', width: 100, align: "left" }, { label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, { label: '学期', name: 'Semester', width: 50, align: "left" }, - { label: '科目类型', name: 'LessonSortName', width: 60, align: "left" }, + { label: '课程分类', name: 'LessonSortName', width: 60, align: "left" }, + { label: '课程类型', name: 'LessonTypeName', width: 100, align: "left" }, { label: '科目', name: 'LessonName', width: 300, align: "left" }, { label: '学分', name: 'StudyScore', width: 50, align: "left" }, { label: '成绩', name: 'Score', width: 100, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.js index e521ff479..64f5f5495 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndexRow.js @@ -82,7 +82,8 @@ var bootstrap = function ($, learun) { { label: '班级', name: 'ClassName', width: 100, align: "left" }, { label: '学年', name: 'AcademicYearNo', width: 50, align: "left" }, { label: '学期', name: 'Semester', width: 50, align: "left" }, - { label: '科目类型', name: 'LessonSortName', width: 60, align: "left" }, + { label: '课程分类', name: 'LessonSortName', width: 60, align: "left" }, + { label: '课程类型', name: 'LessonTypeName', width: 100, align: "left" }, { label: '科目', name: 'LessonName', width: 300, align: "left" }, { label: '学分', name: 'StudyScore', width: 50, align: "left" }, { label: '成绩', name: 'Score', width: 100, align: "left" }, diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs index bf927f178..f6fc35187 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreEntity.cs @@ -420,6 +420,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [NotMapped] public string LessonSortName { get; set; } + + [NotMapped] + public string LessonTypeName { get; set; } /// /// 专业名称 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs index c75eb02e4..3a16194ff 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs @@ -2215,7 +2215,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad tableName = queryParam["TableName"].ToString(); } var strSql = new StringBuilder(); - strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,li.StudyScore,ls.LessonSortName,bb.Score,(case when sp.Score>=60 then 60 else sp.score end) as ScoreOfNotPass,(case when spt.Score>=60 then 60 else spt.Score end) as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName "); + strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName,bb.MajorNo,bb.ClassNo,li.StudyScore,ls.LessonSortName,lt.LessonTypeName,bb.Score,(case when sp.Score>=60 then 60 else sp.score end) as ScoreOfNotPass,(case when spt.Score>=60 then 60 else spt.Score end) as ScoreOfNotPassTwo,cm.MajorName,ci.ClassName "); strSql.Append(" from ( "); strSql.Append($"select s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,s.MajorNo,s.ClassNo,Max(s.Score) as Score from {tableName} s left join StuInfoBasic sb on s.StuNo=sb.StuNo "); strSql.Append(" where 1=1 and s.CheckMark='1' "); @@ -2246,6 +2246,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad strSql.Append(" left join LessonInfo li on bb.LessonNo= li.LessonNo and li.CheckMark='1' "); strSql.Append(" left join CdMajor cm on bb.MajorNo= cm.MajorNo and cm.CheckMark='1' "); strSql.Append(" left join ClassInfo ci on bb.ClassNo= ci.ClassNo and ci.CheckMark='1' "); + strSql.Append(" left join CdLessonType lt on li.LessonTypeId=lt.ltid and lt.LTEnabled='1' "); var result = this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); diff --git a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js index 11fb89502..5cad72901 100644 --- a/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js +++ b/Learun.Framework.Ultimate V7/LearunApp-2.2.0/config.js @@ -16,7 +16,7 @@ export default { // "http://localhost:8088/" // ], "apiHost": [ - "http://localhost:31173/" + "http://10.30.0.10:9002/" // "/api/", ], "webHost":"http://10.30.0.10:8000/",