From ef8a81b8e0d1ef7c81f34759f984925cfdfd1c1b Mon Sep 17 00:00:00 2001 From: dyy <807692433@qq.com> Date: Sat, 8 Oct 2022 18:18:45 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=BF=AE=E6=94=B9=E3=80=91=E5=AD=A6?= =?UTF-8?q?=E7=94=9F=E8=AF=81=E4=B9=A6=E7=AE=A1=E7=90=86=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E5=AD=A6=E5=B9=B4=E5=AD=A6=E6=9C=9F=EF=BC=9B=E5=AD=A6=E4=B8=9A?= =?UTF-8?q?=E6=88=90=E7=BB=A9=E8=80=83=E6=A0=B8=E8=A1=A8=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/ScoreCheckInfoController.cs | 4 +- .../ScoreCheckInfo/RecordTablePrint.cshtml | 2 +- .../Views/StudentCertificate/Form.cshtml | 40 +++++++++++-------- .../Views/StudentCertificate/Form.js | 16 ++++++++ .../Views/StudentCertificate/Index.cshtml | 8 ++++ .../Views/StudentCertificate/Index.js | 26 ++++++++++-- .../ScoreCheckInfo/ScoreCheckInfoService.cs | 2 +- .../StudentCertificateBLL.cs | 4 +- .../StudentCertificateEntity.cs | 10 +++++ .../StudentCertificateIBLL.cs | 2 +- .../StudentCertificateService.cs | 34 ++++++++++++++-- 11 files changed, 118 insertions(+), 30 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs index f314a4c01..7a864b8e0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/ScoreCheckInfoController.cs @@ -100,8 +100,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } } - //职业资格证书(-表中无学年学期字段???待增加 todo:) - entity.StudentCertificateList = studentCertificateIBLL.GetList(entity.StuNo).OrderByDescending(x => x.CreateTime).ToList(); + //职业资格证书 + entity.StudentCertificateList = studentCertificateIBLL.GetList("{\"AcademicYearNo\":\"" + entity.AcademicYearNo + "\",\"Semester\":\"" + entity.Semester + "\",\"StuNo\":\"" + entity.StuNo + "\"}").OrderByDescending(x => x.CreateTime).ToList(); //奖罚情况 entity.StuEncourgementList = stuEncourgementIBLL.GetEncourgementListByStuNo(entity.AcademicYearNo, entity.Semester, entity.StuNo).ToList(); entity.StuPunishmentList = stuPunishmentIBLL.GetPunishmentListByStuNo(entity.AcademicYearNo, entity.Semester, entity.StuNo).ToList(); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/RecordTablePrint.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/RecordTablePrint.cshtml index 7e2598386..b1fb5379f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/RecordTablePrint.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/ScoreCheckInfo/RecordTablePrint.cshtml @@ -20,7 +20,7 @@
-

学生成绩考核记载表( @Model.AcademicYearNo 学年,第 @Model.Semester 学期)

+

学生成绩考核记载表(@Model.AcademicYearNo学年,第@Model.Semester学期)

@{ var scoreList = Model.StuScoreList as IEnumerable; diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.cshtml index 58b5233ba..2862393b1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.cshtml @@ -3,49 +3,57 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
-
+
+
学年*
+
+
+
+
学期*
+
+
+
学生学号*
-
+
学生姓名*
-
+
专业部*
-
+
-
+
专业*
-
+
-
+
班级*
-
+
-
+
证书名称*
-
+
证书级别*
-
+
证书种类*
-
+
分值*
-
+
获取时间*
- +
-
+
附件上传
-
+
@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StudentCertificate/Form.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.js index b9084206b..4d5744584 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Form.js @@ -43,6 +43,22 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.cshtml index 4b65b764f..adc2f3ffd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.cshtml @@ -10,6 +10,14 @@
+
+
学年
+
+
+
+
学期
+
+
学生学号
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.js index 820478021..280c34adf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StudentCertificate/Index.js @@ -20,6 +20,22 @@ var bootstrap = function ($, learun) { $('#DeptNo').lrDataSourceSelect({ code: 'CdDeptInfo', value: 'deptno', text: 'deptname' }); $('#MajorNo').lrDataSourceSelect({ code: 'CdMajorInfo', value: 'majorno', text: 'majorname' }); $('#ClassNo').lrDataSourceSelect({ code: 'bjsj', value: 'classno', text: 'classname' }); + //学年 + $('#AcademicYearNo').lrselect({ + placeholder: "请选择学年", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "请选择学期", + allowSearch: true, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetSemester', + value: 'value', + text: 'text' + }); // 刷新 $('#lr_refresh').on('click', function () { location.reload(); @@ -30,8 +46,8 @@ var bootstrap = function ($, learun) { id: 'form', title: '新增', url: top.$.rootUrl + '/EducationalAdministration/StudentCertificate/Form', - width: 720, - height: 550, + width: 800, + height: 600, callBack: function (id) { var res = false; // 验证数据 @@ -53,8 +69,8 @@ var bootstrap = function ($, learun) { id: 'form', title: '编辑', url: top.$.rootUrl + '/EducationalAdministration/StudentCertificate/Form?keyValue=' + keyValue, - width: 720, - height: 550, + width: 800, + height: 600, callBack: function (id) { var res = false; // 验证数据 @@ -164,6 +180,8 @@ var bootstrap = function ($, learun) { $('#gridtable').jfGrid({ url: top.$.rootUrl + '/EducationalAdministration/StudentCertificate/GetPageList', headData: [ + { label: "学年", name: "AcademicYearNo", width: 80, align: "left" }, + { label: "学期", name: "Semester", width: 80, align: "left" }, { label: "学生学号", name: "StuNo", width: 150, align: "left" }, { label: "学生姓名", name: "StuName", width: 100, align: "left" }, { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs index 2e4d230e6..0ab04206b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/ScoreCheckInfo/ScoreCheckInfoService.cs @@ -31,7 +31,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration { var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append(@" * "); + strSql.Append(@" t.* "); strSql.Append(" FROM ScoreCheckInfo t "); 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/StudentCertificate/StudentCertificateBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateBLL.cs index 3c21d13e7..751dd057f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateBLL.cs @@ -71,11 +71,11 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 获取页面显示列表数据 /// /// - public IEnumerable GetList(string stuNo) + public IEnumerable GetList(string queryJson) { try { - return studentCertificateService.GetList(stuNo); + return studentCertificateService.GetList(queryJson); } catch (Exception ex) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateEntity.cs index 0ccdc6e68..59a33a8a3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateEntity.cs @@ -94,6 +94,16 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// [Column("STATUS")] public int? Status { get; set; } + /// + /// 学年 + /// + [Column("ACADEMICYEARNO")] + public string AcademicYearNo { get; set; } + /// + /// 学期 + /// + [Column("SEMESTER")] + public string Semester { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateIBLL.cs index 1440a15cf..72e2ce42c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateIBLL.cs @@ -33,7 +33,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 获取页面显示列表数据 /// /// - IEnumerable GetList(string stuNo); + IEnumerable GetList(string queryJson); /// /// 获取主表实体数据 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateService.cs index 73e70a266..a534979ca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StudentCertificate/StudentCertificateService.cs @@ -146,12 +146,40 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 获取页面显示列表数据 /// /// - public IEnumerable GetList(string stuNo) + public IEnumerable GetList(string queryJson) { try { - return this.BaseRepository("CollegeMIS").FindList(x => x.StuNo == stuNo && x.Status==2); - + var strSql = new StringBuilder(); + strSql.Append("SELECT t.* "); + strSql.Append(" FROM StudentCertificate t "); + strSql.Append(" WHERE 1=1 and t.Status=2 "); + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + if (!queryParam["StuNo"].IsEmpty()) + { + dp.Add("StuNo", queryParam["StuNo"].ToString(), DbType.String); + strSql.Append(" AND t.StuNo = @StuNo "); + } + if (!queryParam["StuName"].IsEmpty()) + { + dp.Add("StuName", "%" + queryParam["StuName"].ToString() + "%", DbType.String); + strSql.Append(" AND t.StuName Like @StuName "); + } + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" AND t.AcademicYearNo = @AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" AND t.Semester = @Semester "); + } + + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + } catch (Exception ex) {