From 4dc9e3c644de4a3cee5c4359923c3c0bbec7a355 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Thu, 21 Sep 2023 18:00:21 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E8=B5=84?= =?UTF-8?q?=E5=8A=A9-=E5=A5=96=E5=AD=A6=E9=87=91=EF=BC=9A=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E5=8F=AF=E4=BB=A5=E5=8F=91=E8=B5=B7=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../SchoolLevelScholarshipController.cs | 52 ++++++++ .../FormOfStudent.cshtml | 105 ++++++++++++++++ .../SchoolLevelScholarship/FormOfStudent.js | 115 ++++++++++++++++++ .../IndexInStuScoreOfStudent.cshtml | 111 +++++++++++++++++ .../IndexInStuScoreOfStudent.js | 100 +++++++++++++++ .../IndexOfStudent.cshtml | 8 ++ .../SchoolLevelScholarship/IndexOfStudent.js | 71 ++++++++++- .../Learun.Application.Web.csproj | 4 + .../SchoolLevelScholarshipService.cs | 4 +- .../StuScore/StuScoreService.cs | 5 + 10 files changed, 573 insertions(+), 2 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormOfStudent.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormOfStudent.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScoreOfStudent.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScoreOfStudent.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs index 663b70d7e..03fc6de52 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/SchoolLevelScholarshipController.cs @@ -87,7 +87,35 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 表单页【学生】 + /// + /// + [HttpGet] + public ActionResult FormOfStudent() + { + var logUser = LoginUserInfo.Get(); + var stuinfo = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(logUser.account); + ViewBag.StuNo = stuinfo?.StuNo; + ViewBag.StuName = stuinfo?.StuName; + ViewBag.DeptNo = stuinfo?.DeptNo; + ViewBag.ClassNo = stuinfo?.ClassNo; + ViewBag.IdentityCardNo = stuinfo?.IdentityCardNo; + ViewBag.OpenBank = stuinfo?.DepositBank; + ViewBag.OpenAccount = stuinfo?.BankCard; + + return View(); + } + /// + /// 表单页 + /// + /// + [HttpGet] + public ActionResult IndexInStuScoreOfStudent() + { + return View(); + } #endregion @@ -204,6 +232,30 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success(result); } + /// + /// 获取班级成绩列表 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetScoreRankByStuNo(string queryJson) + { + var param = queryJson.ToObject(); + var logUser = LoginUserInfo.Get(); + var stuinfo = stuInfoBasicIBLL.GetStuInfoBasicEntityByStuNo(logUser.account); + + var data = stuScoreIBLL.GetScoreListByStuNo(param.AcademicYearNo, param.Semester, logUser.account, stuinfo?.ClassNo); + + var result = new List>(); + var aaa = new Dictionary(); + aaa.Add("Rank", data.Rank.ToString()); + aaa.Add("TotalNum", data.TotalNum.ToString()); + aaa.Add("TotalScore", data.TotalScore.ToString()); + result.Add(aaa); + + return Success(result); + } + /// /// 获取表单数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormOfStudent.cshtml new file mode 100644 index 000000000..0bd8f86f7 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormOfStudent.cshtml @@ -0,0 +1,105 @@ +@{ + ViewBag.Title = "校级奖学金"; + Layout = "~/Views/Shared/_Form.cshtml"; +} + +
+
+
姓名*
+ + 选择成绩 +
+
+
学号*
+ +
+
+
所属院系
+
+
+
+
所属班级
+
+
+
+
身份证件类型*
+
+
+
+
身份证件号
+ +
+
+
学年
+ +
+
+
学期
+ +
+
+
班级总人数*
+ +
+
+
成绩排名名次*
+ +
+
+
开户银行
+
+
+
+
开户行账号
+ +
+
+
开户行号
+ +
+
+
资助等级*
+
+
+
+
资助标准*
+ +
+
+
应发金额*
+ +
+
+
实发金额*
+ +
+
+
申请日期
+ +
+
+
发放日期*
+ +
+
+
申请理由*
+ +
+
+
备注
+ +
+
+
附件
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormOfStudent.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormOfStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormOfStudent.js new file mode 100644 index 000000000..dfd809b9c --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/FormOfStudent.js @@ -0,0 +1,115 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2023-03-16 11:49 + * 描 述:校级奖学金 + */ +var acceptClick; +var bindData; +var keyValue = request('keyValue'); +var Step = request('Step');//第几步 +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + $('.lr-form-wrap').lrscroll(); + page.hide(); + page.bind(); + page.initData(); + }, + hide: function () { + if (Step == "2") {//第二步:二级学院审核,时附件显示且必填; + $('#FilesDiv').show(); + $('#Url').attr('isvalid', 'yes'); + $('#Url').attr('checkexpession', 'NotNull'); + $('#Url').prev().html('附件*'); + } else { + $('#Url').removeAttr('isvalid'); + $('#Url').removeAttr('checkexpession'); + $('#Url').prev().html('附件'); + $('#FilesDiv').hide(); + } + }, + bind: function () { + $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); + $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + $('#IdCardType').lrDataItemSelect({ code: 'IdCardType' }); + $('#IdCardType').lrselectSet("01"); + $('#DepositBank').lrDataItemSelect({ code: 'DepositBank' }); + $('#FundingLevel').lrDataItemSelect({ + code: 'SchoolFundingLevel', + select: function (item) { + if (!!item) { + $('#FundingCriteria').val(item.id); + $('#ShoudAmount').val(item.id); + $('#ActualAmount').val(item.id); + } + } + }); + $('#ApplyDate').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); + $('#Url').lrUploader(); + //根据登录用户自动带出内容:姓名 院系 班级 身份证件号 开户银行 开户卡账号 + var timer = setTimeout(function () { + $("#StuNo").val(StuNo); + $("#StuName").val(StuName); + $("#DeptNo").lrselectSet(DeptNo); + $("#ClassNo").lrselectSet(ClassNo); + $("#IdCard").val(IdentityCardNo); + $("#DepositBank").lrselectSet(OpenBank); + $("#BankCard").val(OpenAccount); + clearTimeout(timer); + }, 10); + //选择成绩 + $("#lr_select").on('click', function () { + learun.layerForm({ + id: 'StuDentSelect', + title: '选择学生成绩', + url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/IndexInStuScoreOfStudent', + width: 1200, + height: 800, + callBack: function (id) { + return top[id].acceptClick(bindData); + } + }); + }); + }, + initData: function () { + if (!!keyValue) { + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/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 postData = { + strEntity: JSON.stringify($('body').lrGetFormData()) + }; + $.lrSaveForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + }; + bindData = function (data) { + if (!!data) { + $('#AcademicYearNo').val(data.AcademicYearNo); + $('#Semester').val(data.Semester); + $('#CalssNum').val(data.TotalNum); + $('#ClassRank').val(data.Rank); + } + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScoreOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScoreOfStudent.cshtml new file mode 100644 index 000000000..007460a05 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScoreOfStudent.cshtml @@ -0,0 +1,111 @@ +@{ ViewBag.Title = "全院班级成绩查看"; Layout = "~/Views/Shared/_Index.cshtml"; } + + +
+
+
+
+
+
+
+
+
+
+
+
+  查询 +
+
+
+
+ +
+
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScoreOfStudent.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScoreOfStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScoreOfStudent.js new file mode 100644 index 000000000..4c05a75b4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexInStuScoreOfStudent.js @@ -0,0 +1,100 @@ +/* * 版 本 Learun-ADMS-Ultimate V7.0.0 数字化智慧校园(http://www.learun.cn) + * Copyright (c) 2013-2018 北京泉江科技有限公司 + * 创建人:超级管理员 + * 日 期:2019-06-14 11:02 + * 描 述:全院班级成绩查看 + */ +var selectedRow; +var refreshGirdData; +var acceptClick; +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(); + if (p.AcademicYearNo == null || p.AcademicYearNo == "") { + learun.alert.warning("请选择学年!"); + return; + } + if (p.Semester == null || p.Semester == "") { + 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 () { + var headDatas = [ + { label: '排名', name: 'Rank', width: 100, align: "left" }, + { label: '班级总人数', name: 'TotalNum', width: 100, align: "left" }, + { label: '总分', name: 'TotalScore', width: 100, align: "left" }, + ]; + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/GetScoreRankByStuNo', + headData: headDatas, + mainId: 'StuNo', + isPage: false, + sidx: 'TotalScore', + sord: 'desc', + isMultiselect: false + }); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + page.search(); + }; + // 保存数据 + acceptClick = function (callBack) { + var row = $('#gridtable').jfGridGet('rowdata'); + if ($.isEmptyObject(row)) { + learun.alert.warning("请选择学生!"); + return false; + } + + row.AcademicYearNo = $('#AcademicYearNo').lrselectGet(); + row.Semester = $('#Semester').lrselectGet(); + + if (!!callBack) { + callBack(row); + return true; + } + + }; + page.init(); +} diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.cshtml index 5adf005ab..e4e9e5e20 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.cshtml @@ -58,8 +58,16 @@
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.js index f6843e3d4..2a1f1b995 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/SchoolLevelScholarship/IndexOfStudent.js @@ -99,6 +99,76 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); + // 新增 + $('#lr_add').on('click', function () { + learun.layerForm({ + id: 'form', + title: '新增', + url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/FormOfStudent', + width: 1100, + height: 700, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + }); + // 编辑 + $('#lr_edit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != "0") { + learun.alert.warning("当前项不属于草稿状态,无法编辑!"); + return false; + } + learun.layerForm({ + id: 'form', + title: '编辑', + url: top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/FormOfStudent?keyValue=' + keyValue, + width: 1100, + height: 700, + callBack: function (id) { + return top[id].acceptClick(refreshGirdData); + } + }); + } + }); + // 删除 + $('#lr_delete').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != "0") { + learun.alert.warning("当前项不属于草稿状态,无法删除!"); + return false; + } + learun.layerConfirm('是否确认删除该项!', function (res) { + if (res) { + learun.deleteForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/DeleteForm', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + } + }); + // 提交二级学院审核 + $('#lr_submit').on('click', function () { + var keyValue = $('#gridtable').jfGridValue('Id'); + if (learun.checkrow(keyValue)) { + var Status = $('#gridtable').jfGridValue('Status'); + if (Status != "0") { + learun.alert.warning("当前项不属于草稿状态,无法提交学院审核!"); + return false; + } + learun.layerConfirm('是否确认提交该项!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/SchoolLevelScholarship/DoSubmit', { keyValue: keyValue, status: '1', step: '1' }, function () { + refreshGirdData(); + }); + } + }); + } + }); // 查看 $('#lr_view').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); @@ -279,7 +349,6 @@ var bootstrap = function ($, learun) { param.EndTimeRelease = endTimeRelease; if (learun.clientdata.get(['userinfo']).account.toLowerCase() != "system") { param.StuNo = learun.clientdata.get(['userinfo']).account;//学生学号 - param.Status = 3; } $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); } 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 ecf2e6f21..1ffc03b47 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 @@ -1033,7 +1033,9 @@ + + @@ -8311,6 +8313,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SchoolLevelScholarship/SchoolLevelScholarshipService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SchoolLevelScholarship/SchoolLevelScholarshipService.cs index b2d558bb2..f86f12f69 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SchoolLevelScholarship/SchoolLevelScholarshipService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/SchoolLevelScholarship/SchoolLevelScholarshipService.cs @@ -33,7 +33,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration strSql.Append("SELECT t.* "); strSql.Append(" FROM SchoolLevelScholarship t "); strSql.Append(" left join StuInfoBasic s on t.StuNo=s.StuNo "); - strSql.Append(" left join ClassInfo c on t.CreateUserNo=c.ClassTutorNo and s.ClassNo=c.ClassNo "); + //资助调整为学生可以申请后,取消对发起人必须是班级辅导员的限制 + //strSql.Append(" left join ClassInfo c on t.CreateUserNo=c.ClassTutorNo and s.ClassNo=c.ClassNo "); + strSql.Append(" left join ClassInfo c on s.ClassNo=c.ClassNo "); strSql.Append(" left join CdDept d on c.DeptNo=d.DeptNo "); strSql.Append(" WHERE 1=1 "); var queryParam = queryJson.ToJObject(); 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 793e7669f..33a099a80 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 @@ -877,6 +877,7 @@ where AcademicYearNo='" + strAcademicYear + "' and Semester='" + strSemester + " var rank = aaa.Select(x => x.StuNo).ToList().IndexOf(stuNo); var totalScore = aaa.FirstOrDefault(x => x.StuNo == stuNo)?.Score; + result.TotalNum = aaa.Count(); result.Rank = rank + 1; result.TotalScore = totalScore.Value; } @@ -909,6 +910,10 @@ where AcademicYearNo='" + strAcademicYear + "' and Semester='" + strSemester + " /// 综合成绩 ///
public decimal TotalScore { get; set; } + /// + /// 班级总人数 + /// + public int TotalNum { get; set; } } ///