Quellcode durchsuchen

班级成绩查看导出加入排名

娄底高职分支
hwh2023 vor 4 Monaten
Ursprung
Commit
2002a90574
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  1. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs

+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/EducationalAdministration/Controllers/StuScoreController.cs Datei anzeigen

@@ -862,6 +862,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
TotalScore = x.Select(y => y.Score).Sum(), TotalScore = x.Select(y => y.Score).Sum(),
LessonInfo = x.Select(y => new { y.LessonNo, y.LessonName, y.Score, y.ScoreFormat }).OrderBy(y => y.LessonNo) LessonInfo = x.Select(y => new { y.LessonNo, y.LessonName, y.Score, y.ScoreFormat }).OrderBy(y => y.LessonNo)
}).OrderByDescending(x => x.TotalScore); }).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>>(); var result = new List<Dictionary<string, string>>();
foreach (var item in aa) foreach (var item in aa)
{ {
@@ -869,6 +871,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
aaa.Add("StuNo", item.StuNo); aaa.Add("StuNo", item.StuNo);
aaa.Add("StuName", item.StuName); aaa.Add("StuName", item.StuName);
aaa.Add("TotalScore", item.TotalScore.ToString()); 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) foreach (var lessonInfoItem in item.LessonInfo)
{ {
aaa.Add(lessonInfoItem.LessonNo, lessonInfoItem.ScoreFormat); aaa.Add(lessonInfoItem.LessonNo, lessonInfoItem.ScoreFormat);
@@ -892,6 +896,8 @@ namespace Learun.Application.Web.Areas.EducationalAdministration.Controllers
excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "StuNo", ExcelColumn = "学号" }); excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "StuNo", ExcelColumn = "学号" });
excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "StuName", ExcelColumn = "姓名" }); excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "StuName", ExcelColumn = "姓名" });
excelconfig.ColumnEntity.Add(new ColumnModel() { Column = "TotalScore", 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); var lessonTemp = stuScoreIBLL.GetLessonNoData(queryModel.AcademicYearNo, queryModel.Semester, queryModel.ClassNo).OrderBy(x => x.value);


Laden…
Abbrechen
Speichern