wangliang 1 سال پیش
والد
کامیت
c257a99db7
1فایلهای تغییر یافته به همراه26 افزوده شده و 4 حذف شده
  1. 26 4
      themis-business/src/main/java/com/qmth/themis/business/service/impl/TEStudentServiceImpl.java

+ 26 - 4
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEStudentServiceImpl.java

@@ -14,11 +14,9 @@ import com.qmth.themis.business.cache.bean.ExamCacheBean;
 import com.qmth.themis.business.cache.bean.ExamStudentCacheBean;
 import com.qmth.themis.business.constant.SystemConstant;
 import com.qmth.themis.business.dao.TEStudentMapper;
+import com.qmth.themis.business.dto.cache.TEStudentCacheDto;
 import com.qmth.themis.business.dto.response.*;
-import com.qmth.themis.business.entity.TBUser;
-import com.qmth.themis.business.entity.TEExamStudentLog;
-import com.qmth.themis.business.entity.TEStudent;
-import com.qmth.themis.business.entity.TOeExamRecord;
+import com.qmth.themis.business.entity.*;
 import com.qmth.themis.business.enums.MonitorVideoSourceEnum;
 import com.qmth.themis.business.service.*;
 import com.qmth.themis.business.util.OssUtil;
@@ -67,6 +65,12 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
     @Resource
     TEExamStudentLogService teExamStudentLogService;
 
+    @Resource
+    TIeExamInvigilateNoticeService tIeExamInvigilateNoticeService;
+
+    @Resource
+    TIeExamMediaLogService tIeExamMediaLogService;
+
     /**
      * 学生档案查询
      *
@@ -211,6 +215,24 @@ public class TEStudentServiceImpl extends ServiceImpl<TEStudentMapper, TEStudent
             if (!CollectionUtils.isEmpty(teExamStudentLogList)) {
                 teExamStudentLogList = teExamStudentLogList.get(0).ipChange(teExamStudentLogList);
             }
+
+            TEStudentCacheDto teStudent = themisCacheService.addStudentAccountCache(examStudentCacheBean.getStudentId());
+            //加入文本和语音消息轨迹
+            List<TIeExamInvigilateNotice> tIeExamInvigilateNoticeList = tIeExamInvigilateNoticeService.queryNoticeByExamRecordId(examRecordId);
+            if (!CollectionUtils.isEmpty(tIeExamInvigilateNoticeList)) {
+                for (TIeExamInvigilateNotice t : tIeExamInvigilateNoticeList) {
+                    teExamStudentLogList.add(new TEExamStudentLog(teStudent.getId(), tOeExamRecord.getExamStudentId(), t.getExamRecordId(), t.getType(), t.getContent(), t.getFormUserId(), t.getFormUserName(), t.getSendTime()));
+                }
+            }
+
+            //加入多媒体消息轨迹
+            List<TIeExamMediaLog> tIeExamMediaLogList = tIeExamMediaLogService.queryMediaByExamRecordId(examRecordId);
+            if (!CollectionUtils.isEmpty(tIeExamMediaLogList)) {
+                for (TIeExamMediaLog t : tIeExamMediaLogList) {
+                    teExamStudentLogList.add(new TEExamStudentLog(teStudent.getId(), tOeExamRecord.getExamStudentId(), t.getExamRecordId(), t.getType(), t.getContent(), t.getCreateTime()));
+                }
+            }
+            Collections.sort(teExamStudentLogList);
         }
 
         IPage<TEStudentExamRecordVideoMessageDto> teStudentExamRecordVideoMessageDtoIPage = null;