From 247cb86585a1d1894596ed18a6c93efecb992946 Mon Sep 17 00:00:00 2001 From: luohairen <3399054449@qq.com> Date: 星期四, 14 十一月 2024 10:34:27 +0800 Subject: [PATCH] 班级成绩图表分析 --- src/main/java/com/ycl/jxkg/controller/student/QuestionAnswerController.java | 18 ++++++++---------- 1 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/main/java/com/ycl/jxkg/controller/student/QuestionAnswerController.java b/src/main/java/com/ycl/jxkg/controller/student/QuestionAnswerController.java index 751943d..b5ed8dc 100644 --- a/src/main/java/com/ycl/jxkg/controller/student/QuestionAnswerController.java +++ b/src/main/java/com/ycl/jxkg/controller/student/QuestionAnswerController.java @@ -2,11 +2,10 @@ import com.ycl.jxkg.base.BaseApiController; import com.ycl.jxkg.base.Result; -import com.ycl.jxkg.domain.entity.ExamPaperQuestionCustomerAnswer; +import com.ycl.jxkg.domain.entity.ExamPaperScoreDetail; import com.ycl.jxkg.domain.entity.Subject; -import com.ycl.jxkg.domain.entity.TextContent; import com.ycl.jxkg.domain.question.QuestionObject; -import com.ycl.jxkg.service.ExamPaperQuestionCustomerAnswerService; +import com.ycl.jxkg.service.ExamPaperScoreDetailService; import com.ycl.jxkg.service.QuestionService; import com.ycl.jxkg.service.SubjectService; import com.ycl.jxkg.service.TextContentService; @@ -29,7 +28,7 @@ @RequestMapping(value = "/api/student/question/answer") public class QuestionAnswerController extends BaseApiController { - private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService; + private final ExamPaperScoreDetailService examPaperScoreDetailService; private final QuestionService questionService; private final TextContentService textContentService; private final SubjectService subjectService; @@ -37,14 +36,13 @@ @RequestMapping(value = "/page", method = RequestMethod.POST) public Result<PageInfo<QuestionPageStudentResponseVO>> pageList(@RequestBody QuestionPageStudentRequestVO model) { model.setCreateUser(getCurrentUser().getId()); - PageInfo<ExamPaperQuestionCustomerAnswer> pageInfo = examPaperQuestionCustomerAnswerService.studentPage(model); + PageInfo<ExamPaperScoreDetail> pageInfo = examPaperScoreDetailService.studentPage(model); PageInfo<QuestionPageStudentResponseVO> page = PageInfoHelper.copyMap(pageInfo, q -> { Subject subject = subjectService.getById(q.getSubjectId()); QuestionPageStudentResponseVO vo = new QuestionPageStudentResponseVO(); BeanUtils.copyProperties(q, vo); vo.setCreateTime(DateTimeUtil.dateFormat(q.getCreateTime())); - TextContent textContent = textContentService.getById(q.getQuestionTextContentId()); - QuestionObject questionObject = JsonUtil.toJsonObject(textContent.getContent(), QuestionObject.class); + QuestionObject questionObject = JsonUtil.toJsonObject(q.getQuestionContent(), QuestionObject.class); String clearHtml = HtmlUtil.clear(questionObject.getTitleContent()); vo.setShortTitle(clearHtml); vo.setSubjectName(subject.getName()); @@ -57,9 +55,9 @@ @RequestMapping(value = "/select/{id}", method = RequestMethod.POST) public Result<QuestionAnswerVO> select(@PathVariable Integer id) { QuestionAnswerVO vm = new QuestionAnswerVO(); - ExamPaperQuestionCustomerAnswer examPaperQuestionCustomerAnswer = examPaperQuestionCustomerAnswerService.getById(id); - ExamPaperSubmitItemVO questionAnswerVM = examPaperQuestionCustomerAnswerService.examPaperQuestionCustomerAnswerToVM(examPaperQuestionCustomerAnswer); - QuestionEditRequestVO questionVM = questionService.getQuestionEditRequestVM(examPaperQuestionCustomerAnswer.getQuestionId()); + ExamPaperScoreDetail examPaperScoreDetail = examPaperScoreDetailService.getById(id); + ExamPaperSubmitItemVO questionAnswerVM = examPaperScoreDetailService.examPaperQuestionCustomerAnswerToVM(examPaperScoreDetail); + QuestionEditRequestVO questionVM = questionService.getQuestionEditRequestVM(examPaperScoreDetail.getQuestionId()); vm.setQuestionVM(questionVM); vm.setQuestionAnswerVM(questionAnswerVM); return Result.ok(vm); -- Gitblit v1.8.0