CrazyIter_Bin 3 years ago
parent
commit
b21836e789

+ 3 - 61
TEAMModelOS.SDK/Models/Service/StatisticsService.cs

@@ -12,10 +12,7 @@ namespace TEAMModelOS.SDK
 {
     public static class StatisticsService
     {
-        /// <summary>
-        /// 视频观看记录
-        /// </summary>
-        public const string VideoRecord= "VideoRecord";
+         
         /// <summary>
         /// 教师能力点操作
         /// </summary>
@@ -144,37 +141,7 @@ namespace TEAMModelOS.SDK
 
             }
             return train;
-            //foreach (var property in  updateProperty)
-            //{
-            //    //视频观看更新
-            //    //if (property.Equals(VideoRecord, StringComparison.OrdinalIgnoreCase))
-            //    //{
-            //    //    train = await DoVideoRecord(train, setting, area, client, _school, _tmdid);
-            //    //    train.updateProperty.Remove(VideoRecord);
-            //    //    yield return train;
-            //    //}
-            //    //认证材料更新
-            //    if (property.Equals(TeacherAility, StringComparison.OrdinalIgnoreCase))
-            //    {
-            //        train = await DoTeacherAility(train, setting, area, client, _school, _tmdid);
-            //        train.updateProperty.Remove(TeacherAility);
-
-            //    }
-            //    //课堂实录更新
-            //    if (property.Equals(TeacherClass, StringComparison.OrdinalIgnoreCase))
-            //    {
-            //        train = await DoTeacherClass(train, setting, area, client, _school, _tmdid);
-            //        train.updateProperty.Remove(TeacherClass);
-            //    }
-            //    //线下研修
-            //    if (property.Equals(OfflineRecord, StringComparison.OrdinalIgnoreCase))
-            //    {
-            //        train = await DoOfflineRecord(train, setting, area, client, _school, _tmdid);
-            //        train.updateProperty.Remove(OfflineRecord);
-
-            //    }
-            //    yield return train;
-            //}
+            
         }
         public static async Task<TeacherTrain> DoActivity(TeacherTrain train, AreaSetting setting, Area area, CosmosClient client, string _school, string _tmdid) {
             //问卷调查
@@ -373,32 +340,7 @@ namespace TEAMModelOS.SDK
             }
             return train;
         }
-        //public static async Task<TeacherTrain> DoVideoRecord(TeacherTrain train, AreaSetting setting, Area area, CosmosClient client, string _school, string _tmdid) {
-        //    TeacherFile file = null;
-        //    try
-        //    {
-        //        file = await client.GetContainer(Constant.TEAMModelOS, "Teacher").ReadItemAsync<TeacherFile>(_tmdid, new PartitionKey($"VideoRecord-{_school}"));
-        //    }
-        //    catch (CosmosException ex)
-        //    {
-        //        file = new TeacherFile
-        //        {
-        //            id = _tmdid,
-        //            code = $"VideoRecord-{_school}" ,
-        //            pk = "TeacherFile",
-        //            ttl = -1,
-
-        //        };
-        //        await client.GetContainer(Constant.TEAMModelOS, "Teacher").CreateItemAsync<TeacherFile>(file, new PartitionKey($"VideoRecord-{_school}"));
-        //    }
-        //    if (file != null)
-        //    {
-        //        List<string> abilityIds= file.fileRecords.SelectMany(x=>x.files).GroupBy(y=>y.abilityId).Select(m=>m.Key).Distinct().ToList();
-        //        train.currency.videoTime = file.fileRecords.Where(x => x.type.Equals("video")).Select(y => y.view).Sum();
-        //    }
-        //    train.onlineTime = (int)train.currency.videoTime / setting.lessonMinutes;
-        //    return train;
-        //}
+        
         public static async Task<TeacherTrain> DoTeacherAility(TeacherTrain train, AreaSetting setting,Area area ,  CosmosClient client,string _school,string _tmdid) {
             //视频播放
             List<string> abilityIds = new List<string> ();

+ 1 - 1
TEAMModelOS/Controllers/Research/AbilityStatisticsController.cs

@@ -181,7 +181,7 @@ namespace TEAMModelOS.Controllers
                         school = school,
                         name= name,
                         picture= picture,
-                        updateProperty = new HashSet<string> { StatisticsService.VideoRecord, StatisticsService.TeacherAility,
+                        updateProperty = new HashSet<string> {  StatisticsService.TeacherAility,
                         StatisticsService.TeacherClass, StatisticsService.OfflineRecord }
                     }, setting, area, client);