Procházet zdrojové kódy

Merge branch 'dev'
1

wangliang před 4 roky
rodič
revize
ab12cc2f78

+ 4 - 8
themis-backend/src/main/java/com/qmth/themis/backend/api/TIeInvigilateCallMobileController.java

@@ -38,7 +38,10 @@ import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
 import javax.annotation.Resource;
 import java.io.File;
 import java.io.File;
 import java.security.NoSuchAlgorithmException;
 import java.security.NoSuchAlgorithmException;
-import java.util.*;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
 
 
 /**
 /**
  * @Description: mobile监考监控通话信息 前端控制器
  * @Description: mobile监考监控通话信息 前端控制器
@@ -210,17 +213,10 @@ public class TIeInvigilateCallMobileController {
     @RequestMapping(value = "/getMonitorKey", method = RequestMethod.POST)
     @RequestMapping(value = "/getMonitorKey", method = RequestMethod.POST)
     @ApiResponses({@ApiResponse(code = 200, message = "获取监考monitorKey", response = MobileAuthorizationMonitorBean.class)})
     @ApiResponses({@ApiResponse(code = 200, message = "获取监考monitorKey", response = MobileAuthorizationMonitorBean.class)})
     public Result getMonitorKey(@ApiParam(value = "考试记录id", required = true) @RequestParam Long recordId) throws NoSuchAlgorithmException {
     public Result getMonitorKey(@ApiParam(value = "考试记录id", required = true) @RequestParam Long recordId) throws NoSuchAlgorithmException {
-        TBUser tbUser = (TBUser) ServletUtil.getRequestAccount();
         TBSession tbSession = (TBSession) ServletUtil.getRequestSession();
         TBSession tbSession = (TBSession) ServletUtil.getRequestSession();
         String monitorKey = ExamRecordCacheUtil.getMonitorKey(recordId);
         String monitorKey = ExamRecordCacheUtil.getMonitorKey(recordId);
-        AuthDto authDto = (AuthDto) redisUtil.get(SystemConstant.userOauth + "::" + tbUser.getId());
         String monitorUserId = null;
         String monitorUserId = null;
         String sourceUserId = this.getSourceUserId(recordId);
         String sourceUserId = this.getSourceUserId(recordId);
-//        if (Objects.nonNull(authDto) && !authDto.toString().contains(RoleEnum.STUDENT.name())) {
-//            monitorUserId = "s_" + tbSession.getId();
-//        } else {
-//            monitorUserId = "m_" + tbSession.getId();
-//        }
         monitorUserId = "m_" + tbSession.getId();
         monitorUserId = "m_" + tbSession.getId();
         String monitorUserSig = tencentYunUtil.getSign(monitorUserId, SystemConstant.TENCENT_EXPIRE_TIME);
         String monitorUserSig = tencentYunUtil.getSign(monitorUserId, SystemConstant.TENCENT_EXPIRE_TIME);
         Map<String, Object> map = new HashMap<>();
         Map<String, Object> map = new HashMap<>();

+ 2 - 1
themis-business/src/main/resources/mapper/TEExamMapper.xml

@@ -43,7 +43,8 @@
         if(t.updateName is not null, t.updateName, t.createName) as updateName,
         if(t.updateName is not null, t.updateName, t.createName) as updateName,
         if(t.updateTime is not null, t.updateTime, t.createTime) as updateTime,
         if(t.updateTime is not null, t.updateTime, t.createTime) as updateTime,
         t.enableIpLimit,
         t.enableIpLimit,
-        t.monitorVideoSource
+        t.monitorVideoSource,
+        t.monitorStatus
         <if test="type != null and type != '' and type == 'monitor'">
         <if test="type != null and type != '' and type == 'monitor'">
         ,group_concat(distinct tees.room_code) as roomCode,
         ,group_concat(distinct tees.room_code) as roomCode,
         group_concat(distinct tees.room_name) as roomName
         group_concat(distinct tees.room_name) as roomName

+ 3 - 0
themis-business/src/main/resources/mapper/TIeExamInvigilateCallMapper.xml

@@ -50,6 +50,8 @@
         left join t_b_exam_invigilate_user tbeiu on
         left join t_b_exam_invigilate_user tbeiu on
             tbeiu.exam_id = tieic.exam_id
             tbeiu.exam_id = tieic.exam_id
         and tbeiu.room_code = tees.room_code
         and tbeiu.room_code = tees.room_code
+        left join t_oe_exam_record toer on
+        toer.id = tieic.exam_record_id
         <where>
         <where>
             <if test="examId != null and examId != ''">
             <if test="examId != null and examId != ''">
                 and tieic.exam_id = #{examId}
                 and tieic.exam_id = #{examId}
@@ -67,5 +69,6 @@
                 and tieic.call_status = #{callStatus}
                 and tieic.call_status = #{callStatus}
             </if>
             </if>
         </where>
         </where>
+        and (toer.status <![CDATA[ <> ]]> 'FINISHED' and toer.status <![CDATA[ <> ]]> 'PERSISTED')
     </select>
     </select>
 </mapper>
 </mapper>

+ 1 - 1
themis-exam/src/main/resources/application.properties

@@ -159,7 +159,7 @@ spring.resources.static-locations=file:${sys.config.serverUpload},classpath:/MET
 prefix.url.exam=api/oe
 prefix.url.exam=api/oe
 prefix.url.mobile=api/mobile
 prefix.url.mobile=api/mobile
 
 
-wxapp.upload.url=https://mobile-test.online-exam.cn/
+wxapp.upload.url=https://mobile-test.online-exam.cn
 
 
 #\u65E0\u9700\u9274\u6743\u7684url
 #\u65E0\u9700\u9274\u6743\u7684url
 no.auth.urls=/webjars/**,/druid/**,/swagger-ui.html,/doc.html,/swagger-resources/**,/v2/api-docs,/webjars/springfox-swagger-ui/**,/api/oe/student/login,/api/oe/sys/env,/file/**,/upload/**,/client/**,/base_photo/**,/frontend/**,/api/oe/exam/short_code,/api/mobile/authorization
 no.auth.urls=/webjars/**,/druid/**,/swagger-ui.html,/doc.html,/swagger-resources/**,/v2/api-docs,/webjars/springfox-swagger-ui/**,/api/oe/student/login,/api/oe/sys/env,/file/**,/upload/**,/client/**,/base_photo/**,/frontend/**,/api/oe/exam/short_code,/api/mobile/authorization

+ 1 - 1
themis-task/src/main/java/com/qmth/themis/task/quartz/service/impl/QuartzLogicServiceImpl.java

@@ -124,7 +124,7 @@ public class QuartzLogicServiceImpl implements QuartzLogicService {
         //获取该考试批次下所有未交卷的考生的考试记录
         //获取该考试批次下所有未交卷的考生的考试记录
         if (Objects.nonNull(examRecordStatusEnum) && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum) && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum) && !Objects.equals(ExamRecordStatusEnum.ANSWERING, examRecordStatusEnum)) {
         if (Objects.nonNull(examRecordStatusEnum) && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum) && !Objects.equals(ExamRecordStatusEnum.FINISHED, examRecordStatusEnum) && !Objects.equals(ExamRecordStatusEnum.ANSWERING, examRecordStatusEnum)) {
             Long recordEndTime = ExamRecordCacheUtil.getEndTime(recordId);
             Long recordEndTime = ExamRecordCacheUtil.getEndTime(recordId);
-            if (examActivityCacheBean.getFinishTime() == recordEndTime) {
+            if (examActivityCacheBean.getFinishTime().longValue() == recordEndTime.longValue()) {
                 Integer durationSeconds = ExamRecordCacheUtil.getDurationSeconds(recordId);
                 Integer durationSeconds = ExamRecordCacheUtil.getDurationSeconds(recordId);
                 //交卷
                 //交卷
                 teExamService.finish(examStudentCacheBean.getStudentId(), recordId, FinishTypeEnum.AUTO.name(), durationSeconds);
                 teExamService.finish(examStudentCacheBean.getStudentId(), recordId, FinishTypeEnum.AUTO.name(), durationSeconds);