CrazyIter_Bin 3 anos atrás
pai
commit
b57eae5a30

+ 5 - 3
TEAMModelOS.SDK/Models/Cosmos/Common/Survey.cs

@@ -19,6 +19,7 @@ namespace TEAMModelOS.SDK.Models
             classes = new List<string>();
             stuLists = new List<string>();
             tmdids = new List<string>();
+            tchLists = new List<string>();
         }
         /// <summary>
         ///发布层级 类型 school  teacher
@@ -54,9 +55,10 @@ namespace TEAMModelOS.SDK.Models
         public string progress { get; set; }
         public string scope { get; set; }
 
-        public List<string> tmdids { get; set; }
-        public List<string> classes { get; set; }
-        public List<string> stuLists { get; set; }
+        public List<string> tmdids { get; set; } = new List<string>();
+        public List<string> classes { get; set; } = new List<string>();
+        public List<string> stuLists { get; set; } = new List<string>();
+        public List<string> tchLists { get; set; } = new List<string>();
         /// <summary>
         /// 发布对象全部信息。由前端操作,用于前端回显发布对象的格式。
         /// </summary>

+ 3 - 2
TEAMModelOS.SDK/Models/Cosmos/Common/Vote.cs

@@ -81,8 +81,9 @@ namespace TEAMModelOS.SDK.Models
         /// <summary>
         ///  scope 为school时 是学校的班级 class行政班   为private 时是私人班级
         /// </summary>
-        public List<string> classes { get; set; }
-        public List<string> stuLists { get; set; }
+        public List<string> classes { get; set; } = new List<string>();
+        public List<string> stuLists { get; set; } = new List<string>();
+        public List<string> tchLists { get; set; } = new List<string>();
         /// <summary>
         /// 发布对象全部信息。由前端操作,用于前端回显发布对象的格式。
         /// </summary>

+ 3 - 2
TEAMModelOS.SDK/Models/Service/StuListService.cs

@@ -91,9 +91,10 @@ namespace TEAMModelFunction
                             taskStatus = -1,
                             classIds = classes
                         };
-                     //   await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-StuListService-FixActivity\n名单发生变更 新建活动中间表\n{stucourse.ToJsonString()}", GroupNames.醍摩豆服務運維群組);
                         await client.GetContainer(Constant.TEAMModelOS, "Student").UpsertItemAsync(stucourse, new PartitionKey(stucourse.code));
-                    }//tmd新加入的
+                    }
+                    
+                    //tmd新加入的
                     foreach (string tmdid in stuListChange.tmdjoin)
                     {
                         var stucourse = new StuActivity

+ 7 - 2
TEAMModelOS/Controllers/School/StuListController.cs

@@ -749,7 +749,9 @@ namespace TEAMModelOS.Controllers
                 var client = _azureCosmos.GetCosmosClient();
                 List<object> stuList = new();
                 List<string> ids = new();
-                ids = _stuids.ToObject<List<string>>();
+                if (!_stuids.ValueKind.Equals(JsonValueKind.Undefined) && _stuids.ValueKind.Equals(JsonValueKind.Array)) {
+                    ids = _stuids.ToObject<List<string>>();
+                }
                 // var query = $"select c.id,c.name,c.students,c.tmids,c.periodId from c";
                 StringBuilder query = new StringBuilder($"select c.id,c.name,c.students,c.tmids,c.no,c.code,c.scope,c.school,c.creatorId,c.periodId from c ");
                 if (ids.IsNotEmpty()) { 
@@ -807,7 +809,10 @@ namespace TEAMModelOS.Controllers
                 var client = _azureCosmos.GetCosmosClient();
                 List<StuList> stuList = new();
                 List<string> ids = new();
-                ids = _stuids.ToObject<List<string>>();
+                if (!_stuids.ValueKind.Equals(JsonValueKind.Undefined) && _stuids.ValueKind.Equals(JsonValueKind.Array))
+                {
+                    ids = _stuids.ToObject<List<string>>();
+                }
                 // var query = $"select c.id,c.name,c.students,c.tmids,c.periodId from c";
                 StringBuilder query = new StringBuilder($"select vaule(c) from c where c.type='research' ");
                 if (ids.IsNotEmpty())