Parcourir la source

补充异常获取信息,调整班级结构内容

zhouj1203@hotmail.com il y a 4 ans
Parent
commit
3ae7b9719e

+ 8 - 5
TEAMModelFunction/TriggerExam.cs

@@ -324,7 +324,7 @@ namespace TEAMModelFunction
                         }
                         catch (Exception e)
                         {
-                            await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-评测going状态异常{e.Message}\n{e.StackTrace}", GroupNames.成都开发測試群組);
+                            await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-{info.id}-评测going状态异常{e.Message}\n{e.StackTrace}", GroupNames.成都开发測試群組);
                         }
                         break;
                     case "finish":
@@ -440,7 +440,7 @@ namespace TEAMModelFunction
             }
             catch (Exception e)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-评测结算异常{e.Message}\n{e.StackTrace}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-{info.id}-评测结算异常{e.Message}\n{e.StackTrace}", GroupNames.成都开发測試群組);
             }
 
         }
@@ -510,7 +510,7 @@ namespace TEAMModelFunction
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-评测作答记录结算异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-{info.id}-评测作答记录结算异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
             }
         }
 
@@ -620,7 +620,7 @@ namespace TEAMModelFunction
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-评测知识点结算异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-{info.id}-评测知识点结算异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
             }
         }
 
@@ -715,7 +715,7 @@ namespace TEAMModelFunction
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-评测认知层次结算异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-{info.id}-评测认知层次结算异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
             }
         }
         //处理选题计数
@@ -841,6 +841,9 @@ namespace TEAMModelFunction
                         csRate.Add(classResult.studentIds.Count > 0 ? Math.Round(classSrate * 1.0 / classResult.studentIds.Count, 2) : 0 / allScore);
 
                     }
+                    else {
+                        csRate.Add(0);
+                    }
 
                     //powSum += Math.Pow(classSrate - result.average, 2);
                     //处理选项计数内容

+ 3 - 3
TEAMModelOS.SDK/Models/Cosmos/School/Class.cs

@@ -50,18 +50,18 @@ namespace TEAMModelOS.SDK.Models
         /// <summary>
         /// TBL IRS 类型区分
         /// </summary>
-        public string style { get; set; }
+        //public string style { get; set; }
         public int status { get; set; } = 1;        
        
         /// <summary>
         /// 教室属性,普通 /专设的教室
         /// </summary>
-        public string openType { get; set; }
+        //public string openType { get; set; }
         public string scope { get; set; }
         /// <summary>
         /// 学生名单数据来源 1是不同学校的学生账号,2是扫码加入的醍摩豆ID
         /// </summary>
-        public int? source { get; set; }
+        //public int? source { get; set; }
         
     }
 }

+ 1 - 1
TEAMModelOS.SDK/TEAMModelOS.SDK.csproj

@@ -16,7 +16,7 @@
     <PackageReference Include="Azure.Messaging.ServiceBus" Version="7.1.1" />
     <PackageReference Include="Azure.Storage.Blobs.Batch" Version="12.5.1" />
     <PackageReference Include="Azure.Storage.Queues" Version="12.6.1" />
-    <PackageReference Include="ClouDASLibx" Version="1.2.6" />
+    <PackageReference Include="ClouDASLibx" Version="1.2.7" />
     <PackageReference Include="DocumentFormat.OpenXml" Version="2.12.3" />
     <PackageReference Include="HtmlAgilityPack" Version="1.11.32" />
     <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.10" />

+ 2 - 0
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -1428,6 +1428,8 @@ namespace TEAMModelOS.Controllers
                 List<ExamClassResult> classResults = new();
                 List<dynamic> recs = new List<dynamic>();
                 var record = await redisClient.HashGetAllAsync($"Exam:Scoring:{id}-{subjectId}");
+                var onec  = await redisClient.HashGetAsync($"Exam:Scoring:{id}-{subjectId}", "hbcn070207");
+                var vv = JsonDocument.Parse(onec.ToString());
                 foreach (var rcd in record)
                 {
                     var value = JsonDocument.Parse(rcd.Value.ToString());