Explorar o código

修改待考列表查询方法,去掉无用的orgId查询参数

luoshi %!s(int64=4) %!d(string=hai) anos
pai
achega
99b2c9df2e

+ 10 - 6
themis-business/src/main/java/com/qmth/themis/business/dao/TEExamMapper.java

@@ -38,17 +38,18 @@ public interface TEExamMapper extends BaseMapper<TEExam> {
      * @param type
      * @param type
      * @return
      * @return
      */
      */
-    public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, @Param("userId") Long userId, @Param("id") Long id, @Param("code") String code, @Param("name") String name, @Param("mode") String mode, @Param("enable") Integer enable, @Param("orgId") Long orgId, @Param("type") String type);
+    public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, @Param("userId") Long userId, @Param("id") Long id,
+            @Param("code") String code, @Param("name") String name, @Param("mode") String mode,
+            @Param("enable") Integer enable, @Param("orgId") Long orgId, @Param("type") String type);
 
 
     /**
     /**
      * 获取考试待考列表
      * 获取考试待考列表
      *
      *
      * @param studentId
      * @param studentId
      * @param examId
      * @param examId
-     * @param orgId
      * @return
      * @return
      */
      */
-    public List<TEExamDto> getWaitingExam(@Param("studentId") Long studentId, @Param("examId") Long examId, @Param("orgId") Long orgId);
+    public List<TEExamDto> getWaitingExam(@Param("studentId") Long studentId, @Param("examId") Long examId);
 
 
     /**
     /**
      * 监考端获取考试批次列表
      * 监考端获取考试批次列表
@@ -67,13 +68,16 @@ public interface TEExamMapper extends BaseMapper<TEExam> {
      * @param type
      * @param type
      * @return
      * @return
      */
      */
-    public List<TEExam> examPrivilegeQuery(@Param("userId") Long userId, @Param("orgId") Long orgId, @Param("type") String type);
+    public List<TEExam> examPrivilegeQuery(@Param("userId") Long userId, @Param("orgId") Long orgId,
+            @Param("type") String type);
 
 
-    public void updateInvigilateMonitorStatus(@Param("monitorStatus") InvigilateMonitorStatusEnum monitorStatus, @Param("examId") Long examId);
+    public void updateInvigilateMonitorStatus(@Param("monitorStatus") InvigilateMonitorStatusEnum monitorStatus,
+            @Param("examId") Long examId);
 
 
     public void updateScoreStatus(@Param("scoreStatus") ScoreStatusEnum scoreStatus, @Param("examId") Long examId);
     public void updateScoreStatus(@Param("scoreStatus") ScoreStatusEnum scoreStatus, @Param("examId") Long examId);
 
 
     public void updateScoreProgress(@Param("progress") Double progress, @Param("examId") Long examId);
     public void updateScoreProgress(@Param("progress") Double progress, @Param("examId") Long examId);
 
 
-    public IPage<OpenExamBean> examQueryForOpen(IPage<OpenExamBean> iPage, @Param("id") Long id, @Param("code") String code);
+    public IPage<OpenExamBean> examQueryForOpen(IPage<OpenExamBean> iPage, @Param("id") Long id,
+            @Param("code") String code);
 }
 }

+ 9 - 9
themis-business/src/main/java/com/qmth/themis/business/service/TEExamService.java

@@ -41,17 +41,17 @@ public interface TEExamService extends IService<TEExam> {
      * @param type
      * @param type
      * @return
      * @return
      */
      */
-    public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, Long userId, Long id, String code, String name, String mode, Integer enable, Long orgId, String type);
+    public IPage<TEExamQueryDto> examQuery(IPage<Map> iPage, Long userId, Long id, String code, String name,
+            String mode, Integer enable, Long orgId, String type);
 
 
     /**
     /**
      * 获取考试待考列表
      * 获取考试待考列表
      *
      *
      * @param studentId
      * @param studentId
      * @param examId
      * @param examId
-     * @param orgId
      * @return
      * @return
      */
      */
-    public List<TEExamDto> getWaitingExam(Long studentId, Long examId, Long orgId);
+    public List<TEExamDto> getWaitingExam(Long studentId, Long examId);
 
 
     /**
     /**
      * 开始候考
      * 开始候考
@@ -94,8 +94,8 @@ public interface TEExamService extends IService<TEExam> {
      * @param durationSeconds
      * @param durationSeconds
      * @return
      * @return
      */
      */
-    public AnswerSubmitBean answerSubmit(Long studentId, Long recordId, Integer mainNumber, Integer subNumber, Integer subIndex,
-                                         String answer, Long version, Integer durationSeconds);
+    public AnswerSubmitBean answerSubmit(Long studentId, Long recordId, Integer mainNumber, Integer subNumber,
+            Integer subIndex, String answer, Long version, Integer durationSeconds);
 
 
     /**
     /**
      * 更新音频剩余播放次数
      * 更新音频剩余播放次数
@@ -106,8 +106,8 @@ public interface TEExamService extends IService<TEExam> {
      * @param count
      * @param count
      * @return
      * @return
      */
      */
-    public AudioLeftPlayCountSubmitBean audioLeftPlayCountSubmit(Long studentId, Long recordId, String key, Integer count);
-
+    public AudioLeftPlayCountSubmitBean audioLeftPlayCountSubmit(Long studentId, Long recordId, String key,
+            Integer count);
 
 
     /**
     /**
      * 文件上传
      * 文件上传
@@ -183,7 +183,8 @@ public interface TEExamService extends IService<TEExam> {
      * @param recordId
      * @param recordId
      * @param mqDto
      * @param mqDto
      */
      */
-    public void sendOeLogMessage(SystemOperationEnum systemOperationEnum, Long examStudentId, Long recordId, MqDto mqDto);
+    public void sendOeLogMessage(SystemOperationEnum systemOperationEnum, Long examStudentId, Long recordId,
+            MqDto mqDto);
 
 
     /**
     /**
      * 考试批次权限过滤
      * 考试批次权限过滤
@@ -209,5 +210,4 @@ public interface TEExamService extends IService<TEExam> {
 
 
     public IPage<OpenExamBean> examQueryForOpen(Page<OpenExamBean> ipage, Long examId, String examCode);
     public IPage<OpenExamBean> examQueryForOpen(Page<OpenExamBean> ipage, Long examId, String examCode);
 
 
-
 }
 }

+ 2 - 2
themis-business/src/main/java/com/qmth/themis/business/service/impl/TEExamServiceImpl.java

@@ -129,8 +129,8 @@ public class TEExamServiceImpl extends ServiceImpl<TEExamMapper, TEExam> impleme
      * @return
      * @return
      */
      */
     @Override
     @Override
-    public List<TEExamDto> getWaitingExam(Long studentId, Long examId, Long orgId) {
-        List<TEExamDto> list = teExamMapper.getWaitingExam(studentId, examId, orgId);
+    public List<TEExamDto> getWaitingExam(Long studentId, Long examId) {
+        List<TEExamDto> list = teExamMapper.getWaitingExam(studentId, examId);
         if (Objects.nonNull(list) && list.size() > 0) {
         if (Objects.nonNull(list) && list.size() > 0) {
             Set<Long> examActivityIds = list.stream().map(s -> s.getExamActivityId()).collect(Collectors.toSet());
             Set<Long> examActivityIds = list.stream().map(s -> s.getExamActivityId()).collect(Collectors.toSet());
             List<TEExamActivityDto> teExamActivityList = teExamActivityService
             List<TEExamActivityDto> teExamActivityList = teExamActivityService

+ 73 - 72
themis-business/src/main/resources/mapper/TEExamMapper.xml

@@ -7,7 +7,7 @@
         t.id as examId
         t.id as examId
         from
         from
         t_e_exam t
         t_e_exam t
-        <where> 1 = 1
+        <where>1 = 1
             and t.monitor_status <![CDATA[ <> ]]> 'FINISHED'
             and t.monitor_status <![CDATA[ <> ]]> 'FINISHED'
             and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
             and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
             and t.enable = 1
             and t.enable = 1
@@ -47,8 +47,8 @@
         t.monitorVideoSource,
         t.monitorVideoSource,
         t.monitorStatus
         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_name) as roomName
+            ,group_concat(distinct tees.room_code) as roomCode,
+            group_concat(distinct tees.room_name) as roomName
         </if>
         </if>
         from
         from
         (select t.id,
         (select t.id,
@@ -80,7 +80,7 @@
         where
         where
         t1.id = t.update_id) as updateName
         t1.id = t.update_id) as updateName
         from t_e_exam t
         from t_e_exam t
-        <where> 1 = 1
+        <where>1 = 1
             <if test="type != null and type != '' and type == 'monitor'">
             <if test="type != null and type != '' and type == 'monitor'">
                 and t.monitor_status <![CDATA[ <> ]]> 'FINISHED'
                 and t.monitor_status <![CDATA[ <> ]]> 'FINISHED'
                 and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
                 and t.start_time <![CDATA[ <= ]]> unix_timestamp(current_timestamp()) * 1000
@@ -116,25 +116,26 @@
             <if test="enable != null and enable != '' or enable == 0">
             <if test="enable != null and enable != '' or enable == 0">
                 and t.enable = #{enable}
                 and t.enable = #{enable}
             </if>
             </if>
-        </where> ) t
+        </where>
+        ) t
         <if test="type != null and type != '' and type == 'monitor'">
         <if test="type != null and type != '' and type == 'monitor'">
             left join t_e_exam_student tees on tees.exam_id = t.id
             left join t_e_exam_student tees on tees.exam_id = t.id
         </if>
         </if>
-            group by t.id,
-            t.code,
-            t.name,
-            t.tag,
-            t.mode,
-            t.enable,
-            t.startTime,
-            t.endTime,
-            t.progress,
-            t.updateName,
-            t.updateTime,
-            t.enableIpLimit,
-            t.monitorVideoSource,
-            t.monitorStatus
-         order by t.createTime desc
+        group by t.id,
+        t.code,
+        t.name,
+        t.tag,
+        t.mode,
+        t.enable,
+        t.startTime,
+        t.endTime,
+        t.progress,
+        t.updateName,
+        t.updateTime,
+        t.enableIpLimit,
+        t.monitorVideoSource,
+        t.monitorStatus
+        order by t.createTime desc
     </select>
     </select>
 
 
     <select id="getWaitingExam" resultType="com.qmth.themis.business.dto.response.TEExamDto">
     <select id="getWaitingExam" resultType="com.qmth.themis.business.dto.response.TEExamDto">
@@ -142,14 +143,17 @@
         t.*
         t.*
         from
         from
         (
         (
-            select
-            distinct tee.id, teea.id as examActivityId,tee.name, tee.mode, tee.pre_notice as preNotice, tee.pre_notice_stay_seconds as
-            preNoticeStaySeconds, tee.post_notice as postNotice,
-            <!--FLOOR((teea.finish_time - teea.start_time) / (24*60*60*1000)) as diffSum1,
-            FLOOR(((teea.finish_time - teea.start_time) / (24*60*60*1000) - (unix_timestamp(current_timestamp()) * 1000 - teea.start_time) / (24*60*60*1000))) as reallyTime1,-->
-            datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) as diffSum,
-            datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) -
-            datediff(now(),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) as reallyTime
+        select
+        distinct tee.id, teea.id as examActivityId,tee.name, tee.mode, tee.pre_notice as preNotice,
+        tee.pre_notice_stay_seconds as
+        preNoticeStaySeconds, tee.post_notice as postNotice,
+        <!--FLOOR((teea.finish_time - teea.start_time) / (24*60*60*1000)) as diffSum1,
+        FLOOR(((teea.finish_time - teea.start_time) / (24*60*60*1000) - (unix_timestamp(current_timestamp()) * 1000 - teea.start_time) / (24*60*60*1000))) as reallyTime1,-->
+        datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time /
+        1000,'%Y-%m-%d %H:%i:%s')) as diffSum,
+        datediff(FROM_UNIXTIME(teea.finish_time / 1000,'%Y-%m-%d %H:%i:%s'),FROM_UNIXTIME(teea.start_time /
+        1000,'%Y-%m-%d %H:%i:%s')) -
+        datediff(now(),FROM_UNIXTIME(teea.start_time / 1000,'%Y-%m-%d %H:%i:%s')) as reallyTime
         from
         from
         t_e_exam_student tees
         t_e_exam_student tees
         left join t_e_exam tee on
         left join t_e_exam tee on
@@ -163,9 +167,6 @@
             and tee.enable = 1
             and tee.enable = 1
             and teea.enable = 1
             and teea.enable = 1
             and tees.enable = 1
             and tees.enable = 1
-            <if test="orgId != null and orgId != ''">
-                and tee.org_id = #{orgId}
-            </if>
             <if test="examId != null and examId != ''">
             <if test="examId != null and examId != ''">
                 and tee.id = #{examId}
                 and tee.id = #{examId}
             </if>
             </if>
@@ -185,55 +186,55 @@
         from
         from
         t_e_exam tee
         t_e_exam tee
         where
         where
-            EXISTS(
-            select
-                DISTINCT tbeiu.exam_id
-            from
-                t_b_exam_invigilate_user tbeiu
-            left join t_e_exam_student tees on
-                tees.room_code = tbeiu.room_code
-            <where> 1 = 1
-                <if test="userId != null and userId != ''">
-                    and tbeiu.user_id = #{userId}
-                </if>
-                <if test="orgId != null and orgId != ''">
-                    and tee.org_id = #{orgId}
-                </if>
-                <if test="type != null and type != '' and type == 'monitor'">
-                    and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
-                </if>
-                and tee.id = tbeiu.exam_id
-            </where>
-                )
-            order by tee.create_time desc
-        </select>
+        EXISTS(
+        select
+        DISTINCT tbeiu.exam_id
+        from
+        t_b_exam_invigilate_user tbeiu
+        left join t_e_exam_student tees on
+        tees.room_code = tbeiu.room_code
+        <where>1 = 1
+            <if test="userId != null and userId != ''">
+                and tbeiu.user_id = #{userId}
+            </if>
+            <if test="orgId != null and orgId != ''">
+                and tee.org_id = #{orgId}
+            </if>
+            <if test="type != null and type != '' and type == 'monitor'">
+                and tee.monitor_status <![CDATA[ <> ]]> 'FINISHED'
+            </if>
+            and tee.id = tbeiu.exam_id
+        </where>
+        )
+        order by tee.create_time desc
+    </select>
 
 
     <update id="updateInvigilateMonitorStatus">
     <update id="updateInvigilateMonitorStatus">
     	update t_e_exam set monitor_status=#{monitorStatus} where id=#{examId}
     	update t_e_exam set monitor_status=#{monitorStatus} where id=#{examId}
     </update>
     </update>
-    
+
     <update id="updateScoreStatus">
     <update id="updateScoreStatus">
     	update t_e_exam set score_status=#{scoreStatus} where id=#{examId}
     	update t_e_exam set score_status=#{scoreStatus} where id=#{examId}
     </update>
     </update>
-    
+
     <select id="examQueryForOpen" resultType="com.qmth.themis.business.bean.backend.OpenExamBean">
     <select id="examQueryForOpen" resultType="com.qmth.themis.business.bean.backend.OpenExamBean">
-    	SELECT
-			t.id,
-			t. CODE,
-			t. NAME,
-			t.tag,
-			t. MODE,
-			t.start_time startTime,
-			t.end_time endTime
-		FROM
-			t_e_exam t
-		WHERE t.enable=1
-		<if test="id != null">
-		AND	t.id = #{id}
-		</if>
-		<if test="code != null and code !='' ">
-		AND t.code = #{code}
-		</if>
+        SELECT
+        t.id,
+        t. CODE,
+        t. NAME,
+        t.tag,
+        t. MODE,
+        t.start_time startTime,
+        t.end_time endTime
+        FROM
+        t_e_exam t
+        WHERE t.enable=1
+        <if test="id != null">
+            AND t.id = #{id}
+        </if>
+        <if test="code != null and code !='' ">
+            AND t.code = #{code}
+        </if>
     </select>
     </select>
     <update id="updateScoreProgress">
     <update id="updateScoreProgress">
     	update t_e_exam set progress=#{progress} where id=#{examId}
     	update t_e_exam set progress=#{progress} where id=#{examId}

+ 39 - 33
themis-exam/src/main/java/com/qmth/themis/exam/api/TEExamController.java

@@ -52,10 +52,9 @@ public class TEExamController {
 
 
     @ApiOperation(value = "验证考试口令接口")
     @ApiOperation(value = "验证考试口令接口")
     @RequestMapping(value = "/short_code", method = RequestMethod.POST)
     @RequestMapping(value = "/short_code", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "考试信息", response = TEExam.class)})
+    @ApiResponses({ @ApiResponse(code = 200, message = "考试信息", response = TEExam.class) })
     public Result shortCode(@ApiJsonObject(name = "shortCode", value = {
     public Result shortCode(@ApiJsonObject(name = "shortCode", value = {
-            @ApiJsonProperty(key = "shortCode", description = "考试口令")
-    }) @ApiParam(value = "考试口令", required = true) @RequestBody Map<String, Object> mapParameter) {
+            @ApiJsonProperty(key = "shortCode", description = "考试口令") }) @ApiParam(value = "考试口令", required = true) @RequestBody Map<String, Object> mapParameter) {
         if (Objects.isNull(mapParameter.get("shortCode")) || Objects.equals(mapParameter.get("shortCode"), "")) {
         if (Objects.isNull(mapParameter.get("shortCode")) || Objects.equals(mapParameter.get("shortCode"), "")) {
             throw new BusinessException(ExceptionResultEnum.SHORT_CODE_IS_NULL);
             throw new BusinessException(ExceptionResultEnum.SHORT_CODE_IS_NULL);
         }
         }
@@ -74,19 +73,20 @@ public class TEExamController {
 
 
     @ApiOperation(value = "获取待考列表接口")
     @ApiOperation(value = "获取待考列表接口")
     @RequestMapping(value = "/waiting", method = RequestMethod.POST)
     @RequestMapping(value = "/waiting", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "考试列表", response = TEExamDto.class)})
+    @ApiResponses({ @ApiResponse(code = 200, message = "考试列表", response = TEExamDto.class) })
     public Result waiting(@ApiJsonObject(name = "examWaiting", value = {
     public Result waiting(@ApiJsonObject(name = "examWaiting", value = {
-            @ApiJsonProperty(key = "examId", type = "long", example = "1", description = "批次id")
-    }) @ApiParam(value = "考试口令", required = true) @RequestBody Map<String, Object> mapParameter) {
-        Long examId = Objects.nonNull(mapParameter.get("examId")) ? Long.parseLong(String.valueOf(mapParameter.get("examId"))) : null;
+            @ApiJsonProperty(key = "examId", type = "long", example = "1", description = "批次id") }) @ApiParam(value = "考试口令", required = true) @RequestBody Map<String, Object> mapParameter) {
+        Long examId = Objects.nonNull(mapParameter.get("examId")) ?
+                Long.parseLong(String.valueOf(mapParameter.get("examId"))) :
+                null;
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
-        List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), examId, teStudent.getOrgId());
+        List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), examId);
         return ResultUtil.ok(Collections.singletonMap("waiting", list));
         return ResultUtil.ok(Collections.singletonMap("waiting", list));
     }
     }
 
 
     @ApiOperation(value = "开始候考")
     @ApiOperation(value = "开始候考")
     @RequestMapping(value = "/prepare", method = RequestMethod.POST)
     @RequestMapping(value = "/prepare", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
+    @ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
     public Result prepare(@RequestBody PrepareParamBean param) {
     public Result prepare(@RequestBody PrepareParamBean param) {
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
         String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
@@ -106,10 +106,9 @@ public class TEExamController {
 
 
     @ApiOperation(value = "候考/答题状态退出")
     @ApiOperation(value = "候考/答题状态退出")
     @RequestMapping(value = "/exit", method = RequestMethod.POST)
     @RequestMapping(value = "/exit", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class)})
+    @ApiResponses({ @ApiResponse(code = 200, message = "{\"success\":true}", response = Result.class) })
     public Result exit(@ApiJsonObject(name = "saveInvigilateUser", value = {
     public Result exit(@ApiJsonObject(name = "saveInvigilateUser", value = {
-            @ApiJsonProperty(key = "recordId", type = "long", example = "1", description = "考试记录id", required = true)
-    }) @ApiParam(value = "考试记录id", required = true) @RequestBody Map<String, Object> mapParameter) {
+            @ApiJsonProperty(key = "recordId", type = "long", example = "1", description = "考试记录id", required = true) }) @ApiParam(value = "考试记录id", required = true) @RequestBody Map<String, Object> mapParameter) {
         if (Objects.isNull(mapParameter.get("recordId")) || Objects.equals(mapParameter.get("recordId"), "")) {
         if (Objects.isNull(mapParameter.get("recordId")) || Objects.equals(mapParameter.get("recordId"), "")) {
             throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
             throw new BusinessException(ExceptionResultEnum.RECORD_ID_IS_NULL);
         }
         }
@@ -135,7 +134,7 @@ public class TEExamController {
 
 
     @ApiOperation(value = "开始考试")
     @ApiOperation(value = "开始考试")
     @RequestMapping(value = "/start", method = RequestMethod.POST)
     @RequestMapping(value = "/start", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
+    @ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
     public Result start(@RequestBody ExamStartParamBean param) {
     public Result start(@RequestBody ExamStartParamBean param) {
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
         String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
@@ -152,19 +151,25 @@ public class TEExamController {
                 Long breakId = ExamRecordCacheUtil.getLastBreakId(param.getRecordId());
                 Long breakId = ExamRecordCacheUtil.getLastBreakId(param.getRecordId());
                 if (Objects.nonNull(breakId)) {
                 if (Objects.nonNull(breakId)) {
                     JSONObject jsonObject = JSONObject.parseObject(param.getReason());
                     JSONObject jsonObject = JSONObject.parseObject(param.getReason());
-                    ExceptionEnum exceptionEnum = ExceptionEnum.valueOf(ExceptionEnum.convertToName(String.valueOf(jsonObject.get("type"))));
+                    ExceptionEnum exceptionEnum = ExceptionEnum
+                            .valueOf(ExceptionEnum.convertToName(String.valueOf(jsonObject.get("type"))));
                     String reason = String.valueOf(jsonObject.get("reason"));
                     String reason = String.valueOf(jsonObject.get("reason"));
                     ExamBreakCacheUtil.setBreakReason(breakId, exceptionEnum);
                     ExamBreakCacheUtil.setBreakReason(breakId, exceptionEnum);
                     ExamBreakCacheUtil.setResumeReason(breakId, reason);
                     ExamBreakCacheUtil.setResumeReason(breakId, reason);
                     //考试断点异常原因 发送mq start
                     //考试断点异常原因 发送mq start
-                    MqDto mqDto = new MqDto(MqTopicEnum.THEMIS_TOPIC.getCode(), MqTagEnum.EXCEPTION_LOG.name(), JacksonUtil.parseJson(param), MqTagEnum.EXCEPTION_LOG, String.valueOf(param.getRecordId()), param.getReason());
+                    MqDto mqDto = new MqDto(MqTopicEnum.THEMIS_TOPIC.getCode(), MqTagEnum.EXCEPTION_LOG.name(),
+                            JacksonUtil.parseJson(param), MqTagEnum.EXCEPTION_LOG, String.valueOf(param.getRecordId()),
+                            param.getReason());
                     mqDtoService.assembleSendOneWayMsg(mqDto);
                     mqDtoService.assembleSendOneWayMsg(mqDto);
                     //考试断点异常原因 发送mq end
                     //考试断点异常原因 发送mq end
                 }
                 }
             } else {
             } else {
                 //mq发送消息start
                 //mq发送消息start
-                MqDto mqDto = new MqDto(MqTopicEnum.THEMIS_TOPIC.getCode(), MqTagEnum.STUDENT.name(), SystemOperationEnum.ANSWERING, MqTagEnum.STUDENT, String.valueOf(teStudent.getId()), teStudent.getIdentity());
-                teExamService.sendOeLogMessage(SystemOperationEnum.ANSWERING, ExamRecordCacheUtil.getExamStudentId(param.getRecordId()), param.getRecordId(), mqDto);
+                MqDto mqDto = new MqDto(MqTopicEnum.THEMIS_TOPIC.getCode(), MqTagEnum.STUDENT.name(),
+                        SystemOperationEnum.ANSWERING, MqTagEnum.STUDENT, String.valueOf(teStudent.getId()),
+                        teStudent.getIdentity());
+                teExamService.sendOeLogMessage(SystemOperationEnum.ANSWERING,
+                        ExamRecordCacheUtil.getExamStudentId(param.getRecordId()), param.getRecordId(), mqDto);
                 //mq发送消息end
                 //mq发送消息end
             }
             }
             ExamConstant.sendExamStartMsg(param.getRecordId());
             ExamConstant.sendExamStartMsg(param.getRecordId());
@@ -176,7 +181,7 @@ public class TEExamController {
 
 
     @ApiOperation(value = "上传个人试卷结构")
     @ApiOperation(value = "上传个人试卷结构")
     @RequestMapping(value = "/student_paper_struct/upload", method = RequestMethod.POST)
     @RequestMapping(value = "/student_paper_struct/upload", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
+    @ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
     public Result studentPaperStruct(@RequestBody StudentPaperStructParamBean param) {
     public Result studentPaperStruct(@RequestBody StudentPaperStructParamBean param) {
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         if (param.getRecordId() == null) {
         if (param.getRecordId() == null) {
@@ -191,7 +196,7 @@ public class TEExamController {
 
 
     @ApiOperation(value = "提交作答结果")
     @ApiOperation(value = "提交作答结果")
     @RequestMapping(value = "/answer/submit", method = RequestMethod.POST)
     @RequestMapping(value = "/answer/submit", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
+    @ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
     public Result answerSubmit(@RequestBody AnswerSubmitParamBean param) {
     public Result answerSubmit(@RequestBody AnswerSubmitParamBean param) {
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         if (param.getRecordId() == null) {
         if (param.getRecordId() == null) {
@@ -209,15 +214,15 @@ public class TEExamController {
         if (param.getVersion() == null) {
         if (param.getVersion() == null) {
             throw new BusinessException("时间戳不能为空");
             throw new BusinessException("时间戳不能为空");
         }
         }
-        AnswerSubmitBean ret = teExamService.answerSubmit(teStudent.getId(), param.getRecordId(), param.getMainNumber(),
-                param.getSubNumber(), param.getSubIndex(), param.getAnswer(), param.getVersion(),
-                param.getDurationSeconds());
+        AnswerSubmitBean ret = teExamService
+                .answerSubmit(teStudent.getId(), param.getRecordId(), param.getMainNumber(), param.getSubNumber(),
+                        param.getSubIndex(), param.getAnswer(), param.getVersion(), param.getDurationSeconds());
         return ResultUtil.ok(ret);
         return ResultUtil.ok(ret);
     }
     }
 
 
     @ApiOperation(value = "更新音频剩余播放次数")
     @ApiOperation(value = "更新音频剩余播放次数")
     @RequestMapping(value = "/audio_left_play_count/submit", method = RequestMethod.POST)
     @RequestMapping(value = "/audio_left_play_count/submit", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
+    @ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
     public Result audioLeftPlayCountSubmit(@RequestBody AudioLeftPlayCountSubmitParamBean param) {
     public Result audioLeftPlayCountSubmit(@RequestBody AudioLeftPlayCountSubmitParamBean param) {
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         if (param.getRecordId() == null) {
         if (param.getRecordId() == null) {
@@ -229,23 +234,24 @@ public class TEExamController {
         if (param.getCount() == null) {
         if (param.getCount() == null) {
             throw new BusinessException("剩余播放次数不能为空");
             throw new BusinessException("剩余播放次数不能为空");
         }
         }
-        return ResultUtil.ok(teExamService.audioLeftPlayCountSubmit(teStudent.getId(), param.getRecordId(), param.getKey(), param.getCount()));
+        return ResultUtil.ok(teExamService
+                .audioLeftPlayCountSubmit(teStudent.getId(), param.getRecordId(), param.getKey(), param.getCount()));
     }
     }
 
 
     @ApiOperation(value = "文件上传")
     @ApiOperation(value = "文件上传")
     @RequestMapping(value = "/file/upload", method = RequestMethod.POST)
     @RequestMapping(value = "/file/upload", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
+    @ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
     public Result fileUpload(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId,
     public Result fileUpload(@ApiParam(value = "考试记录ID", required = true) @RequestParam Long recordId,
-                             @ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
-                             @ApiParam(value = "后缀名", required = true) @RequestParam String suffix,
-                             @ApiParam(value = "md5", required = true) @RequestParam String md5) {
+            @ApiParam(value = "上传文件", required = true) @RequestParam MultipartFile file,
+            @ApiParam(value = "后缀名", required = true) @RequestParam String suffix,
+            @ApiParam(value = "md5", required = true) @RequestParam String md5) {
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         return ResultUtil.ok(teExamService.fileUpload(teStudent.getId(), recordId, file, suffix, md5));
         return ResultUtil.ok(teExamService.fileUpload(teStudent.getId(), recordId, file, suffix, md5));
     }
     }
 
 
     @ApiOperation(value = "断点恢复")
     @ApiOperation(value = "断点恢复")
     @RequestMapping(value = "/resume", method = RequestMethod.POST)
     @RequestMapping(value = "/resume", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
+    @ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
     public Result resume(@RequestBody ResumeParamBean param) {
     public Result resume(@RequestBody ResumeParamBean param) {
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
         String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
@@ -265,7 +271,7 @@ public class TEExamController {
 
 
     @ApiOperation(value = "结束考试")
     @ApiOperation(value = "结束考试")
     @RequestMapping(value = "/finish", method = RequestMethod.POST)
     @RequestMapping(value = "/finish", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
+    @ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
     public Result finish(@RequestBody FinishParamBean param) {
     public Result finish(@RequestBody FinishParamBean param) {
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         TEStudentCacheDto teStudent = (TEStudentCacheDto) ServletUtil.getRequestStudentAccount();
         String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
         String lockKey = SystemConstant.REDIS_LOCK_STUDENT_PREFIX + teStudent.getId();
@@ -283,7 +289,8 @@ public class TEExamController {
             if (param.getDurationSeconds() == null) {
             if (param.getDurationSeconds() == null) {
                 throw new BusinessException("总用时秒数不能为空");
                 throw new BusinessException("总用时秒数不能为空");
             }
             }
-            Result re = ResultUtil.ok(teExamService.finish(teStudent.getId(), param.getRecordId(), param.getType(), param.getDurationSeconds()));
+            Result re = ResultUtil.ok(teExamService
+                    .finish(teStudent.getId(), param.getRecordId(), param.getType(), param.getDurationSeconds()));
             ExamConstant.sendExamStopMsg(param.getRecordId(), false);
             ExamConstant.sendExamStopMsg(param.getRecordId(), false);
             return re;
             return re;
         } finally {
         } finally {
@@ -291,10 +298,9 @@ public class TEExamController {
         }
         }
     }
     }
 
 
-
     @ApiOperation(value = "查询交卷结果")
     @ApiOperation(value = "查询交卷结果")
     @RequestMapping(value = "/result", method = RequestMethod.POST)
     @RequestMapping(value = "/result", method = RequestMethod.POST)
-    @ApiResponses({@ApiResponse(code = 200, message = "试卷信息")})
+    @ApiResponses({ @ApiResponse(code = 200, message = "试卷信息") })
     public Result result(@RequestBody ResultParamBean param) {
     public Result result(@RequestBody ResultParamBean param) {
         if (param.getRecordId() == null) {
         if (param.getRecordId() == null) {
             throw new BusinessException("考试记录id不能为空");
             throw new BusinessException("考试记录id不能为空");

+ 2 - 3
themis-exam/src/main/java/com/qmth/themis/exam/api/TEStudentController.java

@@ -234,7 +234,7 @@ public class TEStudentController {
         //获取未完考试
         //获取未完考试
         if (Objects.isNull(ExamingDataCacheUtil.getUnFinishedRecordId(teStudent.getId()))) {
         if (Objects.isNull(ExamingDataCacheUtil.getUnFinishedRecordId(teStudent.getId()))) {
             //获取待考列表
             //获取待考列表
-            List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), examId, orgId);
+            List<TEExamDto> list = teExamService.getWaitingExam(teStudent.getId(), examId);
             if (Objects.nonNull(list) && list.size() > 0) {
             if (Objects.nonNull(list) && list.size() > 0) {
                 map.put("waiting", list);
                 map.put("waiting", list);
             }
             }
@@ -278,7 +278,6 @@ public class TEStudentController {
         TEConfig teConfig = teConfigService.getGlobalConfig();
         TEConfig teConfig = teConfigService.getGlobalConfig();
         map.put(SystemConstant.ACCESS_TOKEN, token);
         map.put(SystemConstant.ACCESS_TOKEN, token);
         map.put(SystemConstant.GLOBAL, teConfig);
         map.put(SystemConstant.GLOBAL, teConfig);
-        //        map.put(SystemConstant.ACCESS_TOKEN, test);
         map.put(SystemConstant.STUDENT_ACCOUNT, teStudent);
         map.put(SystemConstant.STUDENT_ACCOUNT, teStudent);
         map.put(SystemConstant.SESSION_ID, sessionId);
         map.put(SystemConstant.SESSION_ID, sessionId);
         return ResultUtil.ok(map);
         return ResultUtil.ok(map);
@@ -355,7 +354,7 @@ public class TEStudentController {
      * @return
      * @return
      */
      */
     private Map<String, Object> getWaitList(Long studentId, Long examId, Long orgId, Map<String, Object> map) {
     private Map<String, Object> getWaitList(Long studentId, Long examId, Long orgId, Map<String, Object> map) {
-        List<TEExamDto> list = teExamService.getWaitingExam(studentId, examId, orgId);
+        List<TEExamDto> list = teExamService.getWaitingExam(studentId, examId);
         if (Objects.nonNull(list) && list.size() > 0) {
         if (Objects.nonNull(list) && list.size() > 0) {
             map.put("waiting", list);
             map.put("waiting", list);
         }
         }