wangliang 4 年之前
父节点
当前提交
8e7e592171

+ 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>