浏览代码

版本号

CrazyIter_Bin 3 年之前
父节点
当前提交
ea3d1f034a

+ 0 - 1
TEAMModelFunction/ActivityHttpTrigger.cs

@@ -413,7 +413,6 @@ namespace TEAMModelFunction
                 items.GroupBy(x => x.periodId).Select(y=>new {key= y.Key,list=y.ToList() }).ToList().ForEach(z => {
                     ItemCond cond = new ItemCond() { id = z.key, code = $"ItemCond-hbcn", pk = "ItemCond", ttl = -1, count = 0, grades = new List<GradeCount>(), subjects = new List<SubjectCount>() };
                     z.list.ForEach(y => {
-                        
                         ItemService.CountItemCond(y, null, cond);
                     });
 

+ 9 - 11
TEAMModelFunction/MonitorServicesBus.cs

@@ -51,7 +51,7 @@ namespace TEAMModelFunction
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ExamBus()\n{ex.Message}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,ExamBus()\n{ex.Message}\n{ex.StackTrace}\n{msg}", GroupNames.醍摩豆服務運維群組);
             }
 
         }
@@ -64,15 +64,14 @@ namespace TEAMModelFunction
                 jsonMsg.RootElement.TryGetProperty("id", out JsonElement id);
                 jsonMsg.RootElement.TryGetProperty("progress", out JsonElement progress);
                 jsonMsg.RootElement.TryGetProperty("code", out JsonElement code);
-                //Dictionary<string, object> keyValuePairs = mySbMsg.ToObject<Dictionary<string, object>>();
                 var client = _azureCosmos.GetCosmosClient();
-                ItemResponse <Vote> vote = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<Vote>(id.ToString(), new PartitionKey($"{code}"));
-                vote.Value.progress = progress.ToString();
+                Vote vote = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<Vote>(id.ToString(), new PartitionKey($"{code}"));
+                vote.progress = progress.ToString();
                 await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync(vote, id.ToString(), new PartitionKey($"{code}"));
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,VoteBus()\n{ex.Message}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,VoteBus()\n{ex.Message}\n{ex.StackTrace}\n{msg}", GroupNames.醍摩豆服務運維群組);
             }
 
         }
@@ -85,7 +84,6 @@ namespace TEAMModelFunction
                 jsonMsg.RootElement.TryGetProperty("id", out JsonElement id);
                 jsonMsg.RootElement.TryGetProperty("progress", out JsonElement progress);
                 jsonMsg.RootElement.TryGetProperty("code", out JsonElement code);
-                //Dictionary<string, object> keyValuePairs = mySbMsg.ToObject<Dictionary<string, object>>();
                 var client = _azureCosmos.GetCosmosClient();
                 Correct correct = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<Correct>(id.ToString(), new PartitionKey($"{code}"));
                 correct.progress = progress.ToString();
@@ -93,7 +91,7 @@ namespace TEAMModelFunction
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,VoteBus()\n{ex.Message}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Correct()\n{ex.Message}\n{ex.StackTrace}\n{msg}", GroupNames.醍摩豆服務運維群組);
             }
 
         }
@@ -114,7 +112,7 @@ namespace TEAMModelFunction
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,SurveyBus()\n{ex.Message}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,SurveyBus()\n{ex.Message}\n{ex.StackTrace}\n{msg}", GroupNames.醍摩豆服務運維群組);
             }
         }
         [FunctionName("Blob")]
@@ -141,7 +139,7 @@ namespace TEAMModelFunction
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Blob()\n{ex.Message}{ex.StackTrace}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Blob()\n{ex.Message}\n{ex.StackTrace}\n{msg}", GroupNames.醍摩豆服務運維群組);
             }
         }
         /// <summary>
@@ -183,7 +181,7 @@ namespace TEAMModelFunction
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Blob()\n{ex.Message}{ex.StackTrace}", GroupNames.醍摩豆服務運維群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-ServiceBus,Blob()\n{ex.Message}\n{ex.StackTrace}\n{msg}", GroupNames.醍摩豆服務運維群組);
             }
         }
 
@@ -223,7 +221,7 @@ namespace TEAMModelFunction
             }
             catch (Exception ex)
             {
-                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-StuListServiceBus-StuList\n{ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-StuListServiceBus-StuList\n{ex.Message}\n{ex.StackTrace}\n{msg}", GroupNames.成都开发測試群組);
             }
         }
 

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Student/OldStudent.cs

@@ -53,6 +53,7 @@ namespace TEAMModelOS.SDK.Models
         public string classroomCode { get; set; }
         public string studentId { get; set; }
         public int seatNo { get; set; }   
+        public string periodId { get; set; }
     }
 }
 public class Password {

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Student/Student.cs

@@ -23,5 +23,6 @@ namespace TEAMModelOS.SDK.Models
         //分组信息
         public string groupId { get; set; }
         public string groupName { get; set; }
+        public string periodId { get; set; }
     }
 }

+ 1 - 1
TEAMModelOS/Controllers/Common/CommonController.cs

@@ -156,7 +156,7 @@ namespace TEAMModelOS.Controllers.Common
                 long now = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds();
                 Dictionary<string, object> dy = System.Text.Json.JsonSerializer.Deserialize<Dictionary<string, object>>(json.RootElement.ToString());
                 dy["endTime"] = now;
-                dy["progress"] = "finish";
+                dy["progress"] = "finish"; 
                 await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync<Dictionary<string, object>>(dy, dy["id"].ToString(), new Azure.Cosmos.PartitionKey(dy["code"].ToString()));
                 var httpClient = _clientFactory.CreateClient();
                 var content = new { id = $"{id}", code = $"{code}" };

+ 1 - 0
TEAMModelOS/Controllers/Core/ImportController.cs

@@ -265,6 +265,7 @@ namespace TEAMModelOS.Controllers
                 return BadRequest(new Dictionary<string, object> { { "msg", "type is not docx!" }, { "code", ResponseCode.FAILED } });
             }
             var doc = _DOXC2HTMLTranslator.Translate(file.OpenReadStream());
+
              (List<HTEXLib.DOCX.Models.ItemInfo> tests, List<string> error) = _HTML2ITEMV3Translator.Translate(doc);
 
             return Ok(new { tests, emferror= error });

+ 3 - 1
TEAMModelOS/Controllers/School/StudentController.cs

@@ -1732,7 +1732,7 @@ namespace TEAMModelOS.Controllers
 
         private struct studCreateInfo
         {
-            public studCreateInfo(string id, string name, string gender, int year, string pw, string classId, string no)
+            public studCreateInfo(string id, string name, string gender, int year, string pw, string classId, string no,string periodId)
             {
                 this.id = id;
                 this.name = name;
@@ -1741,6 +1741,7 @@ namespace TEAMModelOS.Controllers
                 this.pw = pw;
                 this.classId = classId;
                 this.no = no;
+                this.periodId = periodId;
             }
             public string id { get; }
             public string name { get; }
@@ -1749,6 +1750,7 @@ namespace TEAMModelOS.Controllers
             public string pw { get; }
             public string classId { get; }
             public string no { get; }
+            public string periodId { get; set; }
         }
 
         /// <summary>

+ 2 - 1
TEAMModelOS/TEAMModelOS.csproj

@@ -43,7 +43,8 @@
     <SpaRoot>ClientApp\</SpaRoot>
     <DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
     <UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
-    <Version>5.0.0</Version>
+    <Version>5.2107.12</Version>
+    <AssemblyVersion>5.2107.12.1</AssemblyVersion>
   </PropertyGroup>
   <Target Name="DebugEnsureNodeEnv" BeforeTargets="Build">
     <!-- Build Target:  Ensure Node.js is installed -->