瀏覽代碼

修改配置文件

CrazyIter_Bin 3 年之前
父節點
當前提交
30b34c261e
共有 2 個文件被更改,包括 69 次插入13 次删除
  1. 66 10
      TEAMModelOS.FunctionV4/HttpTrigger/ScsYxptApis.cs
  2. 3 3
      TEAMModelOS/JsonFile/Core/LangConfigV3.json

+ 66 - 10
TEAMModelOS.FunctionV4/HttpTrigger/ScsYxptApis.cs

@@ -513,6 +513,29 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
             await response.WriteAsJsonAsync(new { });
             return response;
         }
+        //5.3.1.17学员课堂实录批量回写-UploadKTSLList
+        public (int t53117OK, List<KeyValuePair<string, string>> msgs) check53117(TeacherTrain teacherTrain, List<KeyValuePair<string, string>> msgs) {
+            //校验 基本情况是否满足
+            int t53117OK = 1;
+            if (teacherTrain.classTime <= 0)
+            {
+                msgs.Add(new KeyValuePair<string, string>("classTime", $"未获得学时:{teacherTrain.classTime}"));
+                t53117OK = 0;
+            }
+            if (teacherTrain.teacherClasses.Count() <= 0) {
+                msgs.Add(new KeyValuePair<string, string>("teacherClasses", $"未上传课堂实录:{teacherTrain.teacherClasses.Count()}个视频"));
+                t53117OK = 0;
+            }
+            
+            teacherTrain.teacherClasses.ForEach(x =>{
+                if (string.IsNullOrWhiteSpace(x.url)) {
+                    t53117OK = 0;
+                    msgs.Add(new KeyValuePair<string, string>("teacherClasses", $"课堂实录链接无效"));
+                }
+            });
+            return (t53117OK, msgs);
+        }
+        //5.3.1.12学员培训基本情况批量回写-UpdateTeacherListSituation
         public (int t53112OK, List<KeyValuePair<string, string>> msgs) check53112(TeacherTrain teacherTrain, List<KeyValuePair<string, string>> msgs)
         {
             //校验 基本情况是否满足
@@ -536,28 +559,61 @@ namespace TEAMModelOS.FunctionV4.HttpTrigger
             }
             return (t53112OK, msgs);
         }
-
-        public (int t53113OK, List<KeyValuePair<string, string>> msgs) check53113(TeacherTrain teacherTrain, List<KeyValuePair<string, string>> msgs)
+        //5.3.1.13学员能力点测评结果批量回写-UpdateTeacherListDiagnosis
+        public async Task<(int t53113OK, List<KeyValuePair<string, string>> msgs, List<AbilitySub> abilitySubs)> check53113(TeacherTrain teacherTrain, List<KeyValuePair<string, string>> msgs)
         {
             //校验 基本情况是否满足
             int t53113OK = 1;
-            if (teacherTrain.finalScore < 0)
+            List<AbilitySub> abilitySubs = new List<AbilitySub>();
+            if (teacherTrain.currency.videoTime < 0)
             {
-                msgs.Add(new KeyValuePair<string, string>("finalScore", $"最终评定结果参数:{teacherTrain.finalScore}"));
+                msgs.Add(new KeyValuePair<string, string>("videoTime", $"视频学习时长:{teacherTrain.currency.videoTime}"));
                 t53113OK = 0;
             }
-            if (string.IsNullOrEmpty(teacherTrain.summary) || teacherTrain.summary.Length > 300)
+            if (teacherTrain.currency.submitTime < 0)
             {
-                string msg = string.IsNullOrEmpty(teacherTrain.summary) ? "未填写" : teacherTrain.summary.Length > 300 ? "字数超过300." : "";
-                msgs.Add(new KeyValuePair<string, string>("summary", $"教师培训总结:{msg}"));
+                msgs.Add(new KeyValuePair<string, string>("submitTime", $"认证材料学习:{teacherTrain.currency.submitTime}"));
                 t53113OK = 0;
             }
-            if (teacherTrain.totalTime <= 0)
+            if (teacherTrain.currency.teacherAilities.Count <= 0  || teacherTrain.currency.teacherAilities.Select(x=>x.no).Count()<=0)
             {
-                msgs.Add(new KeyValuePair<string, string>("totalTime", $"未获得学时:{teacherTrain.totalTime}"));
+                msgs.Add(new KeyValuePair<string, string>("teacherAilities", $"能力点不匹配:{teacherTrain.currency.submitTime}"));
                 t53113OK = 0;
             }
-            return (t53113OK, msgs);
+            if (teacherTrain.currency.teacherAilities.Count <= 0 || teacherTrain.currency.teacherAilities.Select(x => x.no).Count() <= 0)
+            {
+                string insql = "";
+                if (teacherTrain.currency.teacherAilities.IsNotEmpty())
+                {
+                    insql = $" where c.id in ({string.Join(",", teacherTrain.currency.teacherAilities.Select(o => $"'{o.id}'"))})";
+
+                }
+              
+                //认证材料
+                await foreach (var item in _azureCosmos.GetCosmosClient().GetContainer("TEAMModelOS", "Teacher")
+                         .GetItemQueryIterator<AbilitySub>(queryText: $"select value(c) from c {insql}", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"AbilitySub-{teacherTrain.school}-{teacherTrain.id}") }))
+                {
+                    abilitySubs.Add(item);
+
+                }
+                teacherTrain.currency.teacherAilities.ForEach(x => {
+                    var  abilitySub= abilitySubs.Find(z => z.id.Equals(x.id));
+                    if (x.zpscore <= 0) {
+                        msgs.Add(new KeyValuePair<string, string>("zpscore", $"认证材料学习,自评无效:{x.no},{x.name},{x.zpscore}"));
+                    }
+                    if (x.hpscore <= 0)
+                    {
+                        msgs.Add(new KeyValuePair<string, string>("hpscore", $"认证材料学习,互评无效:{x.no},{x.name},{x.hpscore}"));
+                    }
+                    if (x.xzscore <= 0)
+                    {
+                        msgs.Add(new KeyValuePair<string, string>("xzscore", $"认证材料学习,小组评无效:{x.no},{x.name},{x.xzscore}"));
+                    }
+                });
+                t53113OK = 0;
+
+            }
+            return (t53113OK, msgs, abilitySubs);
         }
     }
 }

+ 3 - 3
TEAMModelOS/JsonFile/Core/LangConfigV3.json

@@ -27,7 +27,7 @@
         "Judge": "对|错",
         "Ended": "结束",
         "Level": "难度",
-        "Count": "填空数"
+        "Count": "填空数"
       }
     },
     {
@@ -54,7 +54,7 @@
         "Judge": "對|錯",
         "Ended": "結束",
         "Level": "難度",
-        "Count": "填空數"
+        "Count": "填充數量"
       }
     },
     {
@@ -81,7 +81,7 @@
         "Judge": "對|錯",
         "Ended": "結束",
         "Level": "難度",
-        "Count": "填空數"
+        "Count": "填充數量"
       }
     },
     {