diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs index e3cda10e2..91ab3ea65 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs @@ -1,4 +1,5 @@ -using Hangfire; +using DocumentFormat.OpenXml.Math; +using Hangfire; using Learun.Application.Base.SystemModule; using Learun.Application.Organization; using Learun.Application.TwoDevelopment.EducationalAdministration; @@ -730,17 +731,20 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers public ActionResult GetScoreListByClassNo(string queryJson) { var data = stuScoreIBLL.GetScoreListByClassNo(queryJson); - var stuData = stuInfoBasicIBLL.GetAllList(); + //var stuData = stuInfoBasicIBLL.GetAllList(); var aa = data.GroupBy(x => new { x.StuNo, x.StuName, x.StuId }).Select(x => new { StuId = x.Key.StuId, StuNo = x.Key.StuNo, StuName = x.Key.StuName, - FinishSchoolMark = stuData.FirstOrDefault(a => a.StuNo == x.Key.StuNo)?.FinishSchoolMark, + //FinishSchoolMark = stuData.FirstOrDefault(a => a.StuNo == x.Key.StuNo)?.FinishSchoolMark, TotalScore = x.Select(y => y.Score).Sum(), LessonInfo = x.Select(y => new { y.LessonNo, y.LessonName, y.Score, y.ScoreFormat }).OrderBy(y => y.LessonNo) }).OrderByDescending(x => x.TotalScore); + + var bb=aa.Select(x=>x.StuNo).ToList(); + var cc=stuScoreIBLL.GetScoreListByMajor(queryJson).ToList(); var result = new List>(); foreach (var item in aa) @@ -749,8 +753,10 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers aaa.Add("StuId", item.StuId); aaa.Add("StuNo", item.StuNo); aaa.Add("StuName", item.StuName); - aaa.Add("FinishSchoolMark", item.FinishSchoolMark); + //aaa.Add("FinishSchoolMark", item.FinishSchoolMark); aaa.Add("TotalScore", item.TotalScore.ToString()); + aaa.Add("OrderClass", (bb.IndexOf(item.StuNo) + 1).ToString()); + aaa.Add("OrderMajor",(cc.IndexOf(item.StuNo)+1).ToString()); foreach (var lessonInfoItem in item.LessonInfo) { aaa.Add(lessonInfoItem.LessonNo, lessonInfoItem.ScoreFormat); @@ -856,6 +862,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers TotalScore = x.Select(y => y.Score).Sum(), LessonInfo = x.Select(y => new { y.LessonNo, y.LessonName, y.Score, y.ScoreFormat }).OrderBy(y => y.LessonNo) }).OrderByDescending(x => x.TotalScore); + var bb = aa.Select(x => x.StuNo).ToList(); + var cc = stuScoreIBLL.GetScoreListByMajor(queryJson).ToList(); var result = new List>(); foreach (var item in aa) { @@ -863,6 +871,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers aaa.Add("StuNo", item.StuNo); aaa.Add("StuName", item.StuName); aaa.Add("TotalScore", item.TotalScore.ToString()); + aaa.Add("OrderClass", (bb.IndexOf(item.StuNo) + 1).ToString()); + aaa.Add("OrderMajor", (cc.IndexOf(item.StuNo) + 1).ToString()); foreach (var lessonInfoItem in item.LessonInfo) { aaa.Add(lessonInfoItem.LessonNo, lessonInfoItem.ScoreFormat); @@ -886,6 +896,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "StuNo", ExcelColumn = "学号" }); excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "StuName", ExcelColumn = "姓名" }); excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "TotalScore", ExcelColumn = "总分" }); + excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "OrderClass", ExcelColumn = "班级排名" }); + excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "OrderMajor", ExcelColumn = "专业排名" }); //课程动态列 var lessonTemp = stuScoreIBLL.GetLessonNoData(queryModel.AcademicYearNo, queryModel.Semester, queryModel.ClassNo).OrderBy(x => x.value); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllScoreQueryIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllScoreQueryIndex.js index e5181dd65..cdbf5478a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllScoreQueryIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/AllScoreQueryIndex.js @@ -192,6 +192,8 @@ var bootstrap = function ($, learun) { { label: '学号', name: 'StuNo', width: 100, align: "left" }, { label: '姓名', name: 'StuName', width: 100, align: "left" }, { label: '总分', name: 'TotalScore', width: 100, align: "left" }, + { label: '班级排名', name: 'OrderClass', width: 120, align: "left" }, + { label: '专业排名', name: 'OrderMajor', width: 120, align: "left" }, ]; var headDatas = headData.concat(LessonTemp); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndex.cshtml index 0849abbec..c2e858e9d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndex.cshtml @@ -87,7 +87,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.cshtml index 50ee94099..8281dd8bf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.cshtml @@ -89,9 +89,10 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.js index 2f35b232d..0d56a7cb7 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElective.js @@ -15,6 +15,9 @@ var headData; //常规列头 var headDataEdit; //可编辑列头 var headDataNoEdit; //不可编辑列头 var headDataFinally; //最终列头 +var rowJson; +var columnJson; +var queryJson; var bootstrap = function ($, learun) { "use strict"; var page = { @@ -467,6 +470,63 @@ var bootstrap = function ($, learun) { learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScore/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { }); } }); + //导入 + $("#lr_importScore").on("click", function () { + var query = judgeSelect(); + if (query) { + //判断成绩比例是否合理 + var OrdinaryScoreScale = $('#OrdinaryScoreScale').html(); + var TermInScoreScale = $('#TermInScoreScale').html(); + var TermEndScoreScale = $('#TermEndScoreScale').html(); + var OtherScoreScale = $('#OtherScoreScale').html(); + var totalScale = Number(OrdinaryScoreScale) + Number(TermInScoreScale) + Number(TermEndScoreScale) + Number(OtherScoreScale); + if (totalScale !== 100) { + learun.alert.warning("成绩比例设置不合理!"); + return false; + } else { + //判断是否已审核;判断是否被其他教师占用 + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data != null) { + if (data.CheckMark == 1) { + learun.alert.warning("学生成绩已审核!"); + return false; + } + if (data.IsEditable == 0) { + if (data.EditUserId == learun.clientdata.get(['userinfo']).account) { + modifyDate = data.ModifyDate; + } else { + learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!"); + return false; + } + } + rowJson = $('#gridtable').jfGridGet('showData'); + columnJson = $('#gridtable').jfGridGet('settingInfo').headData; + + //条件 + var $content = $('body').find('.lr-layout-tool-left'); + queryJson = $content.lrGetFormData(); + + learun.layerForm({ + id: 'indexImport', + title: "导入学生成绩", + url: top.$.rootUrl + '/EducationalAdministration/StuScore/InputScoreIndexInTeacherImport?type=2', + width: 600, + height: 400, + maxmin: true, + btn: null, + end: function () { + refreshGirdData2(); + } + }); + + } else { + learun.alert.warning("学生成绩不存在!"); + return false; + } + }); + } + } + }); }, bindSelect: function () { //校区 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.cshtml index bdac8e261..432bf3951 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.cshtml @@ -92,6 +92,7 @@  提交教务处  去审核成绩  设置成绩比例 +  导入 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js index 03324f4ab..f8bceec91 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScore/InputScoreIndexOfElectiveInTeacher.js @@ -15,6 +15,9 @@ var headData; //常规列头 var headDataEdit; //可编辑列头 var headDataNoEdit; //不可编辑列头 var headDataFinally; //最终列头 +var rowJson; +var columnJson; +var queryJson; var bootstrap = function ($, learun) { "use strict"; var page = { @@ -467,6 +470,63 @@ var bootstrap = function ($, learun) { learun.postFormSilence(top.$.rootUrl + '/EducationalAdministration/StuScore/AddMinutes', { queryJson: JSON.stringify(query), minutes: newMinutes }, function (res) { }); } }); + //导入 + $("#lr_importScore").on("click", function () { + var query = judgeSelect(); + if (query) { + //判断成绩比例是否合理 + var OrdinaryScoreScale = $('#OrdinaryScoreScale').html(); + var TermInScoreScale = $('#TermInScoreScale').html(); + var TermEndScoreScale = $('#TermEndScoreScale').html(); + var OtherScoreScale = $('#OtherScoreScale').html(); + var totalScale = Number(OrdinaryScoreScale) + Number(TermInScoreScale) + Number(TermEndScoreScale) + Number(OtherScoreScale); + if (totalScale !== 100) { + learun.alert.warning("成绩比例设置不合理!"); + return false; + } else { + //判断是否已审核;判断是否被其他教师占用 + $.lrSetForm(top.$.rootUrl + '/EducationalAdministration/StuScore/GetEntityByJson?queryJson=' + JSON.stringify(query), function (data) { + if (data != null) { + if (data.CheckMark == 1) { + learun.alert.warning("学生成绩已审核!"); + return false; + } + if (data.IsEditable == 0) { + if (data.EditUserId == learun.clientdata.get(['userinfo']).account) { + modifyDate = data.ModifyDate; + } else { + learun.alert.warning("当前班级成绩由账号为" + data.EditUserId + "的教师在使用!"); + return false; + } + } + rowJson = $('#gridtable').jfGridGet('showData'); + columnJson = $('#gridtable').jfGridGet('settingInfo').headData; + + //条件 + var $content = $('body').find('.lr-layout-tool-left'); + queryJson = $content.lrGetFormData(); + + learun.layerForm({ + id: 'indexImport', + title: "导入学生成绩", + url: top.$.rootUrl + '/EducationalAdministration/StuScore/InputScoreIndexInTeacherImport?type=2', + width: 600, + height: 400, + maxmin: true, + btn: null, + end: function () { + refreshGirdData2(); + } + }); + + } else { + learun.alert.warning("学生成绩不存在!"); + return false; + } + }); + } + } + }); }, bindSelect: function () { //校区 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndex.cshtml index 6afa7e061..244d51b80 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPass/InputScoreIndex.cshtml @@ -87,7 +87,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndex.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndex.cshtml index 38f4e6943..75f3b30cf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndex.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Views/StuScoreNotPassTwo/InputScoreIndex.cshtml @@ -89,7 +89,7 @@ diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs index b6b36924e..3ce30ebb4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreBLL.cs @@ -1101,5 +1101,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration } } + + public IEnumerable GetScoreListByMajor(string queryJson) + { + try + { + return stuScoreService.GetScoreListByMajor(queryJson); + } + 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/StuScore/StuScoreIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs index b1b3b83fe..f926c31e9 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreIBLL.cs @@ -176,6 +176,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration /// /// IEnumerable GetScoreListByClassNo(string queryJson); + + + IEnumerable GetScoreListByMajor(string queryJson); /// /// 获取学生成绩 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs index 520738bcc..b64eb25d5 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/StuScore/StuScoreService.cs @@ -1119,7 +1119,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad /// 课程下拉框信息【学生成绩录入可去审核】 /// /// - public IEnumerable GetLessonNoDataOfAll(string userAccount, string userType,string AcademicYearNo="",string Semester="") + public IEnumerable GetLessonNoDataOfAll(string userAccount, string userType, string AcademicYearNo = "", string Semester = "") { try { @@ -1135,7 +1135,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad } if (!string.IsNullOrEmpty(AcademicYearNo)) { - strSql.Append(" and s.AcademicYearNo='" + AcademicYearNo + "' and s.Semester='"+Semester+"' "); + strSql.Append(" and s.AcademicYearNo='" + AcademicYearNo + "' and s.Semester='" + Semester + "' "); } var data = this.BaseRepository("CollegeMIS").FindList(strSql.ToString()); data = data.Where(x => !string.IsNullOrEmpty(x.value)).OrderBy(x => x.value); @@ -1349,6 +1349,67 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad } } } + + public IEnumerable GetScoreListByMajor(string queryJson) + { + try + { + //参考写法 + var queryParam = queryJson.ToJObject(); + if (queryParam["AcademicYearNo"].IsEmpty() || queryParam["Semester"].IsEmpty() || queryParam["ClassNo"].IsEmpty()) + { + return new List(); + } + var xn = queryParam["AcademicYearNo"].ToString(); + var xq = queryParam["Semester"].ToString(); + var bj = queryParam["ClassNo"].ToString(); + var ssentity = this.BaseRepository("CollegeMIS").FindEntity(x => x.AcademicYearNo == xn && x.Semester == xq && x.ClassNo == bj); + if(ssentity == null) return new List(); + + var majorNo = ssentity.MajorNo; + // 虚拟参数 + var dp = new DynamicParameters(new { }); + var tableName = "StuScore"; + + var strSql = new StringBuilder(); + strSql.Append(" select bb.AcademicYearNo,bb.Semester,bb.ClassNo,bb.LessonNo,bb.LessonName,bb.StuNo,bb.StuName "); + strSql.Append(" ,case when bb.Score >=60 then bb.Score else (case when sp.Score>= 60 then sp.Score else (case when spt.Score>=60 then spt.Score else bb.Score end) end) end as Score "); + strSql.Append(" ,case when bb.Score >=60 then convert(nvarchar(50),bb.Score) else (case when sp.Score>= 60 then convert(nvarchar(50),sp.Score)+'(补)' else (case when spt.Score>=60 then convert(nvarchar(50),spt.Score)+'(重)' else convert(nvarchar(50),bb.Score) end) end) end as ScoreFormat "); + strSql.Append(" from ( "); + strSql.Append($" select s.AcademicYearNo,s.Semester,s.ClassNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName,Max(s.Score) as Score from {tableName} s left join StuInfoBasic sb on s.StuNo=sb.StuNo "); + strSql.Append($" where 1=1 and s.LessonSortNo='1' and s.MajorNo='{majorNo}' "); + if (!queryParam["AcademicYearNo"].IsEmpty()) + { + dp.Add("AcademicYearNo", queryParam["AcademicYearNo"].ToString(), DbType.String); + strSql.Append(" and s.AcademicYearNo=@AcademicYearNo "); + } + if (!queryParam["Semester"].IsEmpty()) + { + dp.Add("Semester", queryParam["Semester"].ToString(), DbType.String); + strSql.Append(" and s.Semester=@Semester "); + } + + strSql.Append(" group by s.AcademicYearNo,s.Semester,s.ClassNo,s.LessonNo,s.LessonName,s.StuNo,sb.StuName ) as bb "); + strSql.Append(" left join StuScoreNotPass sp on bb.AcademicYearNo=sp.AcademicYearNo and bb.Semester=sp.Semester and bb.ClassNo=sp.ClassNo and bb.LessonNo=sp.LessonNo and bb.LessonName=sp.LessonName and bb.StuNo=sp.StuNo "); + strSql.Append(" left join StuScoreNotPassTwo spt on bb.AcademicYearNo=spt.AcademicYearNo and bb.Semester=spt.Semester and bb.ClassNo=spt.ClassNo and bb.LessonNo=spt.LessonNo and bb.LessonName=spt.LessonName and bb.StuNo=spt.StuNo "); + + var lst= this.BaseRepository("CollegeMIS").FindList(strSql.ToString(), dp); + var gp = lst.GroupBy(x => x.StuNo).Select(x => new { x.Key,TotalScore=x.Sum(a=>a.Score)}).OrderByDescending(x => x.TotalScore); + var rs=gp.Select(x=>x.Key).ToList(); + return rs; + } + catch (Exception ex) + { + if (ex is ExceptionEx) + { + throw; + } + else + { + throw ExceptionEx.ThrowServiceException(ex); + } + } + } /// /// 获取学生的补考信息 /// @@ -1682,7 +1743,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity(x => x.ClassNo == classno); if (classInfoEntity != null) { - this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScore set IsEditable='0',EditUserId='" + loginUserInfo.account + "',BeginModifyDate='" + now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + classno+ "' "); + this.BaseRepository("CollegeMIS").ExecuteBySql("update StuScore set IsEditable='0',EditUserId='" + loginUserInfo.account + "',BeginModifyDate='" + now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and OpenLessonDeptNo='" + classInfoEntity.DeptNo + "' and OpenLessonMajorNo='" + classInfoEntity.MajorNo + "' and LessonNo='" + LessonNo + "' and LessonSortNo='1' and ClassNo='" + classno + "' "); } } else @@ -1792,7 +1853,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad } } - + } catch (Exception ex) { @@ -1897,17 +1958,17 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad //教师电子成绩单 if (checkMark == 0)//撤销 { - db.ExecuteBySql("update EmpReportCard set ElectronicStatus=0,ElectronicTime=null where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassRoomNo='" + classroomno + "' and LessonSortNo='2' and LessonSection='"+ lessonsection + "'"); + db.ExecuteBySql("update EmpReportCard set ElectronicStatus=0,ElectronicTime=null where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and ClassRoomNo='" + classroomno + "' and LessonSortNo='2' and LessonSection='" + lessonsection + "'"); } else { - db.ExecuteBySql("update EmpReportCard set ElectronicStatus=1,ElectronicTime='" + DateTime.Now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and classroomno='" + classroomno + "' and LessonSortNo='2' and LessonSection='"+ lessonsection + "'"); + db.ExecuteBySql("update EmpReportCard set ElectronicStatus=1,ElectronicTime='" + DateTime.Now + "' where F_SchoolId='" + F_SchoolId + "' and AcademicYearNo='" + AcademicYearNo + "' and Semester='" + Semester + "' and LessonNo='" + LessonNo + "' and classroomno='" + classroomno + "' and LessonSortNo='2' and LessonSection='" + lessonsection + "'"); } } db.Commit(); } - + } catch (Exception ex) { @@ -2411,7 +2472,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad TermInScore * (stuSelectLessonListOfElectiveEntity.TermInScoreScale / 100) + TermEndScore * (stuSelectLessonListOfElectiveEntity.TermEndScoreScale / 100) + OtherScore * (stuSelectLessonListOfElectiveEntity.OtherScoreScale / 100)), MidpointRounding.AwayFromZero); - var remark = dr["考试类型"].ToString().Trim(); + var remark = dr["备注"].ToString().Trim(); db.ExecuteBySql($"update StuScore set OrdinaryScore={OrdinaryScore},TermInScore={TermInScore},TermEndScore={TermEndScore},OtherScore={OtherScore},Score={Score},Remark='{remark}' where ScoreId='{item.ScoreId}' "); } else