瀏覽代碼

处理 作业学生产生数据

zj 2 年之前
父節點
當前提交
86a0ea3563
共有 1 個文件被更改,包括 11 次插入5 次删除
  1. 11 5
      TEAMModelOS.FunctionV4/CosmosDB/TriggerHomework.cs

+ 11 - 5
TEAMModelOS.FunctionV4/CosmosDB/TriggerHomework.cs

@@ -191,14 +191,20 @@ namespace TEAMModelOS.FunctionV4
 
             }
             List<string> sub = new();
-            if (work.targets.Count > 0) {
-                foreach (var course in work.targets) {
-                   var info =  course.ToObject<List<string>>();
-                    if (info.Count > 1) {
-                        sub.Add(info[0]);
+            if (work.tchLists.Count == 0) {
+                if (work.targets.Count > 0)
+                {
+                    foreach (var course in work.targets)
+                    {
+                        var info = course.ToObject<List<string>>();
+                        if (info.Count > 1)
+                        {
+                            sub.Add(info[0]);
+                        }
                     }
                 }
             }
+            
             if (addTmdidsCls.IsNotEmpty())
             {
                 addTmdidsCls.ForEach(x =>