diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassTwoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassTwoController.cs index 380f8dc62..8eec54f49 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassTwoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassTwoController.cs @@ -71,6 +71,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return View(); } + /// + /// 二次补考成绩查看 + /// + /// + [HttpGet] + public ActionResult IndexUnpassTwo() + { + return View(); + } + #endregion #region 获取数据 @@ -146,6 +156,27 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers return Success(data); } + + /// + /// 获取页面显示列表数据 + /// + /// 查询参数 + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListForUnpass(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuScoreNotPassTwoIBLL.GetPageListForUnpass(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } #endregion #region 提交数据 @@ -176,6 +207,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuScoreNotPassTwoIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } + + /// + /// 初始化二次补考成绩 + /// + /// + [HttpPost] + [AjaxOnly] + public ActionResult InitScore() + { + stuScoreNotPassTwoIBLL.InitScore(); + return Success("操作成功!"); + } #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.cshtml new file mode 100644 index 000000000..da3304a88 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.cshtml @@ -0,0 +1,58 @@ +@{ + ViewBag.Title = "二次补考成绩查看"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
年级
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
课程
+
+
+
+
班级
+
+
+
+
+
+
+ +
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.js new file mode 100644 index 000000000..2c9f8248a --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexUnpassTwo.js @@ -0,0 +1,143 @@ +/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) + * Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 + * 创建人:超级管理员 + * 日 期:2021-12-16 10:14 + * 描 述:长阳迎新 + */ +var refreshGirdData; +var bootstrap = function ($, learun) { + "use strict"; + var page = { + init: function () { + page.initGird(); + page.bind(); + }, + bind: function () { + $('#multiple_condition_query').lrMultipleQuery(function (queryJson) { + page.search(queryJson); + }, 220, 400); + $('#AcademicYearNo').lrselect({ + placeholder: "学年", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/EADateArrange/GetAcademicYearNo', + value: 'value', + text: 'text' + }); + //学期 + $('#Semester').lrselect({ + placeholder: "学期", + allowSearch: false, + url: top.$.rootUrl + '/EducationalAdministration/StuScore/GetSemesterData', + value: 'value', + text: 'text' + }); + //年级 + $('#grade').lrselect({ + url: top.$.rootUrl + '/EducationalAdministration/ClassInfo/GenerateNearByYear', + value: 'value', + text: 'text' + }); + $('#DeptNo').lrDataSourceSelect({ + code: 'CdDeptInfo', value: 'deptno', text: 'deptname', select: function (val) { + var deptno = ""; + if (val) { + deptno = val.deptno; + } + $('#MajorNo').lrselectRefresh({ + url: top.$.rootUrl + '/EducationalAdministration/CdMajor/GetListByDeptNo?DeptNo=' + deptno, + text: "MajorName", + value: "MajorNo" + }) + } + }); + $('#MajorNo').lrDataSourceSelect({ + code: 'CdMajorInfo', value: 'majorno', text: 'majorname', select: + function (val) { + var majorNo = ''; + if (val) { + majorNo = val.MajorNo; + } + $('#ClassNo').lrselectRefresh({ + url: top.$.rootUrl + + '/EducationalAdministration/ClassInfo/GetClassByMajorNo?majorNo=' + + majorNo, + text: "ClassName", + value: "ClassNo" + }); + $('#LessonNo').lrselectRefresh({ + url: top.$.rootUrl + + '/EducationalAdministration/LessonInfo/GetLessonByMajorNo?majorNo=' + + majorNo, + text: "LessonName", + value: "LessonNo" + }); + } + }); + $('#ClassNo').lrDataSourceSelect({ + code: 'bjsj', value: 'classno', text: 'classname' + }); + $('#LessonNo').lrDataSourceSelect({ + code: 'LessonInfo', value: 'lessonno', text: 'lessonname' + }); + // 刷新 + $('#lr_refresh').on('click', function () { + location.reload(); + }); + // 初始化补考成绩 + $('#lr_Init').on('click', function () { + learun.layerConfirm('是否确认初始化二次补考成绩!', function (res) { + if (res) { + learun.postForm(top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/InitScore', { keyValue: keyValue }, function () { + refreshGirdData(); + }); + } + }); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPassTwo/GetPageListForUnpass', + headData: [ + { + label: "学号", name: "stuno", width: 80, align: "left" + }, + { + label: "姓名", name: "stuname", width: 100, align: "left" + }, + { label: "课程", name: "LessonName", width: 100, align: "left" }, + { label: "考试年级", name: "Grade", width: 100, align: "left" }, + { + label: "学年", name: "AcademicYearNo", width: 80, align: "left", + //formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('dataItem', { + // key: value, + // code: 'usersex', + // callback: function (_data) { + // callback(_data.text); + // } + // }); + //} + }, + { label: "学期", name: "Semester", width: 150, align: "left" }, + { label: "班级", name: "classname", width: 150, align: "left" }, + { label: "平时成绩", name: "OrdinaryScore2", width: 150, align: "left" }, + { label: "期末成绩", name: "TermEndScore2", width: 150, align: "left" }, + { label: "成绩", name: "Score2", width: 150, align: "left" }, + ], + mainId: 'ID', + isPage: true, + sidx: 'ClassNo,LessonNo', + }); + page.search(); + }, + search: function (param) { + param = param || {}; + $('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) }); + } + }; + refreshGirdData = function () { + $('#gridtable').jfGridSet('reload'); + }; + 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 337636a1b..2df12d1d5 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 @@ -1119,6 +1119,7 @@ + @@ -7679,6 +7680,7 @@ + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs index d9169e806..fa7db1635 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoBLL.cs @@ -65,6 +65,30 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 二次补考名单查看 + /// + /// + /// + /// + public IEnumerable GetPageListForUnpass(Pagination pagination, string queryJson) + { + try + { + return stuScoreNotPassTwoService.GetPageListForUnpass(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 获取StuScoreNotPassTwo表实体数据 /// 主键 @@ -164,6 +188,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 初始化二次补考成绩 + /// + public void InitScore() + { + try + { + stuScoreNotPassTwoService.InitScore(); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } /// /// 保存实体数据(新增、修改) /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs index bf26394c2..fe3be3622 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoIBLL.cs @@ -27,6 +27,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetPageListForUnpass(Pagination pagination, string queryJson); /// /// 获取StuScoreNotPassTwo表实体数据 /// 主键 @@ -57,6 +58,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void DeleteEntity(string keyValue); + void InitScore(); /// /// 保存实体数据(新增、修改) /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs index e13506595..e31ad49c3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPassTwo/StuScoreNotPassTwoService.cs @@ -249,6 +249,73 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 二次补考成绩查看 + /// + /// + /// + /// + public IEnumerable GetPageListForUnpass(Pagination pagination, string queryJson) + { + try + { + var queryParam = queryJson.ToJObject(); + // 虚拟参数 + var dp = new DynamicParameters(new { }); + var strSql = new StringBuilder(); + strSql.Append(@"select a.*,(select classname from classinfo where a.classno=classno) as classname,case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.OrdinaryScore=ScoreStyleNo) +else CONVERT(varchar,a.OrdinaryScore) end as OrdinaryScore2, +case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.TermEndScore=ScoreStyleNo) +else CONVERT(varchar,a.TermEndScore) end as TermEndScore2, +case when a.ScoreRecordStyleNo in ('2','3') then (select ScoreName from CdScorePoint where a.ScoreRecordStyleNo=ScoreRecordStyleNo and a.Score=ScoreStyleNo) +else CONVERT(varchar,a.Score) end as Score2 "); + strSql.Append(@" from StuScoreNotPass a left join StuInfoBasic b on b.StuNo=a.StuNo "); + strSql.Append(@"where 1=1 and a.LessonSortNo='1' and ((a.Score>=0 and a.Score<60) or a.Score=(-5) or a.Score=(-10)) "); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + strSql.Append($" and a.AcademicYearNo ='{queryParam["AcademicYearNo"].ToString()}'"); + } + if (!queryParam["Semester"].IsEmpty()) + { + strSql.Append($" and a.Semester ='{queryParam["Semester"].ToString().Trim()}'"); + } + if (!queryParam["grade"].IsEmpty()) + { + strSql.Append($" and a.grade ='{queryParam["grade"].ToString()}'"); + } + if (!queryParam["DeptNo"].IsEmpty()) + { + strSql.Append($" and a.DeptNo ='{queryParam["DeptNo"].ToString()}'"); + } + if (!queryParam["MajorNo"].IsEmpty()) + { + strSql.Append($" and a.MajorNo ='{queryParam["MajorNo"].ToString()}'"); + } + if (!queryParam["LessonNo"].IsEmpty()) + { + strSql.Append($" and a.LessonNo ='{queryParam["LessonNo"].ToString()}'"); + } + if (!queryParam["ClassNo"].IsEmpty()) + { + strSql.Append($" and a.ClassNo ='{queryParam["ClassNo"].ToString()}'"); + } + + strSql.Append(" and b.AbmormityMoveMark!='1' "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + #endregion #region 提交数据 @@ -310,10 +377,58 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + #endregion #region 扩展数据 + /// + /// 初始化二次补考成绩 + /// + public void InitScore() + { + try + { + string sql = @"insert into StuScoreNotPassTwo +(NoticeBookNo, StuNo, DeptNo, MajorNo, ClassNo, StuName, GenderNo, AcademicYearNo, Semester, + OpenLessonDeptNo, OpenLessonMajorNo, LessonNo, LessonName, LessonNameEn, TeachClassNo, LessonSortNo, + StuSortNo, Grade, StudyScore, TotalStudyHour, zysx, TestModeNo, ScoreRecordStyleNo, OrdinaryScore, TermInScore, + TermEndScore, OtherScore, IsInEffect, ConflictLessonNo, IsReStudy, CheckMark, + IsPitchOn, EmpNo, TechPlanNo, TestKindNo, PartCode, IsEditable) + select + NoticeBookNo, StuNo, DeptNo, MajorNo, ClassNo, StuName, GenderNo, AcademicYearNo, Semester, + OpenLessonDeptNo, OpenLessonMajorNo, LessonNo, LessonName, LessonNameEn, TeachClassNo, LessonSortNo, + StuSortNo, Grade, StudyScore, TotalStudyHour, zysx, TestModeNo, ScoreRecordStyleNo, '0', '0', + '0', '0', IsInEffect, ConflictLessonNo, IsReStudy, '0', + IsPitchOn, EmpNo, TechPlanNo, TestKindNo, PartCode, '1' + from + ( + select a.* from +StuScoreNotPass a +left join StuInfoBasic b on b.StuNo=a.StuNo +where a.LessonSortNo='1' and b.AbmormityMoveMark <> '1' +and ( (a.Score >= 0 and a.Score<60) or a.Score=(-5) or a.Score=(-10) ) +and a.StuNo not in ( +select StuNo from StuScoreNotPassTwo p where p.AcademicYearNo=a.AcademicYearNo and p.Semester=a.Semester and p.LessonNo=a.LessonNo and p.TeachClassNo=a.TeachClassNo and p.LessonSortNo=a.LessonSortNo and p.OpenLessonDeptNo=a.OpenLessonDeptNo and p.OpenLessonMajorNo=a.OpenLessonMajorNo +) +) as bb +order by bb.ScoreId"; + this.BaseRepository("CollegeMIS").ExecuteBySql(sql); + + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + /// /// 学年下拉框信息 ///