zhouj1203@hotmail.com hace 2 años
padre
commit
f6fa35fb1b
Se han modificado 1 ficheros con 9 adiciones y 5 borrados
  1. 9 5
      TEAMModelOS.FunctionV4/CosmosDB/TriggerArt.cs

+ 9 - 5
TEAMModelOS.FunctionV4/CosmosDB/TriggerArt.cs

@@ -354,6 +354,14 @@ namespace TEAMModelOS.FunctionV4.CosmosDB
 
                             foreach (var rs in studentArtResults)
                             {
+                                foreach (var res in rs.results) {
+                                    if (res.quotaId.Equals("quota_21") && res.score > -1 && res.score < 95) {
+                                        res.score *= 1.5;
+                                        if (res.score >= 95) {
+                                            res.score = new Random().Next(90, 99);
+                                        }
+                                    }
+                                }
                                 //if (rs.totalScore == 0)
                                 //{
                                 foreach (var sc in rs.subjectScores)
@@ -381,11 +389,7 @@ namespace TEAMModelOS.FunctionV4.CosmosDB
                                             }).Sum(n => n.real) * c.percent * 0.01
                                         }).Sum(n => n.real + n.score) * x.percent * 0.01
                                     });
-                                    double realScore = Math.Round((double)quotaPercent.Sum(c => c.score) * 1.5, 2);
-                                    if (realScore > 95)
-                                    {
-                                        realScore = new Random().Next(90,100);
-                                    }
+                                    double realScore = Math.Round((double)quotaPercent.Sum(c => c.score), 2);                                   
                                     sc.score = realScore;
                                     //}
                                 }