zhouj1203@hotmail.com 1 年之前
父節點
當前提交
01b6f81eac

+ 4 - 1
TEAMModelOS.FunctionV4/CosmosDB/TriggerArt.cs

@@ -112,7 +112,8 @@ namespace TEAMModelOS.FunctionV4.CosmosDB
                             }
                             }
                             break;
                             break;
                         case "going":
                         case "going":
-
+                            string pkey = string.Format("{0}{1}{2}", art.code, "-", "pending");
+                            await table.DeleteSingle<ChangeRecord>(pkey, tdata.id);
                             /*
                             /*
                              if (art.classes.Count > 0)
                              if (art.classes.Count > 0)
                             {
                             {
@@ -248,6 +249,8 @@ namespace TEAMModelOS.FunctionV4.CosmosDB
 
 
                             break;
                             break;
                         case "finish":
                         case "finish":
+                            string pk = string.Format("{0}{1}{2}", art.code, "-", "going");
+                            await table.DeleteSingle<ChangeRecord>(pk, tdata.id);
                             //判定是否是区级创建的活动内容
                             //判定是否是区级创建的活动内容
                             /* if (art.lost.Count == 0 && art.pass == 0)
                             /* if (art.lost.Count == 0 && art.pass == 0)
                              {
                              {

+ 6 - 0
TEAMModelOS.FunctionV4/CosmosDB/TriggerExam.cs

@@ -161,6 +161,9 @@ namespace TEAMModelOS.FunctionV4
                             try
                             try
                             {
                             {
 
 
+                                //新增serviceBus 消息释放后处理table
+                                string pkey = string.Format("{0}{1}{2}", info.code, "-", "pending");
+                                await table.DeleteSingle<ChangeRecord>(pkey, data.id);
                                 //向学生或醍摩豆账号发起通知
                                 //向学生或醍摩豆账号发起通知
                                 #region
                                 #region
                                 //Notice notice = new Notice()
                                 //Notice notice = new Notice()
@@ -427,6 +430,9 @@ namespace TEAMModelOS.FunctionV4
                             }
                             }
                             break;
                             break;
                         case "finish":
                         case "finish":
+                            //新增serviceBus 消息释放后处理table
+                            string pk = string.Format("{0}{1}{2}", info.code, "-", "going");
+                            await table.DeleteSingle<ChangeRecord>(pk, data.id);
                             int fno = 0;
                             int fno = 0;
                             try
                             try
                             {
                             {

+ 4 - 1
TEAMModelOS.FunctionV4/CosmosDB/TriggerHomework.cs

@@ -103,7 +103,8 @@ namespace TEAMModelOS.FunctionV4
 
 
                             break;
                             break;
                         case "going":
                         case "going":
-
+                            string pkey = string.Format("{0}{1}{2}", work.code, "-", "pending");
+                            await table.DeleteSingle<ChangeRecord>(pkey, tdata.id);
                             await Activity(_coreAPIHttpService, _serviceBus, _dingDing, client, _configuration, work);
                             await Activity(_coreAPIHttpService, _serviceBus, _dingDing, client, _configuration, work);
                             var messageWorkEnd = new ServiceBusMessage(new { id = tdata.id, progress = "finish", code = tdata.code }.ToJsonString());
                             var messageWorkEnd = new ServiceBusMessage(new { id = tdata.id, progress = "finish", code = tdata.code }.ToJsonString());
                             messageWorkEnd.ApplicationProperties.Add("name", "Homework");
                             messageWorkEnd.ApplicationProperties.Add("name", "Homework");
@@ -138,6 +139,8 @@ namespace TEAMModelOS.FunctionV4
                             //}
                             //}
                             break;
                             break;
                         case "finish":
                         case "finish":
+                            string pk = string.Format("{0}{1}{2}", work.code, "-", "going");
+                            await table.DeleteSingle<ChangeRecord>(pk, tdata.id);
                             await Activity(_coreAPIHttpService, _serviceBus, _dingDing, client, _configuration, work);
                             await Activity(_coreAPIHttpService, _serviceBus, _dingDing, client, _configuration, work);
                             List<(string pId, List<string> gid)> gls = new List<(string pId, List<string> gid)>();
                             List<(string pId, List<string> gid)> gls = new List<(string pId, List<string> gid)>();
                             if (work.groupLists.Count > 0)
                             if (work.groupLists.Count > 0)

+ 4 - 1
TEAMModelOS.FunctionV4/CosmosDB/TriggerStudy.cs

@@ -107,6 +107,8 @@ namespace TEAMModelOS.FunctionV4
                             }
                             }
                             break;
                             break;
                         case "going":
                         case "going":
+                            string pkey = string.Format("{0}{1}{2}", study.code, "-", "pending");
+                            await table.DeleteSingle<ChangeRecord>(pkey, tdata.id);
                             try {
                             try {
                                 List<(string pId, List<string> gid)> ps = new List<(string pId, List<string> gid)>();
                                 List<(string pId, List<string> gid)> ps = new List<(string pId, List<string> gid)>();
                                 if (study.groupLists.Count > 0)
                                 if (study.groupLists.Count > 0)
@@ -222,7 +224,8 @@ namespace TEAMModelOS.FunctionV4
                            
                            
                             break;
                             break;
                         case "finish":
                         case "finish":
-
+                            string pk = string.Format("{0}{1}{2}", study.code, "-", "going");
+                            await table.DeleteSingle<ChangeRecord>(pk, tdata.id);
                             List<(string pId, List<string> gid)> gls = new List<(string pId, List<string> gid)>();
                             List<(string pId, List<string> gid)> gls = new List<(string pId, List<string> gid)>();
                             if (study.groupLists.Count > 0)
                             if (study.groupLists.Count > 0)
                             {
                             {

+ 4 - 0
TEAMModelOS.FunctionV4/CosmosDB/TriggerSurvey.cs

@@ -110,6 +110,8 @@ namespace TEAMModelOS.FunctionV4
                             }
                             }
                             break;
                             break;
                         case "going":
                         case "going":
+                            string pkey = string.Format("{0}{1}{2}", survey.code, "-", "pending");
+                            await table.DeleteSingle<ChangeRecord>(pkey, tdata.id);
                             List<(string pId, List<string> gid)> ps = new List<(string pId, List<string> gid)>();
                             List<(string pId, List<string> gid)> ps = new List<(string pId, List<string> gid)>();
                             if (survey.groupLists.Count > 0)
                             if (survey.groupLists.Count > 0)
                             {
                             {
@@ -330,6 +332,8 @@ namespace TEAMModelOS.FunctionV4
 #endif
 #endif
                             break;
                             break;
                         case "finish":
                         case "finish":
+                            string pk = string.Format("{0}{1}{2}", survey.code, "-", "going");
+                            await table.DeleteSingle<ChangeRecord>(pk, tdata.id);
 #if DEBUG
 #if DEBUG
                             await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}问卷调查{tdata.id}开始结算{tdata.endTime}!", GroupNames.醍摩豆服務運維群組);
                             await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}问卷调查{tdata.id}开始结算{tdata.endTime}!", GroupNames.醍摩豆服務運維群組);
 #endif
 #endif

+ 4 - 0
TEAMModelOS.FunctionV4/CosmosDB/TriggerVote.cs

@@ -106,6 +106,8 @@ namespace TEAMModelOS.FunctionV4
                             }
                             }
                             break;
                             break;
                         case "going":
                         case "going":
+                            string pk = string.Format("{0}{1}{2}", vote.code, "-", "pending");
+                            await table.DeleteSingle<ChangeRecord>(pk, tdata.id);
                             List<(string pId, List<string> gid)> ps = new List<(string pId, List<string> gid)>();
                             List<(string pId, List<string> gid)> ps = new List<(string pId, List<string> gid)>();
                             if (vote.groupLists.Count > 0)
                             if (vote.groupLists.Count > 0)
                             {
                             {
@@ -333,6 +335,8 @@ namespace TEAMModelOS.FunctionV4
 #endif
 #endif
                             break;
                             break;
                         case "finish":
                         case "finish":
+                            string pkey = string.Format("{0}{1}{2}", vote.code, "-", "going");
+                            await table.DeleteSingle<ChangeRecord>(pkey, tdata.id);
 #if DEBUG
 #if DEBUG
                             await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}投票活动{tdata.id}开始结算{tdata.endTime}!", GroupNames.醍摩豆服務運維群組);
                             await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}投票活动{tdata.id}开始结算{tdata.endTime}!", GroupNames.醍摩豆服務運維群組);
 #endif
 #endif