From 31bf0807e05627bc29a9e7f8883964675151a421 Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Mon, 21 Oct 2024 09:52:00 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=A2=9E=E5=8A=A0=E3=80=91=E5=BE=80?= =?UTF-8?q?=E5=B9=B4=E6=88=90=E7=BB=A9=E7=AE=A1=E7=90=86=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../StuScoreOfPreviousController.cs | 13 ++++++ .../Views/StuScoreOfPrevious/Index.cshtml | 27 +++++++---- .../Views/StuScoreOfPrevious/Index.js | 40 ++++++++++++++-- .../excel/StuScoreOfPreviousImport.xls | Bin 22016 -> 22528 bytes .../StuScoreOfPreviousBLL.cs | 24 ++++++++++ .../StuScoreOfPreviousIBLL.cs | 6 +++ .../StuScoreOfPreviousService.cs | 43 +++++++++++++++++- 7 files changed, 141 insertions(+), 12 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreOfPreviousController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreOfPreviousController.cs index 9b56d8bf3..76b2f53ea 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreOfPreviousController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreOfPreviousController.cs @@ -70,6 +70,19 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 学年下拉框信息 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetAcademicYearNoData() + { + var data = stuScoreOfPreviousIBLL.GetAcademicYearNoData(); + + return Success(data); + } #endregion #region 拓展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.cshtml index 925f5020d..6ab23d3d0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.cshtml @@ -2,20 +2,31 @@ ViewBag.Title = "往年成绩管理"; Layout = "~/Views/Shared/_Index.cshtml"; } +
-
-
-
-
学号/姓名
- -
-
-
+
+
+
+
+
+
+
+
+
+ +
+ +
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.js index cfa1f208d..2ca4bfaa4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreOfPrevious/Index.js @@ -20,6 +20,38 @@ var bootstrap = function ($, learun) { $('#lr_refresh').on('click', function () { location.reload(); }); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/StuScoreOfPrevious/GetAcademicYearNoData', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + //课程类型 + $('#LessonSortNo').lrselect({ + placeholder: "课程类型", + allowSearch: false, + data: [{ id: "1", text: "必修课" }, { id: "2", text: "选修课" }] + }); + //查询 + $('#btn_Search').on('click', function () { + var param = { + AcademicYearNo: $("#AcademicYearNo").lrselectGet(), + Semester: $("#Semester").lrselectGet(), + LessonSortNo: $("#LessonSortNo").lrselectGet(), + keyword: $("#keyword").val() + }; + page.search(param); + }); //导入弹窗 $('#importBtn').on('click', function () { learun.layerForm({ @@ -62,8 +94,8 @@ var bootstrap = function ($, learun) { return cellvalue == "1" ? "必修课" : "选修课"; } }, - { label: '课程编号', name: 'LessonNo', width: 200, align: "left" }, - { label: '课程名称', name: 'LessonName', width: 200, align: "left" }, + { label: '课程编号', name: 'LessonNo', width: 150, align: "left" }, + { label: '课程名称', name: 'LessonName', width: 150, align: "left" }, { label: '学分', name: 'StudyScore', width: 100, align: "left" }, { label: '平时成绩', name: 'OrdinaryScore', width: 100, align: "left" @@ -87,7 +119,9 @@ var bootstrap = function ($, learun) { }, ], mainId: 'ScoreId', - isPage: true + isPage: true, + sidx: 'AcademicYearNo desc,Semester desc,LessonNo,StuNo', + sord: "" }); page.search(); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/StuScoreOfPreviousImport.xls b/Learun.Framework.Ultimate V7/Learun.Application.Web/Content/excel/StuScoreOfPreviousImport.xls index d545f4542e4c549083d08996a008a0246e5a002a..3975359fcf0d22bc084eeb92aa64bd22e1f0cbd8 100644 GIT binary patch delta 1135 zcmY+EJ8aWX6o&unI4|2t>LiXGSLq`vh4N5ast%{_*W-MQ?& z83_!6p$pJ>$mr!B!}9nr$QKQhFBqMC%+T2&?=U*}nvwF&BKatC%DHX4*7&8g&CjHx zY?{xf53npc7cfI+@BqY8*vCy4?1Q{F9;GpuZWB!QLzHo)kx#mS+~jCD2QAEL4gWwb!F7Vs6?tDjS4kEAqpn zj1k5J#i?mrkU=>^P=ay^K_=x)K^762UmutxBJ1m9Qyp24Pvp-n*Jy0>(y?!903&3r zO;${EmN%VOnG{olXs-qp+^YtEPIWTn7ggDG^lgbh%p{!QY>H_ie4*E5)1iAlZcTiio&1H zE%UAA)t0sLd_E!hbJEu%ANyvV)S@g6kh(V&8r-dUy=u2n}==+8(wHH{e1 zoZ?zQu(`u~m_UGLMtj{Wqh%rb=|dr}JRhOe!kX5v7XkV;c4B7{3RKK-aF8$G-sTWO zs6>l&W_&2oi85f|y;-Cu3-cKmU~y)0QPfdm>xhr7{(g-C~!NMa$} zVG9--ta($b4I7oxmJL%#p|M4#1819nG}6G90vSMXvvi}Fua>-FVI5(<3rz6ZBn2fd zxk&-0fFzYkm83Cgl7dV@Ng<|?q%KUNOOlSsDs+iq4)tVgh%uN9NhT-qk+yvi_C+K` znWB4&M~I=^SQ`FEiCitXknvcd@Cj&C(^iRLOP_wr;;=rulr zjMuGis+Y6EjH2ns#n1@&+07#dMff%!U51skHf)8dVPQJ>%2hM0s2*_VD|un0vF2NP zQS>)lKH4Wli2fcMh$?}ID`#p`pa#W&u=d#<#3 Zg=S`l=&9;ZZFW%`tMU);9zOL&{SPqayUPFo diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousBLL.cs index 1400bca57..5851cb792 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousBLL.cs @@ -42,6 +42,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + /// + /// 学年下拉框信息 + /// + /// + public IEnumerable GetAcademicYearNoData() + { + try + { + return stuScoreOfPreviousService.GetAcademicYearNoData(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + #endregion #region 拓展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousIBLL.cs index 14f6d1754..eabd8569e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousIBLL.cs @@ -22,6 +22,12 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// IEnumerable GetPageList(Pagination pagination, string queryJson); + + /// + /// 学年下拉框信息 + /// + /// + IEnumerable GetAcademicYearNoData(); #endregion #region 拓展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousService.cs index 6fed1afd0..11682a72c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreOfPrevious/StuScoreOfPreviousService.cs @@ -55,9 +55,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration var dp = new DynamicParameters(new { }); if (!queryParam["keyword"].IsEmpty()) { - strSql.Append(" and (stuno like @keyword or stuname like @keyword )"); + strSql.Append(" and (t.stuno like @keyword or t.stuname like @keyword )"); dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String); } + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append(" and t.AcademicYearNo = @AcademicYearNo "); + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append(" and t.Semester = @Semester "); + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + } + if (!queryParam["LessonSortNo"].IsEmpty()) + { + strSql.Append(" and t.LessonSortNo = @LessonSortNo "); + dp.Add("LessonSortNo", queryParam["LessonSortNo"].ToString(), DbType.String); + } return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp, pagination); } @@ -73,6 +88,32 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } } + + /// + /// 学年下拉框信息 + /// + /// + public IEnumerable GetAcademicYearNoData() + { + try + { + var data = this.BaseRepository("CollegeMIS").FindList("select distinct s.AcademicYearNo as value,s.AcademicYearNo as text from StuScoreOfPrevious s "); + data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); + return data; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion #region 拓展数据