瀏覽代碼

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

OnePsycho 1 年之前
父節點
當前提交
2ca519882f

+ 12 - 7
TEAMModelOS.FunctionV4/ServiceBus/ActiveTaskTopic.cs

@@ -1338,15 +1338,19 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
                             case "up-base":
 
                                 //读取TimeLine.json
+                                List<string> PickupMemberIds = new List<string>();
                                 try
                                 {
                                     BlobDownloadResult timeLineBlobDownload = await _azureStorage.GetBlobContainerClient(blobname).GetBlobClient($"/records/{_lessonId}/IES/TimeLine.json").DownloadContentAsync();
                                     TimeLineData timeLineData = timeLineBlobDownload.Content.ToObjectFromJson<TimeLineData>();
                                     lessonRecord.hitaClientCmpCount = timeLineData.events.Where(z => !string.IsNullOrWhiteSpace(z.WrkCmpSrcType) && z.WrkCmpSrcType.Equals("HitaClientCmp")).Count();
                                     //lessonRecord.collateTaskCount = lessonRecord.hitaClientCmpCount;
-                                    List<TimeLineEvent> timeLineEvents=  timeLineData.events.FindAll(z => !string.IsNullOrWhiteSpace(z.Event) && z.Event.Equals("PickupResult"));
-                                    if (timeLineEvents.IsNotEmpty()) { 
-                                        
+                                    List<TimeLineEvent> timeLineEvents =  timeLineData.events.FindAll(z => !string.IsNullOrWhiteSpace(z.Event) && z.Event.Equals("PickupResult"));
+                                    if (timeLineEvents.IsNotEmpty()) {
+                                        foreach (var timeLineEvent in timeLineEvents) {
+                                           var memberIds= timeLineEvent.PickupMemberId.ToObject<List<string>>();
+                                            PickupMemberIds.AddRange(memberIds);
+                                        }
                                     }
                                 }
                                 catch (Exception ex)
@@ -1357,11 +1361,11 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
                                     }
                                 }
                                 //读取Task.json
+                                List<TaskData> taskDatas = new List<TaskData>();
                                 try
                                 {
                                     BlobDownloadResult taskBlobDownload = await _azureStorage.GetBlobContainerClient(blobname).GetBlobClient($"/records/{_lessonId}/IES/Task.json").DownloadContentAsync();
-                                    List<TaskData> timeLineData = taskBlobDownload.Content.ToObjectFromJson<List<TaskData>>();
-                                   
+                                    taskDatas = taskBlobDownload.Content.ToObjectFromJson<List<TaskData>>();
                                 }
                                 catch (Exception ex)
                                 {
@@ -1371,10 +1375,11 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
                                     }
                                 }
                                 //读取IRS.json
+                                List<IRSData> iRSDatas = new List<IRSData>();
                                 try
                                 {
                                     BlobDownloadResult irsBlobDownload = await _azureStorage.GetBlobContainerClient(blobname).GetBlobClient($"/records/{_lessonId}/IES/IRS.json").DownloadContentAsync();
-                                    List<IRSData> iRSDatas = irsBlobDownload.Content.ToObjectFromJson<List<IRSData>>();
+                                    iRSDatas = irsBlobDownload.Content.ToObjectFromJson<List<IRSData>>();
 
                                 }
                                 catch (Exception ex)
@@ -1536,7 +1541,7 @@ namespace TEAMModelOS.FunctionV4.ServiceBus
                                     //await _dingDing.SendBotMsg($"{_option.Location},课堂id:{_lessonId} blob刷新完成!", GroupNames.醍摩豆服務運維群組);
                                     await BlobService.RefreshBlobRoot(new BlobRefreshMessage { progress = "update", root = "records", name = $"{blobname}" }, _serviceBus, _configuration, _azureRedis);
                                     msgs.Add(update);
-                                    DoLessonStudentRecord(_dingDing, _snowflakeId, lessonRecord, scope, client, school, tmdid, teacher, _serviceBus, _azureStorage, _configuration, lessonBase,_azureRedis);
+                                    DoLessonStudentRecord(_dingDing, _snowflakeId, lessonRecord, scope, client, school, tmdid, teacher, _serviceBus, _azureStorage, _configuration, lessonBase,_azureRedis ,PickupMemberIds ,taskDatas,iRSDatas );
 
                                 }
                                 catch (Exception ex)

+ 1 - 0
TEAMModelOS.SDK/Models/Cosmos/Common/LessonRecord.cs

@@ -251,6 +251,7 @@ namespace TEAMModelOS.SDK.Models
         public string pageID { get; set; }
         public bool isBuzz { get; set; }
         public List<string> buzzClients { get; set; } = new List<string>();
+        public List<IRSClientAnswer> clientAnswers { get; set; }= new List<IRSClientAnswer>();
 
     }
     public class IRSClientAnswer {

+ 29 - 2
TEAMModelOS.SDK/Models/Service/LessonService.cs

@@ -169,7 +169,7 @@ namespace TEAMModelOS.SDK.Models.Service
             return dict;
         }
         public static async void DoLessonStudentRecord(DingDing _dingding, SnowflakeId snowflakeId, LessonRecord lessonRecord, string scope, CosmosClient client, string school, string tmdid,
-            Teacher teacher,   AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, IConfiguration _configuration, LessonBase lessonBase,AzureRedisFactory _azureRedis)
+            Teacher teacher,   AzureServiceBusFactory _serviceBus, AzureStorageFactory _azureStorage, IConfiguration _configuration, LessonBase lessonBase,AzureRedisFactory _azureRedis, List<string> pickupMemberIds, List<TaskData> taskDatas, List<IRSData> iRSDatas)
         {
             School schoolBase = null;
             Period period = null;
@@ -229,9 +229,36 @@ namespace TEAMModelOS.SDK.Models.Service
                      
                 }
                 List <Task<ItemResponse<StudentScoreRecord>>> records = new List<Task<ItemResponse<StudentScoreRecord>>>();
-                 HashSet <OverallEducation> overallEducations   = new HashSet<OverallEducation>();
+                HashSet <OverallEducation> overallEducations   = new HashSet<OverallEducation>();
+
+                // 互动次数,-1 表示没有进行互动。 与 0 不同
+                int interactCount = -1;
+                if (iRSDatas.IsNotEmpty()) {
+                    interactCount= iRSDatas.Where(z => z.isBuzz==false).SelectMany(v => v.clientAnswers).Count();
+                }
+                //任务发布次数 ,-1 表示没有进行互动。 与 0 不同
+                int taskCount = -1;
+                if (taskDatas.IsNotEmpty())
+                {
+                    taskCount=0;
+                   foreach (var taskData in taskDatas)
+                    {
+                        var isGroupItem=  taskData.clientWorks.FindAll(z => z.isGroupItem);
+                        if (isGroupItem.IsNotEmpty())
+                        {
+                            //有组任务
+                        }
+                        else {
+                            //没有组任务
+
+                            taskCount+=1;
+                        }
+                    }
+                }
                 foreach (var x in stuids) {
                     var record = lessonStudentRecords.Find(l => l.stuid.Equals(x.id) && l.code.Equals($"StudentScoreRecord") && l.school.Equals(x.school));
+
+
                     ClientSummaryList clientSummaryList = lessonBase.report.clientSummaryList.Find(c => c.seatID == x.seatID);
                     if (record != null)
                     {

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/en-US.js

@@ -4749,6 +4749,7 @@ const LANG_EN_US = {
             expire: 'The status code has expired!',
             basicCourses: 'Basic Course',
             system: 'System',
+            semester: 'Course information will be updated after switching semesters. You need to return to the homepage to reselect courses. Would you like to switch to:',
         },
         coursesCardTitle: 'My Course List',
         newAddCourse: 'The latest addition',

+ 1 - 0
TEAMModelOS/ClientApp/public/lang/zh-TW.js

@@ -4749,6 +4749,7 @@ const LANG_ZH_TW = {
             expire: '該狀態碼已過期!',
             basicCourses: '基本課程',
             system: '系統',
+            semester: '切換學期後會更新課程資料,需回到首頁重新選擇課程,請問是否切換到:',
         },
         coursesCardTitle: '我的課程清單',
         newAddCourse: '最新加入課程',

+ 16 - 14
TEAMModelOS/ClientApp/src/components/student-web/EventView/EventContentTypeTemplate/PaperViewBox/LessonTestReport.vue

@@ -23,12 +23,12 @@
                 <span v-else-if="examInfo.source === '1'">{{ $t("studentWeb.exam.report.anwser1") }}</span>
                 <span v-else-if="examInfo.source === '2'">{{ $t("studentWeb.exam.report.anwser2") }}</span>
             </div>
-            <h4 v-show="testState === 2 || (testState === 3 && progress != 'finish')" style="padding: 25px;">
+            <h4 v-show="testState === 2 || (testState === 3 && progress != 'finish' && getItemTitle.type != 'Art')" style="padding: 25px;">
                 <Icon type="md-checkmark-circle-outline" class="warm-icon" color="green" />
                 {{$t("studentWeb.exam.report.noRes")}}
             </h4>
-            <Row :gutter="20" v-if="testState === 3 && progress === 'finish'">
-                <i-col :xs="24" :sm="24" :md="24" :lg="24">
+            <Row :gutter="20">
+                <i-col :xs="24" :sm="24" :md="24" :lg="24" v-if="getItemTitle.type != 'Art' ? (testState === 3 && progress === 'finish') : testState === 3">
                     <Row :gutter="20">
                         <!-- 得分题目数 -->
                         <i-col :xs="24" :sm="24" :md="12" :lg="6" :xl="6">
@@ -71,17 +71,19 @@
                         </i-col>
                     </Row>
                 </i-col>
-                <i-col :xs="24" :sm="24" :md="24" :lg="24">
-                    <!-- <Card class="chart-card"> -->
-                        <LessonTestReportCharts :chartsData="chartsData"></LessonTestReportCharts>
-                    <!-- </Card> -->
-                </i-col>
-                <!-- 所有学生都作答了才会有数据,所以进行中的全客观题下quDataSub可能会为空 -->
-                <i-col :xs="24" :sm="24" :md="24" :lg="24" v-if="quDataSub.length">
-                    <Card>
-                        <QuCount :quData="quDataSub" />
-                    </Card>
-                </i-col>
+                <template v-if="testState === 3 && progress === 'finish'">
+                    <i-col :xs="24" :sm="24" :md="24" :lg="24">
+                        <!-- <Card class="chart-card"> -->
+                            <LessonTestReportCharts :chartsData="chartsData"></LessonTestReportCharts>
+                        <!-- </Card> -->
+                    </i-col>
+                    <!-- 所有学生都作答了才会有数据,所以进行中的全客观题下quDataSub可能会为空 -->
+                    <i-col :xs="24" :sm="24" :md="24" :lg="24" v-if="quDataSub.length">
+                        <Card>
+                            <QuCount :quData="quDataSub" />
+                        </Card>
+                    </i-col>
+                </template>
             </Row>
         </div>
         <!-- 0320 艺术评测结束后显示详细内容 -->