From f40115fff0f964125abbf8028866b973d6ac841d Mon Sep 17 00:00:00 2001 From: zhangli <1109134334@qq.com> Date: Tue, 29 Mar 2022 10:45:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E5=8A=A1--=E8=A1=A5=E8=80=83=E5=90=8D?= =?UTF-8?q?=E5=8D=95=E6=9F=A5=E7=9C=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/LessonInfoController.cs | 12 ++ .../Controllers/StuScoreNotPassController.cs | 44 +++++- .../Views/StuScoreNotPass/IndexUnpass.cshtml | 58 +++++++ .../Views/StuScoreNotPass/IndexUnpass.js | 143 ++++++++++++++++++ .../Learun.Application.Web.csproj | 13 ++ .../LessonInfo/LessonInfoBLL.cs | 19 +++ .../LessonInfo/LessonInfoIBLL.cs | 1 + .../LessonInfo/LessonInfoService.cs | 19 +++ .../StuScoreNotPass/StuScoreNotPassBLL.cs | 40 +++++ .../StuScoreNotPass/StuScoreNotPassEntity.cs | 14 ++ .../StuScoreNotPass/StuScoreNotPassIBLL.cs | 2 + .../StuScoreNotPass/StuScoreNotPassService.cs | 107 +++++++++++++ 12 files changed, 471 insertions(+), 1 deletion(-) create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.cshtml create mode 100644 Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.js diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs index 270d9f43b..d99e78b0a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/LessonInfoController.cs @@ -104,6 +104,18 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers LessonInfoData.Introduction = WebHelper.HtmlDecode(LessonInfoData.Introduction); return Success(LessonInfoData); } + /// + /// 获取表单数据 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetLessonByMajorNo(string majorNo) + { + var LessonInfoList = lessonInfoIBLL.GetLessonByMajorNo(majorNo); + return Success(LessonInfoList); + } + #endregion #region 提交数据 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 ef8c04c8d..77e7fec38 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 @@ -71,6 +71,16 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers { return View(); } + /// + /// 补考名单查看 + /// + /// + [HttpGet] + public ActionResult IndexUnpass() + { + return View(); + } + #endregion #region 获取数据 @@ -106,6 +116,28 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers }; return Success(jsonData); } + + /// + /// 补考名单查看 + /// 分页参数 + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetPageListForUnpass(string pagination, string queryJson) + { + Pagination paginationobj = pagination.ToObject(); + var data = stuScoreNotPassIBLL.GetPageListForUnpass(paginationobj, queryJson); + var jsonData = new + { + rows = data, + total = paginationobj.total, + page = paginationobj.page, + records = paginationobj.records + }; + return Success(jsonData); + } + /// /// 获取表单数据 /// 主键 @@ -171,7 +203,17 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers stuScoreNotPassIBLL.SaveEntity(keyValue, entity); return Success("保存成功!"); } - + /// 初始化补考成绩 + /// + [HttpPost] + [ValidateAntiForgeryToken] + [AjaxOnly] + public ActionResult InitScore() + { + stuScoreNotPassIBLL.InitScore(); + return Success("操作成功!"); + } + #endregion #region 扩展数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.cshtml new file mode 100644 index 000000000..7f42b08f4 --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.cshtml @@ -0,0 +1,58 @@ +@{ + ViewBag.Title = "长阳迎新"; + Layout = "~/Views/Shared/_Index.cshtml"; +} +
+
+
+
+
+
+
+
+
+
学年
+
+
+
+
学期
+
+
+
+
年级
+
+
+
+
系部
+
+
+
+
专业
+
+
+
+
课程
+
+
+
+
班级
+
+
+
+
+
+
+
+
+ +
+ +
+
+
+
+
+
+@Html.AppendJsFile("/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.js") diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.js new file mode 100644 index 000000000..f9cdd3fac --- /dev/null +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/IndexUnpass.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/StuScoreNotPass/InitScore', { keyValue: keyValue }, 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" }, + ], + 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 e8ac88aa5..337636a1b 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 @@ -1124,6 +1124,7 @@ + @@ -7666,6 +7667,18 @@ + + + + + + + + + + + + diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoBLL.cs index b35ef2444..93a397aad 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoBLL.cs @@ -42,6 +42,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable GetLessonByMajorNo(string majorNo) + { + try + { + return lessonInfoService.GetLessonByMajorNo(majorNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取LessonInfo表实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoIBLL.cs index 747750bf0..69f7c2d51 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoIBLL.cs @@ -21,6 +21,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// 查询参数 /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetLessonByMajorNo(string majorNo); /// /// 获取LessonInfo表实体数据 /// 主键 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs index 9d62cd91e..9583c26cf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/LessonInfo/LessonInfoService.cs @@ -100,6 +100,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable GetLessonByMajorNo(string majorNo) + { + try + { + return this.BaseRepository("CollegeMIS").FindList(x => x.TeachMajorNo == majorNo); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } + internal bool GetAny() { try diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs index b083b6586..06edde13f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassBLL.cs @@ -65,6 +65,25 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + public IEnumerable GetPageListForUnpass(Pagination pagination, string queryJson) + { + try + { + return stuScoreNotPassService.GetPageListForUnpass(pagination, queryJson); + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowBusinessException(ex); + } + } + } + /// /// 获取实体数据 /// 主键 @@ -187,6 +206,27 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 初始化补考成绩 + /// + public void InitScore() + { + try + { + stuScoreNotPassService.InitScore(); + } + 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/StuScoreNotPass/StuScoreNotPassEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassEntity.cs index c937dc615..d5a83aac9 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 @@ -328,5 +328,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } #endregion } + + public class NotPassEntity + { + public string stuno { get; set; } + public string stuname { get; set; } + public string LessonName { get; set; } + public string Grade { get; set; } + public string AcademicYearNo { get; set; } + public string Semester { get; set; } + public string classname { get; set; } + public string OrdinaryScore2 { get; set; } + public string TermEndScore2 { get; set; } + public string Score2 { get; set; } + } } diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs index 509b479e6..ad1e1472d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScoreNotPass/StuScoreNotPassIBLL.cs @@ -26,6 +26,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// IEnumerable GetPageList(Pagination pagination, string queryJson); + IEnumerable GetPageListForUnpass(Pagination pagination, string queryJson); /// /// 获取实体数据 /// 主键 @@ -61,6 +62,7 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// void SaveEntity(string keyValue, StuScoreNotPassEntity entity); + void InitScore(); #endregion #region 扩展数据 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 464fdc255..32e6e39c9 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 @@ -163,6 +163,67 @@ 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 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)) "); + 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); + } + } + } + /// /// 获取实体数据 /// 主键 @@ -342,6 +403,52 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + /// + /// 初始化补考成绩 + /// + public void InitScore() + { + try + { + string sql = @"insert into StuScoreNotPass +(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 +StuScore 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 StuScoreNotPass 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); + } + } + } #endregion #region 扩展数据