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 7a2499caa..079358e44 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
@@ -79,6 +79,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return View();
}
///
+ /// 个人成绩查看
+ ///
+ ///
+ [HttpGet]
+ public ActionResult StuScoreQueryIndex()
+ {
+ var logininfo = LoginUserInfo.Get();
+ ViewBag.StuNo = logininfo.account;
+ return View();
+ }
+ ///
/// 毕业证资格审核(班主任)
///
///
@@ -597,6 +608,22 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success(data);
}
+ ///
+ /// 根据StuNo查询班级课程
+ ///
+ ///
+ ///
+ ///
+ ///
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetLessonNoDataFromStuNo(string academicYearNo, string semester, string StuNo)
+ {
+ var data = stuScoreIBLL.GetLessonNoDataFromStuNo(academicYearNo, semester, StuNo).OrderBy(x => x.value);
+
+ return Success(data);
+ }
+
///
/// 获取班级成绩列表
///
@@ -638,6 +665,43 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
return Success(result);
}
+ [HttpGet]
+ [AjaxOnly]
+ public ActionResult GetScoreListByStuNo(string queryJson)
+ {
+ var data = stuScoreIBLL.GetScoreListByStuNo(queryJson);
+ var stuData = stuInfoBasicIBLL.GetAllList();
+
+ var aa = data.GroupBy(x => new { x.StuNo, x.StuName, x.StuId }).Select(x => new
+ {
+ StuId = x.Key.StuId,
+ StuNo = x.Key.StuNo,
+ StuName = x.Key.StuName,
+ FinishSchoolMark = stuData.FirstOrDefault(a => a.StuNo == x.Key.StuNo)?.FinishSchoolMark,
+ TotalScore = x.Where(m=>m.LessonSortNo=="1").Select(y => y.Score).Sum(),
+ LessonInfo = x.Select(y => new { y.LessonNo, y.LessonName, y.Score }).OrderBy(y => y.LessonNo)
+ }).OrderByDescending(x => x.TotalScore);
+
+ var result = new List>();
+ foreach (var item in aa)
+ {
+ var aaa = new Dictionary();
+ aaa.Add("StuId", item.StuId);
+ aaa.Add("StuNo", item.StuNo);
+ aaa.Add("StuName", item.StuName);
+ aaa.Add("FinishSchoolMark", item.FinishSchoolMark);
+ aaa.Add("TotalScore", item.TotalScore.ToString());
+ foreach (var lessonInfoItem in item.LessonInfo)
+ {
+ aaa.Add(lessonInfoItem.LessonNo, lessonInfoItem.Score.ToString());
+ }
+
+ result.Add(aaa);
+ }
+
+ return Success(result);
+ }
+
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/StuScoreQueryIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndex.cshtml
new file mode 100644
index 000000000..e546cdf54
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndex.cshtml
@@ -0,0 +1,202 @@
+@{ ViewBag.Title = "个人成绩查看"; Layout = "~/Views/Shared/_Index.cshtml"; }
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndex.js")
+
+
\ No newline at end of file
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndex.js
new file mode 100644
index 000000000..9a228a46e
--- /dev/null
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/StuScoreQueryIndex.js
@@ -0,0 +1,104 @@
+/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn)
+ * Copyright (c) 2013-2018 北京泉江科技有限公司
+ * 创建人:超级管理员
+ * 日 期:2019-06-14 11:02
+ * 描 述:个人成绩查看
+ */
+var selectedRow;
+var refreshGirdData;
+//课程列
+var LessonTemp = [];
+var bootstrap = function ($, learun) {
+ "use strict";
+ var page = {
+ init: function () {
+ //page.initGird();
+ page.bind();
+ page.bindSelect();
+ },
+ bind: function () {
+ // 查询
+ $('#btn_Search').on('click', function () {
+ var p = {};
+ p.AcademicYearNo = $('#AcademicYearNo').lrselectGet();
+ p.Semester = $('#Semester').lrselectGet();
+ p.StuNo = StuNo;
+ if (p.AcademicYearNo == null || p.AcademicYearNo == "") {
+ learun.alert.warning("请选择学年!");
+ return;
+ }
+ if (p.Semester == null || p.Semester == "") {
+ learun.alert.warning("请选择学期!");
+ return;
+ }
+ $.lrSetFormWithParam(top.$.rootUrl + '/EducationalAdministration/StuScore/GetLessonNoDataFromStuNo', 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);
+ });
+
+ });
+ // 刷新
+ $('#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 () {
+ var headData = [
+ { label: '学号', name: 'StuNo', width: 100, align: "left" },
+ { label: '姓名', name: 'StuName', width: 100, align: "left" },
+ { label: '总分', name: 'TotalScore', width: 100, align: "left" },
+ ];
+ var headDatas = headData.concat(LessonTemp);
+
+ $("#gridtable")[0].dfop = undefined;
+ $('#gridtable').lrAuthorizeJfGridLei({
+ url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetScoreListByStuNo',
+ headData: headDatas,
+ mainId: 'StuNo',
+ isPage: false,
+ sidx: 'TotalScore',
+ 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 3af8213ac..5ddbcdbe1 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
@@ -960,6 +960,7 @@
+
@@ -6794,6 +6795,7 @@
+
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs
index ce39ac260..9fc249220 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs
@@ -657,6 +657,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
}
}
}
+
+ public IEnumerable GetScoreListByStuNo(string queryJson)
+ {
+ try
+ {
+ return stuScoreService.GetScoreListByStuNo(queryJson);
+ }
+ catch (Exception ex)
+ {
+ if (ex is ExceptionEx)
+ {
+ throw;
+ }
+ else
+ {
+ throw ExceptionEx.ThrowBusinessException(ex);
+ }
+ }
+ }
+
public List