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 905be20de..d5e16926b 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 @@ -183,6 +183,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 全院学生成绩查看页面 + /// + /// + [HttpGet] + public ActionResult AllStuScoreQueryIndex() + { + return View(); + } #endregion #region 获取数据 @@ -715,6 +724,24 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success(result); } + /// + /// 全院学生成绩查看 + /// + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetScoreListByStuNo2(string queryJson) + { + var data = stuScoreIBLL.GetScoreListByStuNo(queryJson); + if (data.Any()) + { + data = data.OrderByDescending(x => x.AcademicYearNo).ThenByDescending(x => x.Semester).ThenBy(x => x.LessonNo); + } + + return Success(data); + } + public ActionResult GetScoreCharts(string AcademicYearNo, string Semester, string ClassNo, string LessonNo) { var data = stuScoreIBLL.GetScoreCharts(AcademicYearNo, Semester, ClassNo, LessonNo); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.cshtml new file mode 100644 index 000000000..fabcc03bc --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.cshtml @@ -0,0 +1,36 @@ +@{ ViewBag.Title = "全院学生成绩查看"; Layout = "~/Views/Shared/_Index.cshtml"; } + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+  查询 +
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js") + \ No newline at end of file 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 new file mode 100644 index 000000000..48543e2f5 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllStuScoreQueryIndex.js @@ -0,0 +1,83 @@ +/* * 版 本 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) { + "use strict"; + var page = { + init: function () { + page.bind(); + page.bindSelect(); + }, + bind: function () { + // 查询 + $('#btn_Search').on('click', function () { + var p = {}; + p.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + p.Semester = $('#Semester').lrselectGet(); + p.StuNo = $.trim($('#StuNo').val()); + if (p.StuNo == null || p.StuNo == "") { + learun.alert.warning("请输入学号!"); + return; + } + + page.initGird(); + page.search(p); + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + }, + bindSelect: function () { + //学年 + $('#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' + }); + }, + initGird: function () { + $('#gridtable').lrAuthorizeJfGridLei({ + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScoreListByStuNo2', + headData: [ + { label: '学号', name: 'StuNo', width: 100, align: "left" }, + { label: '姓名', name: 'StuName', width: 100, align: "left" }, + { label: '学年', name: 'AcademicYearNo', width: 100, align: "left" }, + { label: '学期', name: 'Semester', width: 100, align: "left" }, + { label: '课程编号', name: 'LessonNo', width: 100, align: "left" }, + { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, + { label: '总分', name: 'ScoreFormat', width: 100, align: "left" }, + ], + mainId: 'StuNo', + isPage: false, + sidx: '', + sord: '', + }); + + //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 7bb39fe7e..946930aaf 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 @@ -1058,6 +1058,7 @@ + @@ -7596,6 +7597,7 @@ + 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 ca55f8fe3..c155d0e53 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 @@ -1839,7 +1839,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad var strSql = new StringBuilder(); strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.LessonSortNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName "); strSql.Append(" ,case when bb.LessonSortNo='2' then bb.Score else (case when bb.Score >=60 then bb.Score else (case when sp.Score>= 60 then sp.Score else (case when spt.Score>=60 then spt.Score else bb.Score end) end) end) end as Score "); - strSql.Append(" ,case when bb.LessonSortNo='2' then convert(nvarchar(50),bb.Score) else (case when bb.Score >=60 then convert(nvarchar(50),bb.Score) else (case when sp.Score>= 60 then convert(nvarchar(50),sp.Score)+'(补)' else (case when spt.Score>=60 then convert(nvarchar(50),spt.Score)+'(重)' else convert(nvarchar(50),bb.Score) end) end) end) end as ScoreFormat "); + strSql.Append(" ,case when bb.LessonSortNo='2' then convert(nvarchar(50),bb.Score)+'(选修)' else (case when bb.Score >=60 then convert(nvarchar(50),bb.Score) else (case when sp.Score>= 60 then convert(nvarchar(50),sp.Score)+'(补)' else (case when spt.Score>=60 then convert(nvarchar(50),spt.Score)+'(重)' else convert(nvarchar(50),bb.Score) end) end) end) end as ScoreFormat "); strSql.Append(" from ( "); strSql.Append($"select s.AcademicYearNo,s.Semester,s.LessonSortNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,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' ");