Browse Source

Merge branch 'develop' of http://52.130.252.100:10000/TEAMMODEL/TEAMModelOS into develop

OnePsycho 2 years ago
parent
commit
6d6909b953

+ 41 - 34
TEAMModelBI/Controllers/BINormal/AreaRelevantController.cs

@@ -244,6 +244,7 @@ namespace TEAMModelBI.Controllers.BINormal
 
 
             SimpleInfo existsArea = null;
             SimpleInfo existsArea = null;
             List<SimpleInfo> existsSc = new();
             List<SimpleInfo> existsSc = new();
+            List<SimpleInfo> errorSc = new();
             StringBuilder strMsg = new($"{_tmdName}【{_tmdId}】账户将{tmdName}【{tmdId}】");
             StringBuilder strMsg = new($"{_tmdName}【{_tmdId}】账户将{tmdName}【{tmdId}】");
 
 
             Teacher teacher = null;
             Teacher teacher = null;
@@ -285,46 +286,52 @@ namespace TEAMModelBI.Controllers.BINormal
                     strMsg.Append($"并将改账户设置为学校管理员;修改信息:");
                     strMsg.Append($"并将改账户设置为学校管理员;修改信息:");
                     foreach (var item in schoolMs)
                     foreach (var item in schoolMs)
                     {
                     {
-                        SchoolTeacher schoolTeacher = null;
-                        var resScTch = await cosmosClient.GetContainer("TEAMModelOS", "School").ReadItemStreamAsync($"{tmdId}", new PartitionKey($"Teacher-{item.id}"));
-                        if (resScTch.Status == 200)
+                        var resSc = await cosmosClient.GetContainer("TEAMModelOS", "School").ReadItemStreamAsync($"{item.id}", new PartitionKey($"Base"));
+                        if (resSc.Status == 200)
                         {
                         {
-                            using var json = await JsonDocument.ParseAsync(resScTch.ContentStream);
-                            schoolTeacher = json.ToObject<SchoolTeacher>();
-                            if (!schoolTeacher.roles.Contains("admin"))
+                            SchoolTeacher schoolTeacher = null;
+                            var resScTch = await cosmosClient.GetContainer("TEAMModelOS", "School").ReadItemStreamAsync($"{tmdId}", new PartitionKey($"Teacher-{item.id}"));
+                            if (resScTch.Status == 200)
                             {
                             {
-                                schoolTeacher.roles.Add("admin");
-                                schoolTeacher = await cosmosClient.GetContainer("TEAMModelOS", "School").ReplaceItemAsync<SchoolTeacher>(schoolTeacher, schoolTeacher.id, new PartitionKey($"Teacher-{item.id}"));
+                                using var json = await JsonDocument.ParseAsync(resScTch.ContentStream);
+                                schoolTeacher = json.ToObject<SchoolTeacher>();
+                                if (!schoolTeacher.roles.Contains("admin"))
+                                {
+                                    schoolTeacher.roles.Add("admin");
+                                    schoolTeacher = await cosmosClient.GetContainer("TEAMModelOS", "School").ReplaceItemAsync<SchoolTeacher>(schoolTeacher, schoolTeacher.id, new PartitionKey($"Teacher-{item.id}"));
+                                }
+                                else
+                                    existsSc.Add(item);
                             }
                             }
                             else
                             else
-                                existsSc.Add(item);
-                        }
-                        else
-                        {
-                            schoolTeacher = new()
                             {
                             {
-                                id = $"{tmdId}",
-                                code = $"Teacher-{item.id}",
-                                roles = new List<string> { "admin", "teacher" },
-                                job = "管理员",
-                                name = $"{tmdName}",
-                                picture = string.IsNullOrEmpty($"{item.picture}") ? "" : $"{item.picture}",
-                                status = "join",
-                                createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
-                                pk = "Teacher",
-                                ttl = -1
-                            };
+                                schoolTeacher = new()
+                                {
+                                    id = $"{tmdId}",
+                                    code = $"Teacher-{item.id}",
+                                    roles = new List<string> { "admin", "teacher" },
+                                    job = "管理员",
+                                    name = $"{tmdName}",
+                                    picture = string.IsNullOrEmpty($"{item.picture}") ? "" : $"{item.picture}",
+                                    status = "join",
+                                    createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
+                                    pk = "Teacher",
+                                    ttl = -1
+                                };
+
+                                schoolTeacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").CreateItemAsync<SchoolTeacher>(schoolTeacher, new PartitionKey($"Teacher-{item.id}"));
+                            }
 
 
-                            schoolTeacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").CreateItemAsync<SchoolTeacher>(schoolTeacher, new PartitionKey($"Teacher-{item.id}"));
-                        }
+                            var existArea = teacher.schools.Find(f => f.schoolId.Equals($"{item.id}"));
+                            if (existArea == null)
+                            {
+                                teacher.schools.Add(new Teacher.TeacherSchool { schoolId = $"{item.id}", name = $"{item.name}", status = "join", time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), picture = string.IsNullOrEmpty($"{item.picture}") ? "" : $"{item.picture}", areaId = $"{areaId}" });
+                            }
 
 
-                        var existArea = teacher.schools.Find(f => f.schoolId.Equals($"{item.id}"));
-                        if (existArea == null)
-                        {
-                            teacher.schools.Add(new Teacher.TeacherSchool { schoolId = $"{item.id}", name = $"{item.name}", status = "join", time = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(), picture = string.IsNullOrEmpty($"{item.picture}") ? "" : $"{item.picture}", areaId = $"{areaId}" });
+                            strMsg.Append($"{item.name}【{item.id}】|");
                         }
                         }
-
-                        strMsg.Append($"{item.name}【{item.id}】|");
+                        else
+                            errorSc.Add(item);
                     }
                     }
 
 
                     teacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Teacher").ReplaceItemAsync<Teacher>(teacher, teacher.id, new PartitionKey("Base"));
                     teacher = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Teacher").ReplaceItemAsync<Teacher>(teacher, teacher.id, new PartitionKey("Base"));
@@ -336,8 +343,8 @@ namespace TEAMModelBI.Controllers.BINormal
             //保存操作记录
             //保存操作记录
             await AzureStorageBlobExtensions.SaveBILog(blobClient, tableClient, "schoolTeacher-add", strMsg.ToString(), _dingDing, httpContext: HttpContext);
             await AzureStorageBlobExtensions.SaveBILog(blobClient, tableClient, "schoolTeacher-add", strMsg.ToString(), _dingDing, httpContext: HttpContext);
 
 
-            if (existsArea != null || existsSc.Count > 0 )
-                return Ok(new { state = RespondCode.Created, teacher, existsArea, existsSc });
+            if (existsArea != null || existsSc.Count > 0 || errorSc.Count > 0)
+                return Ok(new { state = RespondCode.Created, teacher, existsArea, existsSc, errorSc });
             else
             else
                 return Ok(new { state = RespondCode.Ok, teacher });
                 return Ok(new { state = RespondCode.Ok, teacher });
         }
         }

+ 9 - 4
TEAMModelBI/Controllers/BISchool/SchoolController.cs

@@ -1949,11 +1949,10 @@ namespace TEAMModelBI.Controllers.BISchool
         public async Task<IActionResult> GetManageSclist(JsonElement jsonElement)
         public async Task<IActionResult> GetManageSclist(JsonElement jsonElement)
         {
         {
             if (!jsonElement.TryGetProperty("tmdId", out JsonElement tmdId)) return BadRequest();
             if (!jsonElement.TryGetProperty("tmdId", out JsonElement tmdId)) return BadRequest();
+            jsonElement.TryGetProperty("areaId", out JsonElement areaId);
 
 
             var cosmosClient = _azureCosmos.GetCosmosClient();
             var cosmosClient = _azureCosmos.GetCosmosClient();
-
             List<ManageScInfo> mScInfos = new();
             List<ManageScInfo> mScInfos = new();
-
             List<string> scIds = new();
             List<string> scIds = new();
 
 
             string mScSql = $"SELECT value(REPLACE(c.code, 'Teacher-', '')) FROM c where array_contains(c.roles,'admin',true) and c.pk='Teacher' and c.id='{tmdId}'";
             string mScSql = $"SELECT value(REPLACE(c.code, 'Teacher-', '')) FROM c where array_contains(c.roles,'admin',true) and c.pk='Teacher' and c.id='{tmdId}'";
@@ -1964,9 +1963,15 @@ namespace TEAMModelBI.Controllers.BISchool
 
 
             if (scIds.Count > 0)
             if (scIds.Count > 0)
             {
             {
-                string scInfoSql = $"select c.id,c.name,c.code,c.picture,c.region,c.province,c.city,c.dist from c ";
+                string scInfoSql = $"select c.id,c.name,c.code,c.picture,c.region,c.province,c.city,c.dist,c.areaId from c ";
                 string idSql = BICommonWay.ManyScSql("c.id", scIds);
                 string idSql = BICommonWay.ManyScSql("c.id", scIds);
-                mScInfos = await CommonFind.GetObject<ManageScInfo>(cosmosClient, "School", $"{scInfoSql} where {idSql}", "Base");
+                string scSql = $"{scInfoSql} where {idSql}";
+                if (!string.IsNullOrEmpty($"{areaId}")) 
+                {
+                    scSql = $"{scInfoSql} where {idSql} and c.areaId='{areaId}'";
+                }
+
+                mScInfos = await CommonFind.GetObject<ManageScInfo>(cosmosClient, "School", scSql, "Base");
             }
             }
 
 
             return Ok(new { state = RespondCode.Ok, mScInfos });
             return Ok(new { state = RespondCode.Ok, mScInfos });

+ 1 - 0
TEAMModelBI/Models/AssistSchool.cs

@@ -122,6 +122,7 @@ namespace TEAMModelBI.Models
         public string province { get; set; }
         public string province { get; set; }
         public string city { get; set; }
         public string city { get; set; }
         public string dist { get; set; }
         public string dist { get; set; }
+        public string areaId { get; set; }
     }
     }
 
 
 }
 }

+ 3 - 3
TEAMModelBI/TEAMModelBI.csproj

@@ -39,9 +39,9 @@
 		<SpaRoot>ClientApp\</SpaRoot>
 		<SpaRoot>ClientApp\</SpaRoot>
 		<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
 		<DefaultItemExcludes>$(DefaultItemExcludes);$(SpaRoot)node_modules\**</DefaultItemExcludes>
 		<UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
 		<UserSecretsId>078b5d89-7d90-4f6a-88fc-7d96025990a8</UserSecretsId>
-		<Version>1.2208.25</Version>
-		<AssemblyVersion>1.2208.25.1</AssemblyVersion>
-		<FileVersion>1.2208.25.1</FileVersion>
+		<Version>1.2208.31</Version>
+		<AssemblyVersion>1.2208.31.1</AssemblyVersion>
+		<FileVersion>1.2208.31.1</FileVersion>
 		<Description>TEAMModelBI(BI)</Description>
 		<Description>TEAMModelBI(BI)</Description>
 		<PackageReleaseNotes>BI版本说明版本切换标记202200825</PackageReleaseNotes>
 		<PackageReleaseNotes>BI版本说明版本切换标记202200825</PackageReleaseNotes>
 		<PackageId>TEAMModelBI</PackageId>
 		<PackageId>TEAMModelBI</PackageId>

+ 247 - 0
TEAMModelOS.FunctionV4/CosmosDB/TriggerArt.cs

@@ -0,0 +1,247 @@
+using Azure.Messaging.ServiceBus;
+using HTEXLib.COMM.Helpers;
+using Microsoft.Extensions.Configuration;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Text.Json;
+using System.Threading.Tasks;
+using TEAMModelOS.SDK.DI;
+using TEAMModelOS.SDK.Extension;
+using TEAMModelOS.SDK.Models;
+using TEAMModelOS.SDK;
+using Azure.Cosmos;
+using TEAMModelOS.SDK.Models.Cosmos.Common;
+using Azure.Core;
+using TEAMModelOS.SDK.Models.Service;
+
+namespace TEAMModelOS.FunctionV4.CosmosDB
+{
+    internal class TriggerArt
+    {
+        public static async Task Trigger(CoreAPIHttpService _coreAPIHttpService, AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, DingDing _dingDing,
+            CosmosClient client, JsonElement input, TriggerData tdata, AzureRedisFactory _azureRedis, IConfiguration _configuration)
+        {
+            try
+            {
+                if ((tdata.status != null && tdata.status.Value == 404))
+                {
+                    await client.GetContainer(Constant.TEAMModelOS, "Common").DeleteItemStreamAsync(tdata.id, new PartitionKey(tdata.code));
+                    ActivityList data = input.ToObject<ActivityList>();
+                    await ActivityService.DeleteActivity(_coreAPIHttpService, client, _dingDing, data);
+                    var table_cancel = _azureStorage.GetCloudTableClient().GetTableReference("ChangeRecord");
+                    List<ChangeRecord> records = await table_cancel.FindListByDict<ChangeRecord>(new Dictionary<string, object>() { { "RowKey", tdata.id } });
+                    foreach (var record in records)
+                    {
+                        try
+                        {
+                            await table_cancel.DeleteSingle<ChangeRecord>(record.PartitionKey, record.RowKey);
+                            await _serviceBus.GetServiceBusClient().CancelMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), record.sequenceNumber);
+                        }
+                        catch (Exception)
+                        {
+                            continue;
+                        }
+                    }
+                    return;
+                }
+                var table = _azureStorage.GetCloudTableClient().GetTableReference("ChangeRecord");
+                var adid = tdata.id;
+                var adcode = "";
+                string blobcntr = null;
+                if (tdata.scope.Equals("school"))
+                {
+                    adcode = $"Activity-{tdata.school}";
+                    blobcntr = tdata.school;
+                }
+                else
+                {
+                    adcode = $"Activity-{tdata.creatorId}";
+                    blobcntr = tdata.creatorId;
+                }
+                ArtEvaluation art = await client.GetContainer("TEAMModelOS", "Common").ReadItemAsync<ArtEvaluation>(tdata.id, new Azure.Cosmos.PartitionKey($"{tdata.code}"));
+
+                if (art != null)
+                {
+                    string PartitionKey = string.Format("{0}{1}{2}", art.code, "-", art.progress);
+                    List<ChangeRecord> voteRecords = await table.FindListByDict<ChangeRecord>(new Dictionary<string, object>() { { "RowKey", tdata.id }, { "PartitionKey", PartitionKey } });
+                    switch (art.progress)
+                    {
+                        case "pending":
+                            var messageVote = new ServiceBusMessage(new { id = tdata.id, progress = "going", code = tdata.code }.ToJsonString());
+                            messageVote.ApplicationProperties.Add("name", "Art");
+                            if (voteRecords.Count > 0)
+                            {
+                                long start = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVote, DateTimeOffset.FromUnixTimeMilliseconds(tdata.startTime));
+                                try
+                                {
+                                    await _serviceBus.GetServiceBusClient().CancelMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), voteRecords[0].sequenceNumber);
+                                }
+                                catch (Exception)
+                                {
+                                }
+                                voteRecords[0].sequenceNumber = start;
+                                await table.SaveOrUpdate<ChangeRecord>(voteRecords[0]);
+                            }
+                            else
+                            {
+                                long start = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVote, DateTimeOffset.FromUnixTimeMilliseconds(tdata.startTime));
+                                ChangeRecord changeRecord = new ChangeRecord
+                                {
+                                    RowKey = tdata.id,
+                                    PartitionKey = PartitionKey,
+                                    sequenceNumber = start,
+                                    msgId = messageVote.MessageId
+                                };
+                                await table.Save<ChangeRecord>(changeRecord);
+                            }
+                            break;
+                        case "going":
+                            
+                            List<string> classes = ExamService.getClasses(art.classes, art.stuLists);
+                            (List<RMember> tmdIds, List<RGroupList> classLists) = await GroupListService.GetMemberByListids(_coreAPIHttpService, client, _dingDing, classes, art.school, null);
+                            var addStudentsCls = tmdIds.FindAll(x => x.type == 2);
+                            var addTmdidsCls = tmdIds.FindAll(x => x.type == 1);
+                            List<string> tmds = new List<string>();
+                            if (addTmdidsCls.IsNotEmpty())
+                            {
+                                tmds.AddRange(addTmdidsCls.Select(x => x.id).ToList());
+                            }
+                            List<StuActivity> stuActivities = new List<StuActivity>();
+                            List<StuActivity> tmdActivities = new List<StuActivity>();
+                            List<StuActivity> tchActivities = new List<StuActivity>();
+                            List<string> sub = new();
+/*                            if (art.targets.Count > 0)
+                            {
+                                foreach (var course in art.targets)
+                                {
+                                    var info = course.ToObject<List<string>>();
+                                    if (info.Count > 1)
+                                    {
+                                        sub.Add(info[0]);
+                                    }
+                                }
+                            }*/
+                            if (tmds.IsNotEmpty())
+                            {
+                                tmds.ForEach(x =>
+                                {
+                                    HashSet<string> classIds = new HashSet<string>();
+                                    classLists.ForEach(z => {
+                                        z.members.ForEach(y => {
+                                            if (y.id.Equals(x) && y.type == 1)
+                                            {
+                                                classIds.Add(z.id);
+                                            }
+                                        });
+                                    });
+                                    tmdActivities.Add(new StuActivity
+                                    {
+                                        pk = "Activity",
+                                        id = art.id,
+                                        code = $"Activity-{x}",
+                                        type = "Art",
+                                        name = art.name,
+                                        startTime = art.startTime,
+                                        endTime = art.endTime,
+                                        scode = art.code,
+                                        scope = art.scope,
+                                        school = art.school,
+                                        creatorId = art.creatorId,
+                                        subjects = sub,
+                                        blob = null,
+                                        owner = art.owner,
+                                        createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
+                                        taskStatus = -1,
+                                        classIds = classIds.ToList()
+                                    });
+                                });
+                            }
+                            if (addStudentsCls.IsNotEmpty())
+                            {
+                                addStudentsCls.ForEach(x =>
+                                {
+                                    HashSet<string> classIds = new HashSet<string>();
+                                    classLists.ForEach(z => {
+                                        z.members.ForEach(y => {
+                                            if (y.id.Equals(x.id) && y.code.Equals(art.school) && y.type == 2)
+                                            {
+                                                classIds.Add(z.id);
+                                            }
+                                        });
+                                    });
+                                    stuActivities.Add(new StuActivity
+                                    {
+                                        pk = "Activity",
+                                        id = art.id,
+                                        code = $"Activity-{x.code.Replace("Base-", "")}-{x.id}",
+                                        type = "Atr",
+                                        name = art.name,
+                                        startTime = art.startTime,
+                                        endTime = art.endTime,
+                                        scode = art.code,
+                                        scope = art.scope,
+                                        school = art.school,
+                                        creatorId = art.creatorId,
+                                        subjects = sub,
+                                        blob = null,
+                                        owner = art.owner,
+                                        createTime = DateTimeOffset.UtcNow.ToUnixTimeMilliseconds(),
+                                        taskStatus = -1,
+                                        classIds = classIds.ToList()
+                                    });
+                                });
+                            }
+                            await ActivityService.SaveStuActivity(client, _dingDing, stuActivities, tmdActivities, tchActivities);
+                            //await StatisticsService.SendServiceBus(list, _configuration, _serviceBus, client);
+                            
+                            var messageVoteEnd = new ServiceBusMessage(new { id = tdata.id, progress = "finish", code = tdata.code }.ToJsonString());
+                            messageVoteEnd.ApplicationProperties.Add("name", "Art");
+                            if (voteRecords.Count > 0)
+                            {
+                                long end = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVoteEnd, DateTimeOffset.FromUnixTimeMilliseconds(tdata.endTime));
+                                try
+                                {
+                                    await _serviceBus.GetServiceBusClient().CancelMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), voteRecords[0].sequenceNumber);
+                                }
+                                catch (Exception)
+                                {
+                                }
+                                voteRecords[0].sequenceNumber = end;
+                                await table.SaveOrUpdate<ChangeRecord>(voteRecords[0]);
+                            }
+                            else
+                            {
+                                long end = await _serviceBus.GetServiceBusClient().SendScheduleMessageAsync(Environment.GetEnvironmentVariable("Azure:ServiceBus:ActiveTask"), messageVoteEnd, DateTimeOffset.FromUnixTimeMilliseconds(tdata.endTime));
+                                ChangeRecord changeRecord = new()
+                                {
+                                    RowKey = tdata.id,
+                                    PartitionKey = PartitionKey,
+                                    sequenceNumber = end,
+                                    msgId = messageVoteEnd.MessageId
+                                };
+                                await table.Save<ChangeRecord>(changeRecord);
+                            }
+
+                            break;
+                        case "finish":
+
+                           
+                            
+                            break;
+                    }
+                }
+            }
+            catch (CosmosException e)
+            {
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-CosmosDB异常{e.Message}\n{e.StackTrace}\n{e.Status}", GroupNames.醍摩豆服務運維群組);
+            }
+            catch (Exception ex)
+            {
+                await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}艺术评价异常{ex.Message}\n{ex.StackTrace}", GroupNames.醍摩豆服務運維群組);
+            }
+
+        }
+    }
+}

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

@@ -207,7 +207,7 @@ namespace TEAMModelOS.FunctionV4
                                 }
                                 }
                             }
                             }
                             //处理教研活动结束统计账户信息
                             //处理教研活动结束统计账户信息
-                            List<FMember> idList = await GroupListService.GetFinishMemberInfo(_coreAPIHttpService, client, _dingDing, study.school, study.classes, study.stuLists, study.stuLists, gls);
+                            List<FMember> idList = await GroupListService.GetFinishMemberInfo(_coreAPIHttpService, client, _dingDing, study.school, study.classes, study.stuLists, study.tchLists, gls);
                             study.staffIds = idList;
                             study.staffIds = idList;
                             await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync<Study>(study, study.id, new Azure.Cosmos.PartitionKey(study.code));
                             await client.GetContainer("TEAMModelOS", "Common").ReplaceItemAsync<Study>(study, study.id, new Azure.Cosmos.PartitionKey(study.code));
 
 

+ 9 - 6
TEAMModelOS.FunctionV4/CosmosDB/TriggerSurvey.cs

@@ -131,17 +131,20 @@ namespace TEAMModelOS.FunctionV4
                             List<StuActivity> tchActivities = new List<StuActivity>();
                             List<StuActivity> tchActivities = new List<StuActivity>();
 
 
                             List<string> sub = new();
                             List<string> sub = new();
-                            if (survey.targets.Count > 0)
-                            {
-                                foreach (var course in survey.targets)
+                            if (survey.tchLists.Count == 0) {
+                                if (survey.targets.Count > 0)
                                 {
                                 {
-                                    var info = course.ToObject<List<string>>();
-                                    if (info.Count > 1)
+                                    foreach (var course in survey.targets)
                                     {
                                     {
-                                        sub.Add(info[0]);
+                                        var info = course.ToObject<List<string>>();
+                                        if (info.Count > 1)
+                                        {
+                                            sub.Add(info[0]);
+                                        }
                                     }
                                     }
                                 }
                                 }
                             }
                             }
+                                
                             if (addTmdidsCls.IsNotEmpty())
                             if (addTmdidsCls.IsNotEmpty())
                             {
                             {
                                 addTmdidsCls.ForEach(x =>
                                 addTmdidsCls.ForEach(x =>

+ 10 - 5
TEAMModelOS.FunctionV4/CosmosDB/TriggerVote.cs

@@ -17,6 +17,7 @@ using TEAMModelOS.SDK.Models.Cosmos.Common.Inner;
 using TEAMModelOS.SDK.Models.Service;
 using TEAMModelOS.SDK.Models.Service;
 using HTEXLib.COMM.Helpers;
 using HTEXLib.COMM.Helpers;
 using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.Configuration;
+using DocumentFormat.OpenXml.Office2013.Excel;
 
 
 namespace TEAMModelOS.FunctionV4
 namespace TEAMModelOS.FunctionV4
 {
 {
@@ -131,17 +132,21 @@ namespace TEAMModelOS.FunctionV4
                             List<StuActivity> tmdActivities = new List<StuActivity>();
                             List<StuActivity> tmdActivities = new List<StuActivity>();
                             List<StuActivity> tchActivities = new List<StuActivity>();
                             List<StuActivity> tchActivities = new List<StuActivity>();
                             List<string> sub = new();
                             List<string> sub = new();
-                            if (vote.targets.Count > 0)
+                            if (vote.tchLists.Count == 0)
                             {
                             {
-                                foreach (var course in vote.targets)
+                                if (vote.targets.Count > 0)
                                 {
                                 {
-                                    var info = course.ToObject<List<string>>();
-                                    if (info.Count > 1)
+                                    foreach (var course in vote.targets)
                                     {
                                     {
-                                        sub.Add(info[0]);
+                                        var info = course.ToObject<List<string>>();
+                                        if (info.Count > 1)
+                                        {
+                                            sub.Add(info[0]);
+                                        }
                                     }
                                     }
                                 }
                                 }
                             }
                             }
+                                
                             if (tmds.IsNotEmpty())
                             if (tmds.IsNotEmpty())
                             {
                             {
                                 tmds.ForEach(x =>
                                 tmds.ForEach(x =>

+ 6 - 0
TEAMModelOS.SDK/Context/Constant/Constant.cs

@@ -22,6 +22,12 @@ namespace TEAMModelOS.SDK.DI
         public static readonly int private_lesson_limit = 50;
         public static readonly int private_lesson_limit = 50;
         public static readonly int private_lesson_expire = 7;
         public static readonly int private_lesson_expire = 7;
         public static readonly int school_lesson_expire = 7;
         public static readonly int school_lesson_expire = 7;
+
+        public static readonly string NotifyType_IES5_Management = "IES5_Management";
+        public static readonly string NotifyType_IES5_Course = "IES5_Course";
+        public static readonly string NotifyType_IES5_Task = "IES5_Task";
+        public static readonly string NotifyType_IES5_Contect = "IES5_Contect";
+
         public static readonly Dictionary<string, string> DefaultPeriod = new Dictionary<string, string> { 
         public static readonly Dictionary<string, string> DefaultPeriod = new Dictionary<string, string> { 
             {"pre" ,"学前"},
             {"pre" ,"学前"},
             {"primary","小学"},
             {"primary","小学"},

+ 54 - 27
TEAMModelOS.SDK/DI/CoreAPI/CoreAPIHttpService.cs

@@ -4,6 +4,7 @@ using Microsoft.Extensions.Configuration;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.DependencyInjection;
 using Microsoft.Extensions.Hosting;
 using Microsoft.Extensions.Hosting;
 using Microsoft.Extensions.Options;
 using Microsoft.Extensions.Options;
+using OpenXmlPowerTools;
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
 using System.Dynamic;
 using System.Dynamic;
@@ -12,10 +13,13 @@ using System.Linq;
 using System.Net;
 using System.Net;
 using System.Net.Http;
 using System.Net.Http;
 using System.Net.Http.Json;
 using System.Net.Http.Json;
+using System.Security.Policy;
 using System.Text;
 using System.Text;
 using System.Text.Json;
 using System.Text.Json;
 using System.Threading.Tasks;
 using System.Threading.Tasks;
+using TEAMModelOS.Models;
 using TEAMModelOS.SDK.DI;
 using TEAMModelOS.SDK.DI;
+using TEAMModelOS.SDK.DI.CoreAPI;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Models;
 using TEAMModelOS.SDK.Models;
 
 
@@ -50,12 +54,19 @@ namespace TEAMModelOS.SDK
         private SnowflakeId _snowflakeId;
         private SnowflakeId _snowflakeId;
         private readonly HttpClient _httpClient;
         private readonly HttpClient _httpClient;
         public readonly IOptionsMonitor<CoreAPIHttpServiceOptions> options;
         public readonly IOptionsMonitor<CoreAPIHttpServiceOptions> options;
-        public CoreAPIHttpService(HttpClient httpClient, IOptionsMonitor<CoreAPIHttpServiceOptions> optionsMonitor, IWebHostEnvironment environment,SnowflakeId snowflakeId)
+        private readonly IConfiguration _configuration;
+        private readonly DI.DingDing _dingDing;
+        public readonly Option _option;
+        public CoreAPIHttpService(IOptionsSnapshot<Option> option, DingDing dingDing,IConfiguration configuration,HttpClient httpClient, IOptionsMonitor<CoreAPIHttpServiceOptions> optionsMonitor, IWebHostEnvironment environment,SnowflakeId snowflakeId)
         {
         {
             _httpClient = httpClient;
             _httpClient = httpClient;
             options = optionsMonitor;
             options = optionsMonitor;
             _environment = environment;
             _environment = environment;
             _snowflakeId= snowflakeId;
             _snowflakeId= snowflakeId;
+            _option = option?.Value;
+            _configuration = configuration;
+            _dingDing = dingDing;
+
         }
         }
         /*
         /*
         hubName	string	Optional	指定要傳送到哪個訊息中樞,若沒給則不傳送端外通知,只會發送端內通知。(目前只有"hita"及"hita5"能使用)
         hubName	string	Optional	指定要傳送到哪個訊息中樞,若沒給則不傳送端外通知,只會發送端內通知。(目前只有"hita"及"hita5"能使用)
@@ -97,61 +108,77 @@ namespace TEAMModelOS.SDK
         /// <param name="_configuration"></param>
         /// <param name="_configuration"></param>
         /// <param name="_dingDing"></param>
         /// <param name="_dingDing"></param>
         /// <returns></returns>
         /// <returns></returns>
-        public (HttpStatusCode code, string content) PushNotify(List<IdNameCode> toTeachers ,  string notifyCode,Dictionary<string, object> replaceData,  string location, IConfiguration _configuration, DI.DingDing _dingDing) {
+        public   void PushNotify(List<IdNameCode> toTeachers ,  string notifyCode,string notifyType,Dictionary<string, object> replaceData) {
             /*
             /*
+             * IES5_Management  shift-assist_school  DelBeforeCopyAbility-mark_start  copyAbility-mark_finish  copyAbility-mark_start 
+             *                  transfer-admin_school invite-join_school invite_school  request_school request-join_school remove_school  scan-join_school
+             * IES5_Course      submitanswer_homework   scan-join_groupList    expire-school_lessonRecord
+             * IES5_Task        scoring-mark_school scoring-arb_school scoring-err_school 
+             * IES5_Contect     coedit_syllabus  share_syllabus 
              {
              {
                 "hubName":"hita5",
                 "hubName":"hita5",
                 "sender":"ies5",
                 "sender":"ies5",
-                "tags":["1595321354_ies5"]
+                "tags":["1595321354_IES5_Management"]
                 "title":"",
                 "title":"",
                 "body":"",
                 "body":"",
                 "eventId":"",
                 "eventId":"",
                 "eventName":"",
                 "eventName":"",
-                "data":""
+                "data":""action":{"type":"click\link","tokenbindtype":1,"url":"http://xxxx"}"
             }
             }
             */
             */
-            string lang = location.Contains("China") ? "zh-cn" : "en-us";
+            string lang = _option.Location.Contains("China") ? "zh-cn" : "en-us";
             toTeachers.FindAll(x => string.IsNullOrWhiteSpace(x.code)||(!x.code.Equals("zh-cn")&& !x.code.Equals("zh-tw")&& !x.code.Equals("en-us"))).ForEach(x => { x.code = lang; });
             toTeachers.FindAll(x => string.IsNullOrWhiteSpace(x.code)||(!x.code.Equals("zh-cn")&& !x.code.Equals("zh-tw")&& !x.code.Equals("en-us"))).ForEach(x => { x.code = lang; });
             var groups = toTeachers.GroupBy(x => x.code).Select(x => new { x.Key, list = x.ToList() });
             var groups = toTeachers.GroupBy(x => x.code).Select(x => new { x.Key, list = x.ToList() });
-          
-            foreach(var group in groups)
+            var clientID = _configuration.GetValue<string>("HaBookAuth:CoreService:clientID");
+            var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
+            var url = _configuration.GetValue<string>("HaBookAuth:CoreAPI");
+            var token = CoreTokenExtensions.CreateAccessToken(clientID, clientSecret,_option.Location).Result;
+            _httpClient.DefaultRequestHeaders.Add("Authorization", $"Bearer {token.AccessToken}");
+            foreach (var group in groups)
             {
             {
-                string path = $"{_environment.ContentRootPath}/JsonFile/Core/Lang/{group.Key}.json";
+                string path = $"{_environment.ContentRootPath}/Lang/{group.Key}.json";
                 var sampleJson = File.ReadAllBytes(path).AsSpan();
                 var sampleJson = File.ReadAllBytes(path).AsSpan();
                 Utf8JsonReader reader = new Utf8JsonReader(sampleJson);
                 Utf8JsonReader reader = new Utf8JsonReader(sampleJson);
                 if (JsonDocument.TryParseValue(ref reader, out JsonDocument jsonDoc) && jsonDoc.RootElement.TryGetProperty(notifyCode, out JsonElement json )) {
                 if (JsonDocument.TryParseValue(ref reader, out JsonDocument jsonDoc) && jsonDoc.RootElement.TryGetProperty(notifyCode, out JsonElement json )) {
                     List<string> msgs = json.ToObject<List<string>>();
                     List<string> msgs = json.ToObject<List<string>>();
                     if (msgs.IsNotEmpty()) {
                     if (msgs.IsNotEmpty()) {
-                        var tags= group.list.Select(x => $"{x.id}_ies5");
-                        dynamic notifyData = new ExpandoObject();
+                        var tags= group.list.Select(x => $"{x.id}_{notifyType}");
+                        NotifyData notifyData = new NotifyData
+                        {
+                            hubName = "hita5",
+                            sender = "ies5",
+                            tags = tags.ToList(),
+                            title = msgs[0],
+                            eventId = $"{notifyCode}-{_snowflakeId.NextId()}",
+                            eventName = $"{msgs[0]}",
+                            data = new { value = replaceData }.ToJsonString()
+                        };
                         if (msgs.Count == 1)
                         if (msgs.Count == 1)
                         {
                         {
-                            notifyData.hubName = "hita5";
-                            notifyData.sender = "ies5";
-                            notifyData.tags = tags;
-                            notifyData.title = msgs[0];
                             notifyData.body = msgs[0];
                             notifyData.body = msgs[0];
-                            notifyData.eventId = $"{notifyCode}-{_snowflakeId.NextId()}";
-                            notifyData.eventName = $"{msgs[0]}";
-                            notifyData.data = replaceData;
                         }
                         }
                         else
                         else
                         {
                         {
-                            notifyData.hubName = "hita5";
-                            notifyData.sender = "ies5";
-                            notifyData.tags = tags;
-                            notifyData.title = msgs[0];
-                            notifyData.body =replaceData.Keys.Select(x => msgs[1].Replace("{"+x+"}", $"{replaceData[x]}"));
-                            notifyData.eventId = $"{notifyCode}-{_snowflakeId.NextId()}";
-                            notifyData.eventName = $"{msgs[0]}";
-                            notifyData.data = replaceData;
+                            replaceData.Keys.ToList().ForEach(x => {
+                                msgs[1]=  msgs[1].Replace("{" + x + "}", $"{replaceData[x]}");
+                            });
+                            notifyData.body = msgs[1];
                         }
                         }
+                        _ = _httpClient.PostAsJsonAsync(url, notifyData);
                     }
                     }
                 }
                 }
             }
             }
-            return (HttpStatusCode.BadRequest, null);
         }
         }
-
+        public class NotifyData { 
+            public string hubName { get; set; }
+            public string sender { get; set; }
+            public List<string> tags { get; set; } = new List<string>();
+            public string title { get; set; }
+            public string body { get; set; }
+            public string eventId { get; set; }
+            public string eventName { get; set; }
+            public string data { get; set; }
+        }
         /// <summary>
         /// <summary>
         ///  发送短信验证码
         ///  发送短信验证码
         /// </summary>
         /// </summary>

+ 5 - 0
TEAMModelOS.SDK/Models/Cosmos/BI/DingDingUserInfo.cs

@@ -123,5 +123,10 @@ namespace TEAMModelOS.SDK.Models.Cosmos.BI
         /// 学校列表
         /// 学校列表
         /// </summary>
         /// </summary>
         public string schoolIds { get; set; }
         public string schoolIds { get; set; }
+
+        /// <summary>
+        /// 是否禁用   0 禁用   1启用
+        /// </summary>
+        public long isDisable { get; set; } = 1;
     }
     }
 }
 }

+ 18 - 7
TEAMModelOS/Controllers/Teacher/InitController.cs

@@ -243,7 +243,8 @@ namespace TEAMModelOS.Controllers
                                     from = $"ies5:{_option.Location}:{school}",
                                     from = $"ies5:{_option.Location}:{school}",
                                     to = new List<string> { $"{_targetTecher}" },
                                     to = new List<string> { $"{_targetTecher}" },
                                     label = $"{code}_school",
                                     label = $"{code}_school",
-                                    body = new {
+                                    body = new
+                                    {
                                         location = _option.Location,
                                         location = _option.Location,
                                         biz = code,
                                         biz = code,
                                         tmdid = userid,
                                         tmdid = userid,
@@ -264,6 +265,9 @@ namespace TEAMModelOS.Controllers
                                     var location = _option.Location;
                                     var location = _option.Location;
                                     await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
                                     await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
                                 }
                                 }
+                                Teacher targetTeacher = await client.GetContainer(Constant.TEAMModelOS, Constant.Teacher).ReadItemAsync<Teacher>($"{_targetTecher}", new PartitionKey($"Base"));
+                                _coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id= targetTeacher.id,name= targetTeacher.name,code=targetTeacher.lang} }, "transfer-admin_school", Constant.NotifyType_IES5_Management,
+                                    new Dictionary<string, object> { { "tmdname", name },{ "schooName", schoolBase.name } });
                                 _ = _azureStorage.SaveLog("transfer-admin-role", new { request, userid, name, school, schoolName = schoolBase.name, targetTecher = _targetTecher, }.ToJsonString(), bizId: $"{userid}-{schoolBase.id}-{_targetTecher}", httpContext: HttpContext, dingDing: _dingDing, scope: "school");
                                 _ = _azureStorage.SaveLog("transfer-admin-role", new { request, userid, name, school, schoolName = schoolBase.name, targetTecher = _targetTecher, }.ToJsonString(), bizId: $"{userid}-{schoolBase.id}-{_targetTecher}", httpContext: HttpContext, dingDing: _dingDing, scope: "school");
                                 return Ok(new { status = 1 });
                                 return Ok(new { status = 1 });
                             }
                             }
@@ -1138,13 +1142,14 @@ namespace TEAMModelOS.Controllers
                     {
                     {
                         teachers.Add(item);
                         teachers.Add(item);
                     }
                     }
+                    string code = grant_type.GetString();
+                    if (grant_type.GetString().Equals("join"))
+                    {
+                        code = "invite-join";
+                    }
                     if (teachers.IsNotEmpty())
                     if (teachers.IsNotEmpty())
                     {
                     {
-                        string code = grant_type.GetString();
-                        if (grant_type.GetString().Equals("join"))
-                        {
-                            code = "invite-join";
-                        }
+
                         notification = new Notification
                         notification = new Notification
                         {
                         {
                             hubName = "hita",
                             hubName = "hita",
@@ -1163,8 +1168,14 @@ namespace TEAMModelOS.Controllers
                         var clientID = _configuration.GetValue<string>("HaBookAuth:CoreService:clientID");
                         var clientID = _configuration.GetValue<string>("HaBookAuth:CoreService:clientID");
                         var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
                         var clientSecret = _configuration.GetValue<string>("HaBookAuth:CoreService:clientSecret");
                         var location = _option.Location;
                         var location = _option.Location;
-                        var code = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
+                        var val = await _notificationService.SendNotification(clientID, clientSecret, location, url, notification);
+                    }
+                    if (teachers.IsNotEmpty()) {
+                        //string sql = $"select c.id, c.name ,c.lang as code from c where c.id in ({string.Join(",",teachers.Select(x=>$"'{x.id}'"))})";
+                        //_coreAPIHttpService.PushNotify(new List<IdNameCode> { new IdNameCode { id = targetTeacher.id, name = targetTeacher.name, code = targetTeacher.lang } }, $"{code}_school", Constant.NotifyType_IES5_Management,
+                        //          new Dictionary<string, object> { { "tmdname", name }, { "schooName", schoolBase.name } });
                     }
                     }
+                      
                     return Ok(new { stauts = 1 });
                     return Ok(new { stauts = 1 });
                 }
                 }
             }
             }

+ 0 - 19
TEAMModelOS/JsonFile/Core/Lang/en-us.json

@@ -1,19 +0,0 @@
-{
-  //start 通知类语言包
-  "request_school": [ "申请加入学校通知", "" ], // 管理员收到他人申请加入的通知
-  "invite_school": [ "邀请加入学校通知", "" ], // 你收到学校邀请你的通知
-  "remove_school": [ "从学校移除通知", "" ], // 学校将你移除的通知
-  "request-join_school": [ "同意申请加入学校通知", "" ], // 学校同意你的加入请求
-  "invite-join_school": [ "同意邀请加入学校通知", "" ], // 某人已同意你对他的邀请
-  "coedit_syllabus": [ "邀请共编课纲通知", "" ], // 邀请课纲共编的通知
-  "share_syllabus": [ "课纲分享接收通知", "" ], // 个人课纲分享的通知
-  "transfer-admin_school": [ "管理员移交通知", "" ], // 管理员转移的通知
-  "scoring-arb_school": [ "仲裁卷阅卷任务通知", "" ], //仲裁卷阅卷任务分配通知
-  "scoring-err_school": [ "异常卷阅卷任务通知", "" ], //异常卷阅卷任务分配通知
-  "scoring-mark_school": [ "普通阅卷任务通知", "" ], //普通阅卷任务分配通知
-  "scan-join_groupList": [ "扫码加入名单通知", "" ], //扫码加入名单通知
-  "scan-join_school": [ "扫码加入学校通知", "" ], // 扫码加入学校通知
-  "submitanswer_homework": [ "作业提交通知", "" ], //作业提交通知
-  "expire_lessonRecord": [ "课例到期通知", "" ] //课例过期通知
-  //end  通知类语言包
-}

+ 0 - 19
TEAMModelOS/JsonFile/Core/Lang/zh-tw.json

@@ -1,19 +0,0 @@
-{
-  //start 通知类语言包
-  "request_school": [ "申请加入学校通知", "" ], // 管理员收到他人申请加入的通知
-  "invite_school": [ "邀请加入学校通知", "" ], // 你收到学校邀请你的通知
-  "remove_school": [ "从学校移除通知", "" ], // 学校将你移除的通知
-  "request-join_school": [ "同意申请加入学校通知", "" ], // 学校同意你的加入请求
-  "invite-join_school": [ "同意邀请加入学校通知", "" ], // 某人已同意你对他的邀请
-  "coedit_syllabus": [ "邀请共编课纲通知", "" ], // 邀请课纲共编的通知
-  "share_syllabus": [ "课纲分享接收通知", "" ], // 个人课纲分享的通知
-  "transfer-admin_school": [ "管理员移交通知", "" ], // 管理员转移的通知
-  "scoring-arb_school": [ "仲裁卷阅卷任务通知", "" ], //仲裁卷阅卷任务分配通知
-  "scoring-err_school": [ "异常卷阅卷任务通知", "" ], //异常卷阅卷任务分配通知
-  "scoring-mark_school": [ "普通阅卷任务通知", "" ], //普通阅卷任务分配通知
-  "scan-join_groupList": [ "扫码加入名单通知", "" ], //扫码加入名单通知
-  "scan-join_school": [ "扫码加入学校通知", "" ], // 扫码加入学校通知
-  "submitanswer_homework": [ "作业提交通知", "" ], //作业提交通知
-  "expire_lessonRecord": [ "课例到期通知", "" ] //课例过期通知
-  //end  通知类语言包
-}

+ 20 - 0
TEAMModelOS/Lang/en-us.json

@@ -0,0 +1,20 @@
+{
+  //start 通知類語言包
+  //通知類型編碼 ["通知標題 title","通知內容 body"]
+  "request_school": [ "Apply to join school", "{tmdname}({tmdid}) applying to join {schooName}." ], // 管理員收到他人申請加入的通知
+  "invite_school": [ "Invite to join school", "{schooName} has invited you to join." ], // 你收到學校邀請你的通知
+  "remove_school": [ "Remove from school", "{schooName} removed you from the school's teacher list." ], // 學校將你移除的通知
+  "request-join_school": [ "Agree to join school", "{schooName} has agreed you to join the school." ], // 學校同意你的加入請求
+  "invite-join_school": [ "Accepting join school invitation", "{tmdname} has accepted an invitation to join {schooName}." ], // 某人已同意你對他的邀請
+  "coedit_syllabus": [ "Invite to co-edit syllabus", "{tmdname} invites you to co-edit school-based syllabus, Volume name: {volumeName}, Node name: {syllabusName}." ], // 邀請課綱共編的通知
+  "share_syllabus": [ "Receive shared syllabus", "{tmdname} shared personal syllabus with you, Volume name: {volumeName}, Node name: {syllabusName}." ], // 個人課綱分享的通知
+  "transfer-admin_school": [ "Transfer administrator", "{tmdname} will transfer the administrator of {schooName} to you." ], // 管理員轉移的通知
+  "scoring-arb_school": [ "Assign arbitration exam scoring task", "{tmdname} of {schoolname} has assign you an arbitration exam scoring task." ], //仲裁卷閱卷任務分配通知
+  "scoring-err_school": [ "Assign abnormal exam paper grading task", "{tmdname} of {schoolname} has assign you an abnormal exam paper grading task." ], //異常卷閱卷任務分配通知
+  "scoring-mark_school": [ "Assign exam paper grading task", "{tmdname} of {schoolname} has assign you an exam paper grading task." ], //普通閱卷任務分配通知
+  "scan-join_groupList": [ "Join course notice", "{tmdname} join the {groupListName} course via QRcode scanning" ], //掃碼加入名單通知
+  "scan-join_school": [ "Join school notice", "{tmdname} join school, {schoolName}, via QRcode scanning" ], // 掃碼加入學校通知
+  "submitanswer_homework": [ "Homework submission notice", "{tmdname} has submitted a homework({homeworkName})" ], //作業提交通知
+  "expire-school_lessonRecord": [ "Lesson record expiration notice", "Your lesson record, {lessonRecordName}, on {schoolname} will expire at {expireTime}" ] //課堂記錄過期通知
+  //end  通知類語言包
+}

TEAMModelOS/JsonFile/Core/Lang/zh-cn.json → TEAMModelOS/Lang/zh-cn.json


+ 20 - 0
TEAMModelOS/Lang/zh-tw.json

@@ -0,0 +1,20 @@
+{
+  //start 通知类语言包
+  //通知类型编码 ["通知标题 title","通知内容 body"]
+  "request_school": [ "申请加入学校通知", "{tmdname}({tmdid})申请加入{schooName}。" ], // 管理员收到他人申请加入的通知
+  "invite_school": [ "邀请加入学校通知", "{schooName}邀请您加入学校。" ], // 你收到学校邀请你的通知
+  "remove_school": [ "从学校移除通知", "{schooName}将您从学校教师名单中移除。" ], // 学校将你移除的通知
+  "request-join_school": [ "同意申请加入学校通知", "{schooName}已同意您申请加入学校。" ], // 学校同意你的加入请求
+  "invite-join_school": [ "同意邀请加入学校通知", "{tmdname}已接受加入{schooName}的邀请。" ], // 某人已同意你对他的邀请
+  "coedit_syllabus": [ "邀请共编课纲通知", "{tmdname}邀请你参与共编校本课纲,册别名称:{volumeName},课纲节点名称:{syllabusName}。" ], // 邀请课纲共编的通知
+  "share_syllabus": [ "课纲分享接收通知", "{tmdname}向您分享了个人课纲,册别名称:{volumeName},课纲节点名称:{syllabusName}。" ], // 个人课纲分享的通知
+  "transfer-admin_school": [ "管理员移交通知", "{tmdname}将{schooName}的管理员移交给您。" ], // 管理员转移的通知
+  "scoring-arb_school": [ "仲裁卷阅卷任务通知", "{schoolname}的{tmdname}向您发送了仲裁卷阅卷任务。" ], //仲裁卷阅卷任务分配通知
+  "scoring-err_school": [ "异常卷阅卷任务通知", "{schoolname}的{tmdname}向您发送了异常卷阅卷任务。" ], //异常卷阅卷任务分配通知
+  "scoring-mark_school": [ "普通阅卷任务通知", "{schoolname}的{tmdname}向您发送了普通卷阅卷任务。" ], //普通阅卷任务分配通知
+  "scan-join_groupList": [ "扫码加入名单通知", "{tmdname}扫码加入名单,名单:{groupListName}" ], //扫码加入名单通知
+  "scan-join_school": [ "扫码加入学校通知", "{tmdname}扫码加入学校,学校名称:{schoolName}" ], // 扫码加入学校通知
+  "submitanswer_homework": [ "作业提交通知", "{tmdname}已提交作业,作业名称({homeworkName})" ], //作业提交通知
+  "expire-school_lessonRecord": [ "课例到期通知", "您在{schoolname}的课例将在{expireTime}到期,课例名称:{lessonRecordName}" ] //课例过期通知
+  //end  通知类语言包
+}