feat(exam): 新增词条结果详情查看功能
- 新增后端接口获取指定试卷词条判定结果详情 - 新增前端API调用对应接口 - 在上传结果列表页面点击表格行可弹出详情弹窗 - 新建ExamWordsDetailCard组件展示详细信息 - 显示正确词条和错误词条列表及相关统计信息 - 完善后端数据层及服务层支持详情查询功能
This commit is contained in:
@@ -8,9 +8,7 @@ import com.yinlihupo.enlish.service.domain.dataobject.ExamWordsDO;
|
||||
import com.yinlihupo.enlish.service.domain.dataobject.ExamWordsJudgeResultDO;
|
||||
import com.yinlihupo.enlish.service.domain.dataobject.VocabularyBankDO;
|
||||
import com.yinlihupo.enlish.service.model.bo.Word;
|
||||
import com.yinlihupo.enlish.service.model.vo.exam.ExamWordsResultReqVO;
|
||||
import com.yinlihupo.enlish.service.model.vo.exam.ExamWordsResultRspVO;
|
||||
import com.yinlihupo.enlish.service.model.vo.exam.GenerateExamWordsReqVO;
|
||||
import com.yinlihupo.enlish.service.model.vo.exam.*;
|
||||
import com.yinlihupo.enlish.service.service.ExamWordsJudgeService;
|
||||
import com.yinlihupo.enlish.service.service.ExamWordsService;
|
||||
import com.yinlihupo.enlish.service.service.VocabularyService;
|
||||
@@ -142,4 +140,25 @@ public class ExamWordsController {
|
||||
).toList();
|
||||
return PageResponse.success(list, page, total, size);
|
||||
}
|
||||
|
||||
@PostMapping("detail")
|
||||
@ApiOperationLog(description = "获取试卷结果详情")
|
||||
Response<ExamWordsDetailResultRspVO> getExamWordsResultDetail(@RequestBody ExamWordsDetailResultReqVO examWordsDetailResultReqVO) {
|
||||
Integer id = examWordsDetailResultReqVO.getId();
|
||||
ExamWordsJudgeResultDO examWordsJudgeResultDO = examWordsJudgeService.getExamWordsJudgeResultDOById(id);
|
||||
ExamWordsDetailResultRspVO examWordsDetailResultRspVO = ExamWordsDetailResultRspVO.builder()
|
||||
.id(id)
|
||||
.studentId(examWordsJudgeResultDO.getStudentId())
|
||||
.examWordsId(examWordsJudgeResultDO.getExamWordsId())
|
||||
.startDate(examWordsJudgeResultDO.getStartDate())
|
||||
.correctWordCount(examWordsJudgeResultDO.getCorrectWordCount())
|
||||
.wrongWordCount(examWordsJudgeResultDO.getWrongWordCount())
|
||||
.isFinished(examWordsJudgeResultDO.getIsFinished())
|
||||
.errorMsg(examWordsJudgeResultDO.getErrorMsg())
|
||||
.correctWordIds(examWordsJudgeResultDO.getCorrectWordIds())
|
||||
.wrongWordIds(examWordsJudgeResultDO.getWrongWordIds())
|
||||
.build();
|
||||
|
||||
return Response.success(examWordsDetailResultRspVO);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,4 +18,6 @@ public interface ExamWordsJudgeResultDOMapper {
|
||||
List<ExamWordsJudgeResultDO> selectByPage(@Param("startIndex") Integer startIndex, @Param("pageSize") Integer pageSize);
|
||||
|
||||
Integer selectCount();
|
||||
|
||||
ExamWordsJudgeResultDO selectDetailById(@Param("id") Integer id);
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.yinlihupo.enlish.service.model.vo.exam;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Builder
|
||||
public class ExamWordsDetailResultReqVO {
|
||||
private Integer id;
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.yinlihupo.enlish.service.model.vo.exam;
|
||||
|
||||
import lombok.*;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Data
|
||||
@Builder
|
||||
public class ExamWordsDetailResultRspVO {
|
||||
private Integer id;
|
||||
|
||||
private String ansSheetPath;
|
||||
|
||||
private Integer studentId;
|
||||
|
||||
private Integer examWordsId;
|
||||
|
||||
private Integer correctWordCount;
|
||||
|
||||
private Integer wrongWordCount;
|
||||
|
||||
private Integer isFinished;
|
||||
|
||||
private LocalDateTime startDate;
|
||||
|
||||
private List<Integer> correctWordIds;
|
||||
|
||||
private List<Integer> wrongWordIds;
|
||||
|
||||
private String errorMsg;
|
||||
}
|
||||
@@ -11,4 +11,6 @@ public interface ExamWordsJudgeService {
|
||||
List<ExamWordsJudgeResultDO> getExamWordsJudgeResult(Integer page, Integer pageSize);
|
||||
|
||||
Integer getExamWordsJudgeResultCount();
|
||||
|
||||
ExamWordsJudgeResultDO getExamWordsJudgeResultDOById(Integer id);
|
||||
}
|
||||
|
||||
@@ -139,4 +139,9 @@ public class ExamWordsJudgeServiceImpl implements ExamWordsJudgeService {
|
||||
public Integer getExamWordsJudgeResultCount() {
|
||||
return examWordsJudgeResultDOMapper.selectCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public ExamWordsJudgeResultDO getExamWordsJudgeResultDOById(Integer id) {
|
||||
return examWordsJudgeResultDOMapper.selectDetailById(id);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,5 +61,10 @@
|
||||
select count(1)
|
||||
from exam_words_judge_result
|
||||
</select>
|
||||
<select id="selectDetailById" resultMap="ResultMapWithBLOBs">
|
||||
select *
|
||||
from exam_words_judge_result
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user