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..82b10d58c 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
@@ -92,6 +92,7 @@
提交教务处
去审核成绩
设置成绩比例
+ 导入
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.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..b38c3c55c 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
@@ -2411,7 +2411,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