From d0ebd33f5e4fdbff1f58a1af137d45b405366399 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期五, 28 六月 2024 16:00:03 +0800 Subject: [PATCH] rabbitmq --- src/main/java/com/ycl/jxkg/service/impl/ExamServiceImpl.java | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/ycl/jxkg/service/impl/ExamServiceImpl.java b/src/main/java/com/ycl/jxkg/service/impl/ExamServiceImpl.java index f5009c6..ce84882 100644 --- a/src/main/java/com/ycl/jxkg/service/impl/ExamServiceImpl.java +++ b/src/main/java/com/ycl/jxkg/service/impl/ExamServiceImpl.java @@ -19,6 +19,7 @@ import com.ycl.jxkg.domain.question.QuestionObject; import com.ycl.jxkg.domain.vo.*; import com.ycl.jxkg.enums.ExamPaperTypeEnum; +import com.ycl.jxkg.enums.QuestionTypeEnum; import com.ycl.jxkg.enums.WebsocketCommendEnum; import com.ycl.jxkg.enums.general.ExamStatusEnum; import com.ycl.jxkg.enums.general.ExamSubmitTempStatusEnum; @@ -165,6 +166,20 @@ if (Objects.isNull(examPaper)) { throw new RuntimeException("璇曞嵎涓嶅瓨鍦�"); } + // 濡傛灉宸茬粡鍙傚姞杩囪�冭瘯锛岀洿鎺ヨ繑鍥炴暟鎹� + ExamSubmitTemp hasJoin = new LambdaQueryChainWrapper<>(examSubmitTempMapper) + .eq(ExamSubmitTemp::getExamId, id) + .eq(ExamSubmitTemp::getUserId, webContext.getCurrentUser().getId()) + .one(); + if (Objects.nonNull(hasJoin)) { + StartExamVO startExamVO = new StartExamVO(); + startExamVO.setExamName(exam.getExamName()); + startExamVO.setId(hasJoin.getExamId()); + startExamVO.setTitleList(JSON.parseArray(hasJoin.getExamSubmit(), PaperFixQuestionVO.class)); + startExamVO.setSuggestTime(examPaper.getSuggestTime()); + startExamVO.setDoTime(hasJoin.getDoTime()); + return Result.ok(startExamVO); + } // 灏嗛鐩浆鎹负鍙复鏃朵繚瀛樼殑棰樼洰缁撴瀯銆傚浐瀹氳瘯鍗峰拰闅忓簭璇曞嵎鐨勯鐩槸鐩存帴淇濆瓨鍒癱ontent瀛楁鐨� if (ExamPaperTypeEnum.Fixed.getCode().equals(examPaper.getPaperType()) || ExamPaperTypeEnum.RandomOrder.getCode().equals(examPaper.getPaperType())) { @@ -246,6 +261,12 @@ DoQuestionVO doQuestionVO = new DoQuestionVO(); doQuestionVO.setTitle(question.getTitle()); doQuestionVO.setQuestionType(item.getQuestionType()); + // 濉┖棰橀渶瑕佹姽闄ontent(鍥犱负鏄瓟妗�) + if (QuestionTypeEnum.GapFilling.getCode().equals(doQuestionVO.getQuestionType())) { + question.getItems().stream().forEach(option -> { + option.setContent(""); + }); + } doQuestionVO.setQuestionItemList(question.getItems()); doQuestionVO.setId(question.getId()); doQuestionVO.setOriginalFile(question.getOriginalFile()); -- Gitblit v1.8.0