From b87576f1d3df770717b096a810cc9393c6435081 Mon Sep 17 00:00:00 2001 From: ndbs Date: Tue, 10 May 2022 10:00:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E8=80=83/=E9=87=8D=E4=BF=AE=E6=88=90?= =?UTF-8?q?=E7=BB=A9=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/StuScoreNotPassController.cs | 10 +- .../StuScoreNotPassTwoController.cs | 11 +- .../StuScoreNotPass/IndexBKUnpass.cshtml | 58 +++++++ .../Views/StuScoreNotPass/IndexBKUnpass.js | 155 ++++++++++++++++++ .../IndexBKUnpassTwo.cshtml | 58 +++++++ .../StuScoreNotPassTwo/IndexBKUnpassTwo.js | 150 +++++++++++++++++ .../Learun.Application.Web.csproj | 4 + .../StuScoreNotPass/StuScoreNotPassEntity.cs | 4 +- .../StuScoreNotPass/StuScoreNotPassService.cs | 7 +- .../StuScoreNotPassTwoService.cs | 75 ++++++++- 10 files changed, 526 insertions(+), 6 deletions(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexBKUnpass.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexBKUnpass.js create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexBKUnpassTwo.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexBKUnpassTwo.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs index 3ea5c5236..27996dfcc 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreNotPassController.cs @@ -80,7 +80,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } - + /// + /// 补考成绩录入查看 + /// + /// + [HttpGet] + public ActionResult IndexBKUnpass() + { + return View(); + } #endregion #region 获取数据 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 8eec54f49..72c661d26 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 @@ -80,6 +80,15 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 二次补考成绩查看 + /// + /// + [HttpGet] + public ActionResult IndexBKUnpassTwo() + { + return View(); + } #endregion @@ -179,7 +188,7 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers } #endregion - #region 提交数据 + #region 提交数据 /// /// 删除实体数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexBKUnpass.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexBKUnpass.cshtml new file mode 100644 index 000000000..b1a6e8418 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexBKUnpass.cshtml @@ -0,0 +1,58 @@ +@{ + ViewBag.Title = "长阳迎新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
年级
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
课程
+
+
+
+
班级
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexBKUnpass.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexBKUnpass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexBKUnpass.js new file mode 100644 index 000000000..59c053ddd --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexBKUnpass.js @@ -0,0 +1,155 @@ +/* * 版 本 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({ + allowSearch: true, + 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({ + allowSearch: true, + 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({ + allowSearch: true, + code: 'bjsj', value: 'classno', text: 'classname' + }); + $('#LessonNo').lrDataSourceSelect({ + allowSearch: true, + 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/StuScoreNotPass/InitScore', function () { + refreshGirdData(); + }); + } + }); + }); + }, + // 初始化列表 + initGird: function () { + $('#gridtable').jfGrid({ + url: top.$.rootUrl + '/EducationalAdministration/StuScoreNotPass/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" }, + { label: "补考成绩", name: "BKScore", width: 150, align: "left" }, + { + label: "是否提交", name: "IsSubmit", width: 150, align: "left", + formatter: function (cellvalue) { + return cellvalue == 1 ? "" : ""; + } + }, + + ], + 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/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexBKUnpassTwo.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexBKUnpassTwo.cshtml new file mode 100644 index 000000000..c654eafe1 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexBKUnpassTwo.cshtml @@ -0,0 +1,58 @@ +@{ + ViewBag.Title = "二次补考成绩查看"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
年级
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
课程
+
+
+
+
班级
+
+
+
+
+
+
+
+
+ +
+ @**@ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexBKUnpassTwo.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexBKUnpassTwo.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexBKUnpassTwo.js new file mode 100644 index 000000000..19dfa1ddb --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/IndexBKUnpassTwo.js @@ -0,0 +1,150 @@ +/* * 版 本 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', 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" }, + { label: "重修成绩", name: "BKScore", width: 150, align: "left" }, + { + label: "是否提交", name: "IsSubmit", width: 150, align: "left", + formatter: function (cellvalue) { + return cellvalue == 1 ? "" : ""; + } + } + ], + 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 61eed15c8..065306783 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 @@ -1078,12 +1078,14 @@ + + @@ -7821,6 +7823,8 @@ + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassEntity.cs index d5a83aac9..b37cd3cac 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassEntity.cs @@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 日 期:2019-11-05 15:25 /// 描 述:全院学生补考成绩录入(新) ///
- public class StuScoreNotPassEntity + public class StuScoreNotPassEntity { #region 实体成员 /// @@ -341,6 +341,8 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration public string OrdinaryScore2 { get; set; } public string TermEndScore2 { get; set; } public string Score2 { get; set; } + public string BKScore { get; set; } + public string IsSubmit { get; set; } } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs index 8375436d2..66077600d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassService.cs @@ -171,14 +171,17 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration // 虚拟参数 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) + strSql.Append(@"select isnull(ssnp.score,0) as BKScore ,ssnp.checkmark as IsSubmit,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 StuScore 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)) "); + strSql.Append( + @" left join StuScoreNotPass ssnp on ssnp.StuNo = a.StuNo and ssnp.lessonno = a.lessonno "); + strSql.Append(@" where 1=1 and ( ssnp.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='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()}'"); 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 0fbaf1916..8f1f14ffa 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 @@ -263,14 +263,18 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration // 虚拟参数 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) + strSql.Append(@"select isnull(ssnpt.score,0) as BKScore,ssnpt.checkmark as IsSubmit,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( + @" left join StuScoreNotPassTwo ssnpt on ssnpt.StuNo = a.StuNo and ssnpt.lessonno = a.lessonno "); 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)) "); + strSql.Append( + @" and ( ssnpt.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='1' )"); if (!queryParam["AcademicYearNo"].IsEmpty()) { strSql.Append($" and a.AcademicYearNo ='{queryParam["AcademicYearNo"].ToString()}'"); @@ -316,6 +320,75 @@ else CONVERT(varchar,a.Score) end as Score2 "); } } + /// + /// 二次补考成绩查看 + /// + /// + /// + /// + public IEnumerable GetPageListBKUnpass(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 StuScoreNotPassTwo a left join StuInfoBasic b on b.StuNo=a.StuNo "); + //strSql.Append( + // @" left join StuScoreNotPassTwo ssnpt on ssnpt.StuNo = a.StuNo and ssnpt.lessonno = a.lessonno "); + strSql.Append(@" where 1=1 and ( b.StuNo not in (select StuNo from StuInfoBasic where ChangeStatus=1) and a.LessonSortNo='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' or len(b.AbmormityMoveMark)=0 or b.AbmormityMoveMark is null) "); + return this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), pagination); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } #endregion #region 提交数据