HiITEdenX 2 anni fa
parent
commit
4a3b0c2171

+ 1 - 1
TEAMModelOS.SDK/Models/Cosmos/Student/OverallEducation.cs

@@ -47,7 +47,7 @@ namespace TEAMModelOS.SDK.Models
         /// </summary>
         public string periodId { get; set; }
         /// <summary>
-        /// 年级grade
+        /// 学生入学
         /// </summary>
         public int stuYear{ get; set; }
         /// <summary>

+ 7 - 2
TEAMModelOS/Controllers/Student/OverallEducationController.cs

@@ -186,7 +186,7 @@ namespace TEAMModelOS.Controllers
             int studentCount = data.list.First();
 
             string oesql = $"select value c from c where c.semesterId='{_semesterId}' and  c.year={_year} and c.periodId='{_periodId}' " +
-                $"and c.classId in {string.Join(",",classes.Select(z=>$"'{z}'"))} ";
+                $"and c.classId in ({string.Join(",", classes.Select(z => $"'{z.id}'"))}) ";
             var oeresults = await client.GetContainer(Constant.TEAMModelOS, Constant.Student).GetList<OverallEducation>(oesql, $"OverallEducation-{_school}");
             double dataCount = 0;
             double sports_count90 = 0;
@@ -212,6 +212,7 @@ namespace TEAMModelOS.Controllers
                 oeresults.list.ForEach(z => { 
                     double score = 0;
                     //体育
+                    if (z.sports.IsNotEmpty())
                     {
                         if (schoolSetting.overallEducationSetting.sports.Equals("avg"))
                         {
@@ -227,6 +228,7 @@ namespace TEAMModelOS.Controllers
                         }
                     }
                     //劳动
+                    if (z.labour.IsNotEmpty())
                     {
                         if (schoolSetting.overallEducationSetting.labour.Equals("avg"))
                         {
@@ -242,6 +244,7 @@ namespace TEAMModelOS.Controllers
                         }
                     }
                     //智育
+                    if (z.intelligence.IsNotEmpty())
                     {
                         if (schoolSetting.overallEducationSetting.intelligence.Equals("avg"))
                         {
@@ -257,6 +260,7 @@ namespace TEAMModelOS.Controllers
                         }
                     }
                     //艺术
+                    if (z.art.IsNotEmpty())
                     {
                         if (schoolSetting.overallEducationSetting.art.Equals("avg"))
                         {
@@ -272,6 +276,7 @@ namespace TEAMModelOS.Controllers
                         }
                     }
                     //德育
+                    if (z.virtue.IsNotEmpty())
                     {
                         if (schoolSetting.overallEducationSetting.virtue.Equals("avg"))
                         {
@@ -416,7 +421,7 @@ namespace TEAMModelOS.Controllers
                 intelligence_count,
                 virtue_count,
                 labour_count,
-                ranking=ranking.Select(x=>new { score=x.score,student=x.student }),
+                ranking=ranking.Select(x=>new { score=x.score,student=new { x.student .name,x.student.code,x.student.semesterId,x.student.studentId,x.student.id} }),
                 classDatas= classDatas.Select(z=>new { z.classId,z.last,z.best,z.avg})
             });
         }