CrazyIter_Bin 5 months ago
parent
commit
d396937b19

+ 0 - 65
TEAMModelOS.Extension/IES.Exam/IES.ExamServer/Models/Activity.cs

@@ -1,65 +0,0 @@
-using System.Text.Json;
-
-namespace IES.ExamServer.Models
-{
-    public class Activity
-    {
-        public string id { get; set; }
-        public string name { get; set; }
-        /// <summary>
-        /// 类型: Exam 普通评测, Art艺术评测
-        /// </summary>
-        public string  type { get; set; }
-        public string code { get; set; }
-        /// <summary>
-        /// 源数据的发布层级 类型 school  teacher
-        /// </summary>
-        public string owner { get; set; }
-
-        //评测模式
-        public string source { get; set; }
-        public long startTime { get; set; }
-        public long endTime { get; set; }
-        public string scope { get; set; }
-        public string school { get; set; }
-        public string creatorId { get; set; }
-        public string scode { get; set; }
-        public Custom examType { get; set; } = new Custom();
-
-        public List<ExamSubject> subjects { get; set; } = new List<ExamSubject>();
-        //返回科目内容
-        public List<string> subs { get; set; } = new List<string>();
-        //返回字段
-        public List<string> classIds { get; set; } = new List<string>();
-        public List<string> classes { get; set; } = new List<string>();
-        public List<string> stuLists { get; set; } = new List<string>();
-        public List<string> tchLists { get; set; } = new List<string>();
-        public List<JsonElement> targets { get; set; } = new List<JsonElement>();
-        public long createTime { get; set; } 
-        public Dictionary<string, JsonElement> ext { get; set; } = new Dictionary<string, JsonElement>();
-        /// 评分状态,0,未评分, 1已评分
-        public int sStatus { get; set; } = 0;
-        //评测 纸本1或者书面问答0
-        public int qamode { get; set; } = 0;
-        //标记作业活动是否比交
-        public bool mustSubmit { get; set; } = false;
-        //标记问卷是否重复提交 0 否 1 是
-        public int isSub { get; set; } = 0;
-        /// <summary>
-        /// 任务完成状态,-1 未参与,0,未完成, 1已完成
-        /// </summary>
-        public int taskStatus { get; set; } = -1;
-        public string recordUrl { get; set; }
-    }
-    public class Custom
-    {
-        public string id { get; set; }
-        public string name { get; set; }
-    }
-    public class ExamSubject
-    {
-        public string id { get; set; }
-        public string name { get; set; }
-        public int classCount { get; set; }
-    }
-}

+ 12 - 0
TEAMModelOS.Extension/IES.ExamLib/IES.ExamLib.csproj

@@ -0,0 +1,12 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netstandard2.1</TargetFramework>
+    <Nullable>enable</Nullable>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
+  </ItemGroup>
+
+</Project>

+ 158 - 0
TEAMModelOS.Extension/IES.ExamLib/Models/EvaluationCommon.cs

@@ -0,0 +1,158 @@
+using System.Collections.Generic;
+
+namespace IES.ExamServer.Models
+{
+
+    public class EvaluationCommon
+    {
+        /// <summary>
+        /// 评测id
+        /// </summary>
+        public string? id { get; set; }
+        /// <summary>
+        /// 区级活动的id
+        /// </summary>
+        public string? pId { get; set; }
+        /// <summary>
+        /// 评测名称
+        /// </summary>
+        public string? name { get; set; }
+        /// <summary>
+        /// 类型: Exam 普通评测, Art艺术评测
+        /// </summary>
+        public string?  type { get; set; }
+        /// <summary>
+        /// 分区键
+        /// </summary>
+        public string? code { get; set; }
+        /// <summary>
+        /// 源数据的发布层级 类型 区级area  校级 school 教师个人 teacher
+        /// </summary>
+        public string? owner { get; set; }
+        /// <summary>
+        /// 开始时间
+        /// </summary>
+        public long startTime { get; set; }
+        /// <summary>
+        /// 结束时间
+        /// </summary>
+        public long endTime { get; set; }
+        /// <summary>
+        /// 数据范围
+        /// </summary>
+        public string? scope { get; set; }
+        /// <summary>
+        /// 学校
+        /// </summary>
+        public string? school { get; set; }
+        /// <summary>
+        /// 源code
+        /// </summary>
+        public string? scode { get; set; }
+        /// <summary>
+        /// 科目
+        /// </summary>
+        public List<ExamSubject> subjects { get; set; } = new List<ExamSubject>();
+        /// <summary>
+        /// 名单
+        /// </summary>
+        public List<string> classIds { get; set; } = new List<string>();
+        /// <summary>
+        /// 创建时间
+        /// </summary>
+        public long createTime { get; set; }
+        /// <summary>
+        /// 创建人
+        /// </summary>
+        public string? creatorId { get; set; }
+        /// <summary>
+        /// 记录地址
+        /// </summary>
+        public string? recordUrl { get; set; }
+        /// <summary>
+        /// 开卷码
+        /// </summary>
+        public string? shortCode { get; set; }
+        /// <summary>
+        /// 临时密码
+        /// </summary>
+        public string? password {  get; set; }
+    }
+    public class ExamSubject
+    {
+        public string? examId { get; set; }
+        public string? id { get; set; }
+        public string? name { get; set; }
+    }
+    public class EvaluationExam 
+    {
+        /// <summary>
+        /// 评测的id
+        /// </summary>
+        public string? id { get; set; }
+        /// <summary>
+        /// 评测的科目id
+        /// </summary>
+        public string? subjectId { get; set; }
+        /// <summary>
+        /// 评测的科目名称
+        /// </summary>
+        public string? subjectName { get; set; }
+        /// <summary>
+        /// 评测的试卷列表
+        /// </summary>
+        public List<EvaluationPaper> papers { get; set; } = new List<EvaluationPaper>();
+        /// <summary>
+        /// 评测的班级列表
+        /// </summary>
+        public List<string> classes { get; set; } = new List<string>();
+        public string? owner { get; set; }
+        public string? name { get; set; }
+        public string? school { get; set; }
+        public string? scope {  get; set; }
+        public string? period { get; set; }
+        public int stuCount {  get; set; }
+        public long createTime { get; set; }
+        public long updateTime { get; set; }
+        public long startTime { get; set; }
+        public long endTime { get; set; }
+        public long year { get; set; }
+    }
+    public class EvaluationPaper 
+    {
+        /// <summary>
+        /// 试卷id
+        /// </summary>
+        public string? id {  get; set; }
+        /// <summary>
+        /// 试卷名称
+        /// </summary>
+        public string? name {  get; set; }
+        /// <summary>
+        /// 试卷所属科目
+        /// </summary>
+        public string? subjectId {  get; set; }
+        /// <summary>
+        /// 试卷文件地址
+        /// </summary>
+        public string? blob {  get; set; }
+        /// <summary>
+        /// 配分列表
+        /// </summary>
+        public List<double> point { get; set; } = new List<double>();
+        //public List<List<string>> answers { get; set; } = new List<List<string>>();  不显示答案
+        /// <summary>
+        /// 知识点列表
+        /// </summary>
+        public List<List<string>> knowledge { get; set; } = new List<List<string>>();
+        /// <summary>
+        /// 题型列表
+        /// </summary>
+        public List<string> type { get; set; } = new List<string>();
+        /// <summary>
+        /// 认知层次
+        /// </summary>
+        public List<int> field { get; set; } = new List<int>();
+    }
+
+}

+ 26 - 2
TEAMModelOS.Function/IESServiceBusTrigger.cs

@@ -2554,15 +2554,39 @@ namespace TEAMModelOS.Function
             var json = JsonDocument.Parse(message.Body);
             try
             {
+                var db = _azureCosmos.GetCosmosClient();
                 //await _dingDing.SendBotMsg($"IES5,{Environment.GetEnvironmentVariable("Option:Location")},Imei AF call\n{msg.ToJsonString()}", GroupNames.成都开发測試群組);
                 if (json.RootElement.TryGetProperty("channel", out JsonElement channel) &&
                 json.RootElement.TryGetProperty("userid", out JsonElement userid) &&
                 json.RootElement.TryGetProperty("school", out JsonElement school) &&
                 json.RootElement.TryGetProperty("stus", out JsonElement stus))
                 {
+                    try {
+                        List<string>? stuids = System.Text.Json.JsonSerializer.Deserialize<List<string>>(stus);
+                        if (stuids.IsNotEmpty())
+                        {
+                            string sqls = $"SELECT value c from c where c.channel='{channel.GetString()}' and c.school='{school.GetString()}' and  c.stuid not in ({string.Join(",", stuids!.Select(x => $"'{x}'"))}) ";
+                            var rs = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Student).GetList<Imei>(sqls, "Imei");
+                            if (rs.list.IsNotEmpty()) 
+                            {
+                                foreach (var imei in rs.list) 
+                                {
+                                    imei.channel=null;
+                                    imei.lessonId=null;
+                                    await db.GetContainer(Constant.TEAMModelOS, Constant.Student).ReplaceItemAsync<Imei>(imei, imei.id, new PartitionKey(imei.code));
+                                }
+                            }
+                            await _dingDing.SendBotMsg($"{_option.Location},清理占用频道号的电子学生证,清理成功,频道号{channel},清理人数{rs.list.Count()}", GroupNames.成都开发測試群組);
+                        }
+                    } catch (Exception ex)
+                    {
+                        await _dingDing.SendBotMsg($"{_option.Location},清理占用频道号的电子学生证,出现异常", GroupNames.成都开发測試群組);
+                    }
+
+
                     json.RootElement.TryGetProperty("imeiType", out JsonElement imeiType);
                     json.RootElement.TryGetProperty("lessonId", out JsonElement lessonId);
-                    var db = _azureCosmos.GetCosmosClient();
+                    
                     foreach (var stu in stus.EnumerateArray())
                     {
                         await foreach (var item in db.GetContainer(Constant.TEAMModelOS, Constant.Student).GetItemQueryStreamIteratorSql(
@@ -2592,7 +2616,7 @@ namespace TEAMModelOS.Function
                                         imei.imeiType = "tianbo";
                                     }
                                 }
-                                await db.GetContainer(Constant.TEAMModelOS, Constant.Student).ReplaceItemAsync<Imei>(imei, imei.id);
+                                await db.GetContainer(Constant.TEAMModelOS, Constant.Student).ReplaceItemAsync<Imei>(imei, imei.id,new PartitionKey(imei.code));
                             }
                         }
                     }

+ 21 - 3
TEAMModelOS.SDK/Models/Cosmos/Normal/ActivitySyncInfo.cs

@@ -4,18 +4,19 @@ using System.ComponentModel.DataAnnotations;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using TEAMModelOS.SDK.Models.Cosmos.Common;
 
 namespace TEAMModelOS.SDK.Models.Cosmos.Normal
 {
     /// <summary>
     /// 活动数据同步信息
     /// </summary>
-    public class ActivitySyncInfo : CosmosEntity
+    public class EvaluationSyncInfo : CosmosEntity
     {
         [Required(ErrorMessage = "活动id必须设置")]
         public string id { get; set; }
         //id =活动id
-        // code =ActivitySyncInfo
+        // code =EvaluationSyncInfo
         /// <summary>
         ///school 、private 
         /// </summary>
@@ -92,7 +93,7 @@ namespace TEAMModelOS.SDK.Models.Cosmos.Normal
     /// <summary>
     /// 活动客户端同步信息
     /// </summary>
-    public class ActivityClientSync : ClientDevice
+    public class EvaluationClientSync : ClientDevice
     {
         /// <summary>
         /// 活动数据包客户端更新时间戳
@@ -166,4 +167,21 @@ namespace TEAMModelOS.SDK.Models.Cosmos.Normal
         /// </summary>
         public long size { get; set; }
     }
+    /// <summary>
+    /// 普通评测或者艺术评测的主体信息
+    /// </summary>
+    public class EvaluationSource
+    {
+        public string id { get; set; }
+        /// <summary>
+        /// 类型 Art  Exam
+        /// </summary>
+        public string type { get; set; }
+        public ExamInfo exam { get; set; }
+        public ArtEvaluation art {  get; set; }
+      
+        public List<ExamInfo> artExams { get; set; }=new List<ExamInfo>();
+
+        public long updateTime { get; set; }
+    }
 }

+ 0 - 32
TEAMModelOS.SDK/Models/Service/ActivitySyncInfoService.cs

@@ -1,32 +0,0 @@
-using Microsoft.Azure.Cosmos;
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using TEAMModelOS.SDK.DI;
-
-namespace TEAMModelOS.SDK.Models.Service
-{
-    public sealed class ActivitySyncInfoService
-    {
-
-        /// <summary>
-        /// 活动数据打包
-        /// </summary>
-        /// <param name="id"></param>
-        /// <param name="scope"></param>
-        /// <param name="owner"></param>
-        /// <param name="type"></param>
-        /// <param name="azureCosmos"></param>
-        /// <param name="azureStorage"></param>
-        public static async Task PackageActivity( string id,string scope, string owner, string type, AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage)
-        {
-            var response = await azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).ReadItemStreamAsync(id, new PartitionKey("ActivitySyncInfo"));
-            if (response.IsSuccessStatusCode)
-            {
-
-            }
-        }
-    }
-}

+ 56 - 0
TEAMModelOS.SDK/Models/Service/EvaluationSyncInfoService.cs

@@ -0,0 +1,56 @@
+using Microsoft.Azure.Cosmos;
+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.Models.Cosmos.Normal;
+
+
+namespace TEAMModelOS.SDK.Models.Service
+{
+    public sealed class EvaluationSyncInfoService
+    {
+
+        /// <summary>
+        /// 活动数据打包
+        /// </summary>
+        /// <param name="id"></param>
+        /// <param name="scope"></param>
+        /// <param name="owner"></param>
+        /// <param name="type"></param>
+        /// <param name="azureCosmos"></param>
+        /// <param name="azureStorage"></param>
+        public static async Task PackageEvaluation( string id,string scope, string owner, string type, AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage)
+        {
+            EvaluationSyncInfo evaluationSyncInfo= null;
+            var responseEvaluationSyncInfo = await azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Normal).ReadItemStreamAsync(id, new PartitionKey("EvaluationSyncInfo"));
+            if (responseEvaluationSyncInfo.IsSuccessStatusCode)
+            {
+                evaluationSyncInfo= JsonDocument.Parse(responseEvaluationSyncInfo.Content).RootElement.Deserialize<EvaluationSyncInfo>();
+            }
+            else {
+                evaluationSyncInfo=new EvaluationSyncInfo {
+                    id = id,
+                    scope = scope,
+                    owner = owner,
+                    type = type,
+                    pk="EvaluationSyncInfo",
+                    code="ActivitySyncInfo",
+
+                };
+            }
+            switch (true) 
+            {
+                case bool when (type == "Exam"):
+                    break;
+                case bool when (type == "Art"):
+                    break;
+                default:
+                    break;
+            }
+        }
+    }
+}

+ 4 - 0
TEAMModelOS.SDK/TEAMModelOS.SDK.csproj

@@ -52,4 +52,8 @@
 		<PackageReference Include="Microsoft.Azure.Functions.Worker.Extensions.Http" Version="3.2.0" />
 		<PackageReference Include="System.Management" Version="8.0.0" />
 	</ItemGroup>
+
+	<ItemGroup>
+	  <ProjectReference Include="..\TEAMModelOS.Extension\IES.ExamLib\IES.ExamLib.csproj" />
+	</ItemGroup>
 </Project>

+ 7 - 0
TEAMModelOS.sln

@@ -39,6 +39,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IES.ExamServer", "TEAMModel
 EndProject
 Project("{54A90642-561A-4BB1-A94E-469ADEE60C69}") = "IES.ExamClient", "TEAMModelOS.Extension\IES.Exam\IES.ExamClient\IES.ExamClient.esproj", "{7CBA0472-933D-49A7-8B59-CD35715DE393}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IES.ExamLib", "TEAMModelOS.Extension\IES.ExamLib\IES.ExamLib.csproj", "{319E1A33-D010-4053-ACBC-98CFFC628FBF}"
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
@@ -117,6 +119,10 @@ Global
 		{7CBA0472-933D-49A7-8B59-CD35715DE393}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{7CBA0472-933D-49A7-8B59-CD35715DE393}.Release|Any CPU.Build.0 = Release|Any CPU
 		{7CBA0472-933D-49A7-8B59-CD35715DE393}.Release|Any CPU.Deploy.0 = Release|Any CPU
+		{319E1A33-D010-4053-ACBC-98CFFC628FBF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{319E1A33-D010-4053-ACBC-98CFFC628FBF}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{319E1A33-D010-4053-ACBC-98CFFC628FBF}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{319E1A33-D010-4053-ACBC-98CFFC628FBF}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -135,6 +141,7 @@ Global
 		{0FC9DE8A-488B-4ACD-88D5-8DEDECA1FF42} = {9B74B53F-20E8-46CC-903B-62AEB1583DD7}
 		{A8C336A0-8272-41C0-9D01-88D6BC652B76} = {9B74B53F-20E8-46CC-903B-62AEB1583DD7}
 		{7CBA0472-933D-49A7-8B59-CD35715DE393} = {9B74B53F-20E8-46CC-903B-62AEB1583DD7}
+		{319E1A33-D010-4053-ACBC-98CFFC628FBF} = {9B74B53F-20E8-46CC-903B-62AEB1583DD7}
 	EndGlobalSection
 	GlobalSection(ExtensibilityGlobals) = postSolution
 		SolutionGuid = {76440725-5E50-4288-851F-BA5C0BC8E8C6}

+ 8 - 10
TEAMModelOS/Controllers/Both/ActivitySyncInfoController.cs

@@ -20,9 +20,9 @@ namespace TEAMModelOS.Controllers.Both
     [ProducesResponseType(StatusCodes.Status200OK)]
     [ProducesResponseType(StatusCodes.Status400BadRequest)]
 
-    [Route("activity-sync")]
+    [Route("evaluation-sync")]
     [ApiController]
-    public class ActivitySyncInfoController : ControllerBase
+    public class EvaluationSyncInfoController : ControllerBase
     {
         private AzureCosmosFactory _azureCosmos;
         private readonly DingDing _dingDing;
@@ -32,7 +32,7 @@ namespace TEAMModelOS.Controllers.Both
         private readonly AzureStorageFactory _azureStorage;
         private readonly AzureRedisFactory _azureRedis;
         public IConfiguration _configuration { get; set; }
-        public ActivitySyncInfoController(AzureRedisFactory azureRedis, AzureCosmosFactory azureCosmos, DingDing dingDing, IOptionsSnapshot<Option> option, CoreAPIHttpService coreAPIHttpService, AzureServiceBusFactory serviceBus, AzureStorageFactory azureStorage, IConfiguration configuration)
+        public EvaluationSyncInfoController(AzureRedisFactory azureRedis, AzureCosmosFactory azureCosmos, DingDing dingDing, IOptionsSnapshot<Option> option, CoreAPIHttpService coreAPIHttpService, AzureServiceBusFactory serviceBus, AzureStorageFactory azureStorage, IConfiguration configuration)
         {
             _azureCosmos = azureCosmos;
             _dingDing = dingDing;
@@ -50,9 +50,9 @@ namespace TEAMModelOS.Controllers.Both
         [ProducesDefaultResponseType]
         [AuthToken(Roles = "teacher,admin")]
         [HttpPost("package")]
-#if !DEBUG
-        [Authorize(Roles = "IES")]
-#endif
+//#if !DEBUG
+//        [Authorize(Roles = "IES")]
+//#endif
         public async Task<IActionResult> Package(JsonNode request) 
         {
 
@@ -64,9 +64,9 @@ namespace TEAMModelOS.Controllers.Both
                 "type":"Art/Exam"
             }
              */
-            if (request["activity"]!=null)
+            if (request["evaluation"]!=null)
             {
-                var activity = JsonSerializer.Deserialize<ActivitySyncInfo>(request["activity"]);
+                var activity = JsonSerializer.Deserialize<EvaluationSyncInfo>(request["evaluation"]);
                 ValidResult validResult = activity.Valid();
                 if (!validResult.isVaild) 
                 {
@@ -74,8 +74,6 @@ namespace TEAMModelOS.Controllers.Both
                 }
                 
             }
-           
-
             return Ok();
         }
     }

+ 9 - 6
TEAMModelOS/Controllers/Client/HiTeachController.cs

@@ -1852,6 +1852,7 @@ namespace TEAMModelOS.Controllers.Client
                 (List<RMember> students, _) = await GroupListService.GetMemberByListids(_coreAPIHttpService, db, _dingDing, new List<string>() { request.sid }, request.school);
                
                 string imeiType = string.Empty;
+                string imeimsgstr = string.Empty;
                 //開課記錄保存
                 LessonRecord lr = new()
                 {
@@ -1898,7 +1899,8 @@ namespace TEAMModelOS.Controllers.Client
                         var result = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Student).GetList<int>(sql, "Imei");
                         if (result.list.IsNotEmpty() && result.list[0]>0)
                         {
-                            var imeimsg = new ServiceBusMessage(new { request.channel,lessonId= lr.id, userid = request.did, request.school, stus, imeiType }.ToJsonString());
+                            imeimsgstr=    new { request.channel, lessonId = lr.id, userid = request.did, request.school, stus, imeiType }.ToJsonString();
+                            var  imeimsg = new ServiceBusMessage(imeimsgstr);
                             imeimsg.ApplicationProperties.Add("name", "Imei");
                             sbm.Add(imeimsg);
                         }
@@ -1944,11 +1946,12 @@ namespace TEAMModelOS.Controllers.Client
 
                     }
                 }
-                if (request.school.Equals("ghxyfs"))
-                {
-                    await _dingDing.SendBotMsg($"{request.ToJsonString()},{lr.id}", GroupNames.成都开发測試群組);
-                }
-                return Ok(new { status = 200, lr.id, students, size, usize, imeiType });
+                var data = new { status = 200, lr.id, students, size, usize, imeiType };
+                //if (!string.IsNullOrWhiteSpace(request.school) && request.school.Equals("ghxyfs"))
+                //{
+                //    await _dingDing.SendBotMsg($"{request.ToJsonString()},{lr.id},{imeiType},{imeimsgstr},{data.ToJsonString()}", GroupNames.成都开发測試群組);
+                //}
+                return Ok(data);
             }
             catch (Exception ex)
             {

+ 11 - 3
TEAMModelOS/Controllers/Third/IRS/ThirdIRSController.cs

@@ -20,6 +20,7 @@ using System.Net.Http.Json;
 
 using System.Net;
 using Microsoft.Extensions.Primitives;
+using FastJSON;
 
 namespace TEAMModelOS.Controllers
 {
@@ -97,8 +98,9 @@ namespace TEAMModelOS.Controllers
                 string sql = $"select value c from c where c.school='{lessonTask.school}' and c.channel='{lessonTask.channel}'";
                 if (!string.IsNullOrWhiteSpace(lessonTask.lessonId)) 
                 {
-                    sql=$"{sql}  and c.lessonId='{lessonTask.lessonId}'";
+                    sql=$" {sql}  and c.lessonId='{lessonTask.lessonId}'";
                 }
+                //await _dingDing.SendBotMsg($"139zhxy查询SQL {sql},{request.ToJsonString()} ", GroupNames.成都开发測試群組);
                 var result = await _azureCosmos.GetCosmosClient().GetContainer(Constant.TEAMModelOS, Constant.Student).GetList<Imei>(sql, "Imei");
                 if (result.list.IsNotEmpty())
                 {
@@ -154,11 +156,17 @@ namespace TEAMModelOS.Controllers
                                                 JsonElement json = content.ToObject<JsonElement>();
                                                 if (json.GetProperty("code").GetInt32()==0)
                                                 {
-                                                    await _dingDing.SendBotMsg($"{_option.Location},139zhxy电子学生证任务推送成功。\n{json.GetProperty("message").GetString()}{data.ToJsonString()}", GroupNames.成都开发測試群組);
+                                                    if (imeis.Count()>100)
+                                                    {
+                                                        await _dingDing.SendBotMsg($"{_option.Location},139zhxy电子学生证任务推送成功。\n{content}{request.ToJsonString()}", GroupNames.成都开发測試群組);
+                                                    }
+                                                    else {
+                                                        await _dingDing.SendBotMsg($"{_option.Location},139zhxy电子学生证任务推送成功。\n{content}{data.ToJsonString()}{request.ToJsonString()}", GroupNames.成都开发測試群組);
+                                                    }
                                                 }
                                                 else
                                                 {
-                                                    await _dingDing.SendBotMsg($"{_option.Location},139zhxy电子学生证任务推送异常,返回状态码:{json.GetProperty("code")}\n{json.GetProperty("message").GetString()}\n{data.ToJsonString()}", GroupNames.成都开发測試群組);
+                                                    await _dingDing.SendBotMsg($"{_option.Location},139zhxy电子学生证任务推送异常,返回状态码:{content}\n{data.ToJsonString()}", GroupNames.成都开发測試群組);
                                                 }
                                             }
                                             else