zhouj1203@hotmail.com преди 9 месеца
родител
ревизия
3b9674ff53

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/School/SchoolSetting.cs

@@ -87,6 +87,7 @@ namespace TEAMModelOS.SDK.Models
         public string code { get; set; }
         public string name  { get; set; }
         public int rank { get; set; }
+        public long time { get; set; }
 
     }
     public class LessonSetting

+ 3 - 3
TEAMModelOS.SDK/Models/Service/ExamService.cs

@@ -61,9 +61,9 @@ namespace TEAMModelOS.SDK.Models.Service
             }
         }
 
-        public static async Task<List<(string name, List<(string classId, double average)> classMore, double total,List<(string studentId, double scores, string classId)>students )>> getGradeScore(CoreAPIHttpService _coreAPIHttpService, DingDing _dingDing, CosmosClient client, List<string> classIds, string periodId, string schooCode,List<string> examType, long stime, long etime)
+        public static async Task<List<(string name, List<(string classId, double average)> classMore, double total,List<(string studentId, double scores, string classId)>students,long time )>> getGradeScore(CoreAPIHttpService _coreAPIHttpService, DingDing _dingDing, CosmosClient client, List<string> classIds, string periodId, string schooCode,List<string> examType, long stime, long etime)
         {
-            List<(string name, List<(string classId,double average)> classMore, double total, List<(string studentId, double scores, string classId)> stus)> grades = new();
+            List<(string name, List<(string classId,double average)> classMore, double total, List<(string studentId, double scores, string classId)> stus,long time)> grades = new();
             //List<(string grade, double score)> grades = new();
             try
             {
@@ -165,7 +165,7 @@ namespace TEAMModelOS.SDK.Models.Service
                                 var persent = Math.Round(scroe * 1.0 / totalScore, 2);
                                 stus.Add((member.id, persent, member.classId));
                             }
-                            grades.Add((info.name, classMore, gradeScores, stus));
+                            grades.Add((info.name, classMore, gradeScores, stus,info.startTime));
                         }
                     }                   
                 }              

+ 8 - 4
TEAMModelOS/Controllers/Student/OverallEducationController.cs

@@ -683,10 +683,11 @@ namespace TEAMModelOS.Controllers
                         { 
                             new CodeDouble 
                             {
-                                code=student.id,
+                                code = student.id,
                                 name= student.name,
                                 value=item.students.Find(x=>x.studentId.Equals(student.id)).scores,
-                                rank = item.students.OrderByDescending(x => x.scores).Select(z => z.studentId).ToList().IndexOf(student.id) + 1
+                                rank = item.students.OrderByDescending(x => x.scores).Select(z => z.studentId).ToList().IndexOf(student.id) + 1,
+                                time = item.time
                             } 
                         };
                         exam3Score.classScore=item.classMore.Find(x=>x.classId.Equals(student.classId)).average;
@@ -705,7 +706,8 @@ namespace TEAMModelOS.Controllers
                                 code=x.studentId,
                                 name= students.Find(z=>z.id.Equals(x.studentId))?.name,
                                 value=x.scores,
-                                rank = item.students.Where(y => y.classId.Equals(clazz.id)).OrderByDescending(x => x.scores).Select(z => z.studentId).ToList().IndexOf(x.studentId) + 1
+                                rank = item.students.Where(y => y.classId.Equals(clazz.id)).OrderByDescending(x => x.scores).Select(z => z.studentId).ToList().IndexOf(x.studentId) + 1,
+                                time = item.time
 
                             }).ToList();
                             exam3Scores.Add(exam3Score);
@@ -719,7 +721,9 @@ namespace TEAMModelOS.Controllers
                             exam3Score.xdatas= item.classMore.Select(x => new CodeDouble { 
                                 code=x.classId, 
                                 name= grade_classes.Find(z => z.id.Equals(x.classId))?.name, 
-                                value=x.average }).ToList();
+                                value=x.average,
+                                time = item.time
+                            }).ToList();
                             exam3Scores.Add(exam3Score);
                         }
                     }