CrazyIter_Bin 3 年之前
父節點
當前提交
3c80d68103

+ 4 - 4
TEAMModeBI/ClientApp/src/components/Ability.vue

@@ -139,10 +139,10 @@ export default {
                         element.name === '信息化能力工程2.0通识性课程' ? (element.no = '通用') : ''
                     })
                 }
-                if (res.abilities.length === 0) {
-                    ElMessage.error('数据异常,无法查看相关微能力点方案内容')
-                    return
-                }
+                // if (res.abilities.length === 0) {
+                //     ElMessage.error('数据异常,无法查看相关微能力点方案内容')
+                //     return
+                // }
                 res.abilities.sort(function (s, t) {
                     var a = s.no.toLowerCase()
                     var b = t.no.toLowerCase()

+ 4 - 0
TEAMModeBI/ClientApp/src/router/index.js

@@ -1,6 +1,10 @@
 import { createWebHistory, createRouter } from "vue-router";
 import store from '@/store/index.js'
 const routes = [{
+        path: "/",
+        redirect: "/login"
+    },
+    {
         path: "/login",
         name: "login",
         component: () => require.ensure([], (require) => require(`@/view/login.vue`))

+ 23 - 1
TEAMModeBI/ClientApp/src/view/teachermanage/areamanage.vue

@@ -39,7 +39,7 @@
                 <el-tabs v-model="activeName">
                     <el-tab-pane label="区内增校" name="add">
                         <div class="haveSchool">
-                            <div class="schoolLeft">
+                            <div class="schoolLeft" v-if="notjoinSchool.length !==0">
                                 <p>学校列表</p>
                                 <ul>
                                     <li class="details-list-school" v-for="(item,index) in notjoinSchool" :key="item.id" :class="{'active':position===index}">
@@ -64,6 +64,9 @@
                                     </li>
                                 </ul>
                             </div>
+                            <div class="noData">
+                                <div>暂无数据</div>
+                            </div>
                             <div class="schoolRight">
                                 <div class="schoolRight-title">区级拥有学校</div>
                                 <div class="schoolRight-table">
@@ -706,6 +709,25 @@ export default {
     text-align: center;
     line-height: 60px;
 }
+.noData {
+    width: 35%;
+    height: 60vh;
+    padding: 0.5%;
+    border-right: 1px dashed #ccc;
+    float: left;
+}
+.noData div {
+    width: 100%;
+    height: 100%;
+    font-size: 28px;
+    font-weight: 800;
+    margin: 0 auto;
+    display: flex;
+    justify-content: center;
+    flex-direction: row;
+    align-items: center;
+    color: #ccc;
+}
 </style>
 <style>
 .traitfrom .refer {

+ 2 - 2
TEAMModeBI/ClientApp/src/view/teachermanage/school.vue

@@ -541,7 +541,7 @@ export default {
     width: 80%;
 }
 .changebadge {
-    width: 125px;
+    width: 100%;
     height: 125px;
     position: absolute;
     top: 0px;
@@ -773,7 +773,7 @@ export default {
 }
 @media screen and (max-width: 1920px) {
     .school-formbox .school-form-badge {
-        width: 17%;
+        width: 17.5%;
     }
 }
 @media screen and (max-width: 1400px) {

+ 1 - 1
TEAMModeBI/Controllers/BISchool/AreaRelevantController.cs

@@ -26,11 +26,11 @@ namespace TEAMModeBI.Controllers.BISchool
         //钉钉提示信息
         private readonly DingDing _dingDing;
         private readonly Option _option;
-        public readonly string mobel = "区级";
 
         public AreaRelevantController(AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, DingDing dingDing, IOptionsSnapshot<Option> option)
         {
             _azureCosmos = azureCosmos;
+            _azureStorage = azureStorage;
             _dingDing = dingDing;
             _option = option?.Value;
         }

+ 32 - 4
TEAMModeBI/Controllers/BISchool/BatchAreaController.cs

@@ -582,6 +582,8 @@ namespace TEAMModeBI.Controllers.BISchool
                     await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(atask, new PartitionKey($"AbilityTask-{_oldStandard}"));
                 }
 
+                StandardFile saveFile = new StandardFile();
+
                 //新政策文件
                 await foreach (StandardFile standardFile in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<StandardFile>(queryText: $"select value(c) from c where  c.id='{_newId}'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"StandardFile") }))
                 {
@@ -589,23 +591,49 @@ namespace TEAMModeBI.Controllers.BISchool
                     {
                         standardFile.standard = $"{_oldStandard}";
                         standardFile.id = $"{_oldId}";
-                        //await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(standardFile, new PartitionKey($"StandardFile")); // 需要删除原来的政策文件数据在进行添加
-                        await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").ReplaceItemAsync<StandardFile>(standardFile, standardFile.id, new PartitionKey("StandardFile")); //直接替换以前的数据
+
+                        saveFile = standardFile;
                     }
                 }
+                StandardFile tempFile = new();
+                try
+                {
+                    tempFile = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").ReadItemAsync<StandardFile>(saveFile.id, new PartitionKey("StandardFile"));
+                }
+                catch
+                {
+                }
+                if (tempFile != null)                 
+                    await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").ReplaceItemAsync<StandardFile>(saveFile, saveFile.id, new PartitionKey("StandardFile")); //直接替换以前的数据
+                else
+                   await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(saveFile, new PartitionKey($"StandardFile")); // 需要删除原来的政策文件数据在进行添加
 
                 //新的区域设置
+                AreaSetting saveSetting = new AreaSetting();
                 await foreach (AreaSetting areaSetting in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<AreaSetting>(queryText: $"select value(c) from c where c.id='{_newId}'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("AreaSetting") }))
                 {
                     if (areaSetting != null)
                     {
                         areaSetting.accessConfig = null;
                         areaSetting.id = $"{_oldId}";
-                        //await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(areaSetting, new PartitionKey($"AreaSetting"));  //需要删除原来的区域设置数据在进行添加
-                        await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").ReplaceItemAsync<AreaSetting>(areaSetting, areaSetting.id, new PartitionKey($"AreaSetting"));   //直接替换以前的数据
+
+                        saveSetting = areaSetting;
                     }
                 }
 
+                AreaSetting tempSetting = new();
+                try
+                {
+                    tempSetting = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").ReadItemAsync<AreaSetting>(saveSetting.id, new PartitionKey("StandardFile"));
+                }
+                catch
+                {
+                }
+                if (tempSetting != null)
+                    await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").ReplaceItemAsync<AreaSetting>(saveSetting, saveSetting.id, new PartitionKey($"AreaSetting"));   //直接替换以前的数据
+                else
+                    await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").CreateItemAsync(saveSetting, new PartitionKey($"AreaSetting"));  //需要删除原来的区域设置数据在进行添加
+
                 //发送消息分区键
                 string partitionCode = "DelBeforeCopyAbility-mark";
 

+ 86 - 41
TEAMModeBI/Controllers/BITest/TestController.cs

@@ -21,6 +21,7 @@ using TEAMModelOS.Models;
 using TEAMModelOS.SDK;//引用创建学校Code
 using TEAMModelOS.SDK.Context.Attributes.Azure;
 using TEAMModelOS.SDK.DI;
+using TEAMModelOS.SDK.Extension;
 using TEAMModelOS.SDK.Helper.Common.DateTimeHelper;
 using TEAMModelOS.SDK.Models;
 using TEAMModelOS.SDK.Models.Cosmos.BI;
@@ -53,6 +54,90 @@ namespace TEAMModeBI.Controllers.BITest
             _configuration = configuration;
         }
 
+        /// <summary>
+        /// 删除册别,删除章节  创区
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
+        [HttpPost("del-standard")]
+        public async Task<IActionResult> DelStandard(JsonElement jsonElement)
+        {
+            if (!jsonElement.TryGetProperty("oldStandard", out JsonElement _oldStandard)) return BadRequest();
+            var cosmosClient = _azureCosmos.GetCosmosClient();
+
+            List<string> abilityIds = new List<string>();  //册别的ID集合
+
+            //查询册别信息
+            await foreach (var tempAbility in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<Ability>(queryText: $"select value(c) from c", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Ability-{_oldStandard}") }))
+            {
+                abilityIds.Add(tempAbility.id);  //查询出来册别ID添加册别ID集合
+            }
+            //删除册别
+            if (abilityIds.IsNotEmpty())
+            {
+                var sresponse = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").DeleteItemsStreamAsync(abilityIds, $"Ability-{_oldStandard}");
+            }
+
+            List<string> abilityTaskIds = new List<string>();  //章节ID集合
+
+            await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<AbilityTask>(queryText: $"select value(c) from c", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"AbilityTask-{_oldStandard}") }))
+            {
+                abilityTaskIds.Add(item.id);   //查询出来的章节信息ID添加到战绩集合
+            }
+            //删除章节
+            if (abilityTaskIds.IsNotEmpty())
+            {
+                var sresponse = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").DeleteItemsStreamAsync(abilityTaskIds, $"AbilityTask-{_oldStandard}");
+            }
+
+            return Ok(new { state = 200 });
+        }
+
+        [HttpPost("get-query")]
+        public async Task<IActionResult> QueryTest(JsonElement jsonElement) 
+        {
+            if (!jsonElement.TryGetProperty("oldId", out JsonElement oldId)) return BadRequest();
+            var cosmosClient = _azureCosmos.GetCosmosClient();
+
+            StandardFile tempFile = new();
+            try
+            {
+                //tempFile = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").ReadItemAsync<StandardFile>($"{oldId}", new PartitionKey("StandardFile"));
+                await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<StandardFile>(queryText: $"select value(c) from c where c.id='{oldId}'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey("StandardFile") }))
+                {
+                    tempFile = item;
+
+                }
+            }
+            catch(Exception ex)
+            {
+            }
+
+            return Ok(new { state = 200, tempFile });
+        }
+
+
+
+        public async Task<IActionResult> DelSchool(JsonElement jsonElement)
+        {
+            if (!jsonElement.TryGetProperty("schoolId", out JsonElement schoolId)) return BadRequest();
+
+            List<string> ids = schoolId.ToObject<List<string>>();
+
+            var cosmosClient = _azureCosmos.GetCosmosClient();
+
+            string sql = $"select value(v) from c";
+
+            return Ok(new { state = 200 });
+
+        }
+
+
+
+
+
+
+
         /// <summary>
         /// 查询学校
         /// </summary>
@@ -195,7 +280,6 @@ namespace TEAMModeBI.Controllers.BITest
             //string Str_char1 = GenerateRandom.Str_char(1, true);
 
             CreateSchoolInfo data = await SchoolCode.GenerateSchoolCode(createSchoolInfo, _dingDing, _environment);
-            string temp = null;
             return Ok(new { state = 200, data, data.id });
         }
 
@@ -598,46 +682,7 @@ namespace TEAMModeBI.Controllers.BITest
             return Ok(new {  pageTests1 });
         }
 
-        /// <summary>
-        /// 删除册别,删除章节
-        /// </summary>
-        /// <param name="jsonElement"></param>
-        /// <returns></returns>
-        [HttpPost("del-standard")]
-        public async Task<IActionResult> DelStandard(JsonElement jsonElement) 
-        {
-            if (!jsonElement.TryGetProperty("oldStandard", out JsonElement _oldStandard)) return BadRequest();
-            var cosmosClient = _azureCosmos.GetCosmosClient();
-
-            List<string> abilityIds = new List<string>();  //册别的ID集合
-
-            //查询册别信息
-            await foreach (var tempAbility in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<Ability>(queryText: $"select value(c) from c", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"Ability-{_oldStandard}") }))
-            {
-                abilityIds.Add(tempAbility.id);  //查询出来册别ID添加册别ID集合
-            }
-            //删除册别
-            if (abilityIds.IsNotEmpty())
-            {
-                //var sresponse = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").DeleteItemsStreamAsync(abilityIds, $"Ability-{_oldStandard}");
-            }
-
-            List<string> abilityTaskIds = new List<string>();  //章节ID集合
-            foreach (var abilityId in abilityIds)
-            {
-                await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").GetItemQueryIterator<AbilityTask>(queryText: $"select value(c) from c where c.abilityId='{abilityId}'", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"AbilityTask-{_oldStandard}") }))
-                {
-                    abilityTaskIds.Add(item.id);   //查询出来的章节信息ID添加到战绩集合
-                }
-            }
-            //删除章节
-            if (abilityTaskIds.IsNotEmpty())
-            {
-                //var sresponse = await cosmosClient.GetContainer(Constant.TEAMModelOS, "Normal").DeleteItemsStreamAsync(abilityTaskIds, $"AbilityTask-{_oldStandard}");
-            }
-
-            return Ok(new { state = 200 });
-        }
+        
 
         /// <summary>
         /// 保存日志文件

+ 0 - 1
TEAMModeBI/Controllers/DingDingStruc/DDStructController.cs

@@ -39,7 +39,6 @@ namespace TEAMModeBI.Controllers.DingDingStruc
         //雪花ID
         private readonly SnowflakeId _snowflakeId;  
         private readonly Option _option;
-        string type = "ddteammodel";
 
         public DDStructController(IConfiguration configuration, AzureCosmosFactory azureCosmos, AzureStorageFactory azureStorage, DingDing dingDing, IOptionsSnapshot<Option> option, CoreAPIHttpService aoreAPIHttpService, SnowflakeId snowflakeId)
         {

+ 141 - 0
TEAMModeBI/Controllers/Lesson/LessonSticsController.cs

@@ -0,0 +1,141 @@
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using TEAMModelOS.Models;
+using TEAMModelOS.SDK.DI;
+using Microsoft.Extensions.Options;
+using Azure.Cosmos;
+using System.Text.Json;
+using TEAMModelOS.SDK.Models.Cosmos.Common;
+using TEAMModelOS.SDK.Models;
+
+namespace TEAMModeBI.Controllers.Lesson
+{
+    [Route("lesson")]
+    [ApiController]
+    public class LessonSticsController : ControllerBase
+    {
+
+        private readonly AzureCosmosFactory _azureCosmos;
+        private readonly AzureStorageFactory _azureStorage;
+        private readonly DingDing _dingDing;
+        private readonly Option _option;
+
+        public LessonSticsController(AzureCosmosFactory azureCosmos, AzureStorageFactory azureFactory, DingDing dingDing, IOptionsSnapshot<Option> option) 
+        {
+            _azureCosmos = azureCosmos;
+            _azureStorage = azureFactory;
+            _dingDing = dingDing;
+            _option = option?.Value;        
+        }
+
+        /// <summary>
+        /// 统计课例数量
+        /// </summary>
+        /// <returns></returns>
+        [HttpPost("get-total")]
+        public async Task<IActionResult> GetCount()
+        {
+            try
+            {
+                List<string> schoolIds = new List<string>();
+                var cosmosClient = _azureCosmos.GetCosmosClient();
+                string lessonSql = $"select c.id,c.tmid,c.scope from c where c.pk='LessonRecord'";
+                int total = 0;
+                await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: lessonSql, requestOptions: new QueryRequestOptions() { }))
+                {
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt32() > 0)
+                    {
+                        total = count.GetInt32();
+                    }
+                }
+
+                return Ok(new { state = 200, total });
+            }
+            catch (Exception ex)
+            {
+                await _dingDing.SendBotMsg($"BI,{_option.Location}  /lesson/get-total  {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
+                return BadRequest();
+            }
+        }
+
+        /// <summary>
+        /// 管家所关联的课例数据
+        /// </summary>
+        /// <param name="jsonElement"></param>
+        /// <returns></returns>
+        [ProducesDefaultResponseType]
+        [HttpPost("get-assiist")]
+        public async Task<IActionResult> GetAssiist(JsonElement jsonElement) 
+        {
+            try
+            {
+                if (!jsonElement.TryGetProperty("tmdId", out JsonElement tmdId)) return BadRequest();
+                var cosmosClient = _azureCosmos.GetCosmosClient();
+                List<SchoolLen> schoolLens = new List<SchoolLen>();
+
+                List<string> schoolIds = new List<string>();
+
+                string schoolSql = $"SELECT DISTINCT REPLACE(c.code,'Teacher-','') AS schoolId,c.code,c.roles,c.id,c.name From c where ARRAY_CONTAINS(c.roles,'assist',true) AND c.pk = 'Teacher' AND c.status = 'join' AND c.id='{tmdId}'";
+
+                await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: schoolSql, requestOptions: new QueryRequestOptions() { }))
+                {
+                    using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                    foreach (var obj in json.RootElement.GetProperty("Documents").EnumerateArray())
+                    {
+                        schoolIds.Add(obj.GetProperty("schoolId").GetString());
+                    }
+                }
+
+                foreach (var itemId in schoolIds)
+                {
+                    SchoolLen schoolLen = new SchoolLen() { id = itemId };
+                    School school = new();
+                    try
+                    {
+                        school = await cosmosClient.GetContainer(Constant.TEAMModelOS, "School").ReadItemAsync<School>(itemId, new PartitionKey("Base"));
+                    }
+                    catch
+                    {
+                    }
+                    schoolLen.name = school != null ? school.name : itemId;
+
+                    await foreach (var item in cosmosClient.GetContainer(Constant.TEAMModelOS, "School").GetItemQueryStreamIterator(queryText: "SELECT DISTINCT c.id,c.code,c.name FROM c", requestOptions: new QueryRequestOptions() { PartitionKey = new PartitionKey($"LessonRecord-{itemId}") }))
+                    {
+                        using var json = await JsonDocument.ParseAsync(item.ContentStream);
+                        if (json.RootElement.TryGetProperty("_count", out JsonElement count) && count.GetInt32() > 0)
+                        {
+                            schoolLen.total = count.GetInt32();
+                        }
+                    }
+
+                    schoolLens.Add(schoolLen);
+                }
+
+                return Ok(new { state = 200, schoolLens });
+
+            }
+            catch (Exception ex)
+            {
+                await _dingDing.SendBotMsg($"BI, {_option.Location}  /lesson/get-assiist  {ex.Message}{ex.StackTrace}", GroupNames.成都开发測試群組);
+                return BadRequest();
+            }
+        }
+
+        public record SchoolLen 
+        {
+            public string id { get; set; }
+
+            public string name { get; set;}
+
+            public int total { get; set; }
+        }
+
+    }
+}
+
+

+ 10 - 8
TEAMModelFunction/TriggerExam.cs

@@ -133,15 +133,17 @@ namespace TEAMModelFunction
                                         int m = 0;
                                         foreach (ExamSubject subject in info.subjects)
                                         {
-                                            string classCode = String.Empty;
-                                            string cname = String.Empty;
+                                            string classCode = string.Empty;
+                                            string cname = string.Empty;
                                             if (string.IsNullOrEmpty(info.school) || !info.scope.Equals("school", StringComparison.OrdinalIgnoreCase))
                                             {
-                                                classCode = "ExamClassResult-" + info.creatorId;
+                                                classCode = "ExamClassResult-" + info.creatorId;                                               
+                                                //cname = members.Select(m => m.members.Where(c => c.groupId.Equals(cla)).Select(g => g.groupName)).ToString();
                                             }
                                             else
                                             {
                                                 classCode = "ExamClassResult-" + info.school;
+                                                //cname = members.Select(m => m.members.Where(c => c.classId.Equals(cla)).Select(g => g.groupName)).ToString();
                                             }
                                             cname = members.Where(m => m.id.Equals(cla)).FirstOrDefault()?.name;
                                             ExamClassResult result = new ExamClassResult
@@ -151,8 +153,9 @@ namespace TEAMModelFunction
                                                 id = Guid.NewGuid().ToString(),
                                                 subjectId = subject.id,
                                                 year = info.year,
-                                                scope = info.scope
+                                                scope = info.scope,
                                             };
+                                            result.info.name = cname;
                                             result.info.id = cla;
                                             result.info.name = cname;
                                             List<string> ans = new List<string>();
@@ -201,8 +204,7 @@ namespace TEAMModelFunction
                                                         }
                                                     }
                                                 }
-                                                //result.info.id = classroom.id;
-                                                //result.info.name = classroom.name;
+                                                //result.info.id = classroom.id;                                               
                                                 //result.gradeId = classroom.year.ToString();
                                                 //处理班级人数
                                                /* await foreach (var item in client.GetContainer(Constant.TEAMModelOS, "Student").GetItemQueryStreamIterator(queryText: $"select c.id from c where c.classId = '{classroom.id}'", requestOptions: new QueryRequestOptions() { PartitionKey = new Azure.Cosmos.PartitionKey($"Base-{info.school}") }))
@@ -259,7 +261,7 @@ namespace TEAMModelFunction
                                                     }
                                                 }
                                             }*/
-                                            ids = members.Where(c => c.id.Equals(cla)).SelectMany(m => m.members).Select(g => g.id).ToList();
+                                            ids = members.Where(c => c.id.Equals(cla)).SelectMany( m => m.members).Select(g => g.id).ToList();
                                             foreach (string stu in ids)
                                             {
                                                 result.mark.Add(marks);
@@ -533,7 +535,7 @@ namespace TEAMModelFunction
                 await _dingDing.SendBotMsg($"{Environment.GetEnvironmentVariable("Option:Location")}-{info.id}-评测作答记录结算异常{ex.Message}\n{ex.StackTrace}", GroupNames.成都开发測試群組);
             }
         }
-        public static async Task<(List<string> classes,List<RGroupList> members)> Activity(ExamInfo info, CosmosClient client, DingDing _dingDing, List<string> sub) {
+        public static async Task<(List<string> classes, List<RGroupList> members)> Activity(ExamInfo info, CosmosClient client, DingDing _dingDing, List<string> sub) {
             List<(string pId, List<string> gid)> ps = new List<(string pId, List<string> gid)>();
             if (info.groupLists.Count > 0)
             {

+ 5 - 1
TEAMModelOS/Controllers/Common/ExamController.cs

@@ -782,7 +782,11 @@ namespace TEAMModelOS.Controllers
                     //}                  
                     //List<(int index ,string content, double count)> acount = new List<(int index,string content, double count)>();
                     for (int i = 0; i < ans.Count; i++)
-                    {                       
+                    {
+                        if (ans[i] == null)
+                        {
+                            continue;
+                        }
                         var ac = ans[i].Where(a => a.Trim().Length > 0).ToList().Count;
                         var sc = standard[i].Count;
                         //算分处理