@@ -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<Dictionary<string, string>>(); | |||
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<Dictionary<string, string>>(); | |||
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); | |||
@@ -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); | |||
@@ -87,7 +87,7 @@ | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes" id="btnBox"> | |||
<a id="lr_input" class="btn btn-default"><i class="fa fa-edit"> 开始录入</i></a> | |||
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit"> 提交成绩</i></a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 审核成绩</i></a> | |||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | |||
<a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit"> 设置成绩比例</i></a> | |||
</div> | |||
@@ -89,9 +89,10 @@ | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_input" class="btn btn-default"><i class="fa fa-edit"> 开始录入</i></a> | |||
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit"> 提交成绩</i></a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 审核成绩</i></a> | |||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | |||
<a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit"> 设置成绩比例</i></a> | |||
<a id="lr_importScore" class="btn btn-default"><i class="fa fa-edit"> 导入</i></a> | |||
</div> | |||
</div> | |||
@@ -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 () { | |||
//校区 | |||
@@ -92,6 +92,7 @@ | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | |||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | |||
<a id="lr_setScale" class="btn btn-default"><i class="fa fa-edit"> 设置成绩比例</i></a> | |||
<a id="lr_importScore" class="btn btn-default"><i class="fa fa-edit"> 导入</i></a> | |||
</div> | |||
</div> | |||
@@ -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 () { | |||
//校区 | |||
@@ -87,7 +87,7 @@ | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_input" class="btn btn-default"><i class="fa fa-edit"> 开始录入</i></a> | |||
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit"> 提交成绩</i></a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 审核成绩</i></a> | |||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | |||
</div> | |||
</div> | |||
@@ -89,7 +89,7 @@ | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_input" class="btn btn-default"><i class="fa fa-edit"> 开始录入</i></a> | |||
<a id="lr_save" class="btn btn-default" style="display:none;"><i class="fa fa-edit"> 提交成绩</i></a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 提交教务处</i></a> | |||
<a id="lr_check" class="btn btn-default"><i class="fa fa-lock"> 审核成绩</i></a> | |||
<a id="lr_uncheck" class="btn btn-default"><i class="fa fa-lock"> 去审核成绩</i></a> | |||
</div> | |||
</div> | |||
@@ -1101,5 +1101,24 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
} | |||
} | |||
public IEnumerable<string> GetScoreListByMajor(string queryJson) | |||
{ | |||
try | |||
{ | |||
return stuScoreService.GetScoreListByMajor(queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
} | |||
} |
@@ -176,6 +176,9 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
/// <summary> | |||
/// <returns></returns> | |||
IEnumerable<StuScoreEntity> GetScoreListByClassNo(string queryJson); | |||
IEnumerable<string> GetScoreListByMajor(string queryJson); | |||
/// <summary> | |||
/// 获取学生成绩 | |||
/// </summary> | |||
@@ -1119,7 +1119,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||
/// 课程下拉框信息【学生成绩录入可去审核】 | |||
/// </summary> | |||
/// <returns></returns> | |||
public IEnumerable<WebHelper.YearGrade> GetLessonNoDataOfAll(string userAccount, string userType,string AcademicYearNo="",string Semester="") | |||
public IEnumerable<WebHelper.YearGrade> 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<WebHelper.YearGrade>(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<string> GetScoreListByMajor(string queryJson) | |||
{ | |||
try | |||
{ | |||
//参考写法 | |||
var queryParam = queryJson.ToJObject(); | |||
if (queryParam["AcademicYearNo"].IsEmpty() || queryParam["Semester"].IsEmpty() || queryParam["ClassNo"].IsEmpty()) | |||
{ | |||
return new List<string>(); | |||
} | |||
var xn = queryParam["AcademicYearNo"].ToString(); | |||
var xq = queryParam["Semester"].ToString(); | |||
var bj = queryParam["ClassNo"].ToString(); | |||
var ssentity = this.BaseRepository("CollegeMIS").FindEntity<StuScoreEntity>(x => x.AcademicYearNo == xn && x.Semester == xq && x.ClassNo == bj); | |||
if(ssentity == null) return new List<string>(); | |||
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<StuScoreEntity>(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); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取学生的补考信息 | |||
/// </summary> | |||
@@ -1682,7 +1743,7 @@ where StuNo not in(Select StuNo from stuscore s where s.Academicyearno = sl.Acad | |||
var classInfoEntity = this.BaseRepository("CollegeMIS").FindEntity<ClassInfoEntity>(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 | |||