CrazyIter_Bin 2 年之前
父節點
當前提交
dd68b1ddf3

+ 21 - 0
TEAMModelOS.SDK/Models/Cosmos/Normal/ArtSetting.cs

@@ -18,8 +18,29 @@ namespace TEAMModelOS.SDK.Models
         public List<ArtQuota> quotas { get; set; } = new List<ArtQuota>();
 
         public List<ArtReviewLevel> reviewLevel { get; set; } = new List<ArtReviewLevel>();
+        public List<MusicZystd> musicZystds { get; set; }
 
     }
+    /// <summary>
+    /// 智音音乐评分标准
+    /// </summary>
+    public class MusicZystd
+    { 
+        public string code { get; set; }
+        public string label { get; set; }
+        public double percent { get; set; }
+        public List<MusicZystd> child { get; set; }= new List<MusicZystd>();
+        public List<MusicZypoint> points { get; set; } = new List<MusicZypoint>();
+    }
+    public class MusicZypoint
+    {
+        public string code { get; set; }
+        public string label { get; set; }
+        public string paramOperandType { get; set; }
+        public string paramType { get; set; }
+        public double param { get; set; }
+        public double value { get; set; }
+    }
     public class ArtReviewLevel
     {
         public string code { get; set; }

+ 2 - 2
TEAMModelOS.SDK/Models/Service/StatisticsService.cs

@@ -370,7 +370,7 @@ namespace TEAMModelOS.SDK
             {
                 teachers.Add(StatisticsTeacher(train, setting, area, client, studies));  //yield return await  StatisticsTeacher(  train,   setting,   area,   client);
             }
-            int pagesize = 50;
+            int pagesize = 20;
             if (teachers.Count <= pagesize)
             {
                 await Task.WhenAll(teachers);
@@ -399,7 +399,7 @@ namespace TEAMModelOS.SDK
                 {
                     teachers.Add(DoProperty(train.update, property, setting, area, client, train, studies));
                 }
-                int pagesize = 50;
+                int pagesize = 20;
                 if (teachers.Count <= pagesize)
                 {
                     await Task.WhenAll(teachers);

+ 10 - 2
TEAMModelOS/Controllers/Normal/AbilityStatisticsController.cs

@@ -506,17 +506,25 @@ namespace TEAMModelOS.Controllers
         /// <returns></returns>
         [ProducesDefaultResponseType]
         [HttpPost("statistics-area")]
+#if !DEBUG
         [AuthToken(Roles = "teacher,admin,area")]
         [Authorize(Roles = "IES")]
+#endif
         public async Task<IActionResult> StatisticsArea(JsonElement request)
         {
-            var (userid, _, _, _) = HttpContext.GetAuthTokenInfo();
+            //var (userid, _, _, _) = HttpContext.GetAuthTokenInfo();
             request.TryGetProperty("standard", out JsonElement _standard);
             string standard = $"{_standard}";
             if (string.IsNullOrEmpty(standard))
             {
                 return BadRequest();
             }
+            request.TryGetProperty("update", out JsonElement _update);
+            HashSet<string> update = null;
+            if (_update.ValueKind.Equals(JsonValueKind.Array))
+            {
+                update = _update.ToObject<HashSet<string>>();
+            }
             var client = _azureCosmos.GetCosmosClient();
             Area area = null;
             string sql = $"select value(c) from c where c.standard='{standard}'";
@@ -580,7 +588,7 @@ namespace TEAMModelOS.Controllers
                     }
                     schoolInfos.Add(new SchoolInfos { schoolId = school.id, schoolName = school.name, picture = school.picture, teacherCount = count, appraiseCount = appraise });
                     //增加评审人员总人数,学习总人数。
-                    trains.Add(StatisticsService.StatisticsSchool(_coreAPIHttpService, school.id, setting, area, client, _dingDing, null));
+                    trains.Add(StatisticsService.StatisticsSchool(_coreAPIHttpService, school.id, setting, area, client, _dingDing, update));
                 }
                 int pagesize = 100;
                 if (trains.Count <= pagesize)