"...git@gitlab.ruzhoukj.com:wujipeng/practical_train.git" did not exist on "2c66995a3107b4cdb3e6df1c5d1b82b81effb3d2"
Commit 2b2a6b71 authored by wujipeng's avatar wujipeng
Browse files

学生端-学习中心-详情-我的成绩-题目导航

parent 11716202
...@@ -30,4 +30,7 @@ public class TheoreticalPaperStudentDetailVO extends TheoreticalPaperStudentDeta ...@@ -30,4 +30,7 @@ public class TheoreticalPaperStudentDetailVO extends TheoreticalPaperStudentDeta
@ApiModelProperty("该题型得分") @ApiModelProperty("该题型得分")
private Double sameScore; private Double sameScore;
@ApiModelProperty("结果描述")
private String resultDesc;
} }
...@@ -137,4 +137,10 @@ public class ExamController extends BaseController { ...@@ -137,4 +137,10 @@ public class ExamController extends BaseController {
public Result<ExamStudentVO> gradesStatistics(@PathVariable(name = "id") String id) { public Result<ExamStudentVO> gradesStatistics(@PathVariable(name = "id") String id) {
return Result.data(examService.gradesStatistics(id)); return Result.data(examService.gradesStatistics(id));
} }
@ApiOperation(value = "学生端-学习中心-详情-我的成绩-题目导航")
@GetMapping("/grades/navigation/{id}")
public Result<List<TheoreticalPaperStudentDetailVO>> gradesNavigation(@PathVariable(name = "id") String id) {
return Result.data(examService.gradesNavigation(id));
}
} }
...@@ -25,4 +25,7 @@ public interface TheoreticalPaperStudentDetailMapper extends BaseMapper<Theoreti ...@@ -25,4 +25,7 @@ public interface TheoreticalPaperStudentDetailMapper extends BaseMapper<Theoreti
TheoreticalPaperStudentDetailVO gradesQuestionDetail(@Param("id") String id); TheoreticalPaperStudentDetailVO gradesQuestionDetail(@Param("id") String id);
Boolean leaveBlank(TheoreticalPaperStudentDetailDTO theoreticalPaperStudentDetailDTO); Boolean leaveBlank(TheoreticalPaperStudentDetailDTO theoreticalPaperStudentDetailDTO);
List<TheoreticalPaperStudentDetailVO> gradesNavigation(@Param("examId") int examId, @Param("studentId") String studentId);
} }
...@@ -53,4 +53,6 @@ public interface ExamService extends IService<ExamEntity> { ...@@ -53,4 +53,6 @@ public interface ExamService extends IService<ExamEntity> {
ExamStudentVO gradesStatistics(String id); ExamStudentVO gradesStatistics(String id);
List<TheoreticalPaperStudentDetailVO> gradesNavigation(String id);
} }
...@@ -20,6 +20,9 @@ public interface TheoreticalPaperStudentDetailService extends IService<Theoretic ...@@ -20,6 +20,9 @@ public interface TheoreticalPaperStudentDetailService extends IService<Theoretic
TheoreticalPaperStudentDetailVO questionDetail(String id); TheoreticalPaperStudentDetailVO questionDetail(String id);
TheoreticalPaperStudentDetailVO gradesQuestionDetail(String id); TheoreticalPaperStudentDetailVO gradesQuestionDetail(String id);
Boolean leaveBlank(TheoreticalPaperStudentDetailDTO theoreticalPaperStudentDetailDTO); Boolean leaveBlank(TheoreticalPaperStudentDetailDTO theoreticalPaperStudentDetailDTO);
List<TheoreticalPaperStudentDetailVO> gradesNavigation(int examId, String studentId);
} }
...@@ -441,6 +441,25 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, ExamEntity> impleme ...@@ -441,6 +441,25 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, ExamEntity> impleme
return result; return result;
} }
@Override
public List<TheoreticalPaperStudentDetailVO> gradesNavigation(String id) {
//获取考试基础信息
ExamStudentEntity examStudent = examStudentService.getById(id);
List<TheoreticalPaperStudentDetailVO> result = theoreticalPaperStudentDetailService.gradesNavigation(examStudent.getExamId(), examStudent.getStudentId());
for (TheoreticalPaperStudentDetailVO theoreticalPaperStudentDetailVO : result) {
if (theoreticalPaperStudentDetailVO.getIsPartiallyRight()) {
theoreticalPaperStudentDetailVO.setResultDesc("部分对");
} else {
if(theoreticalPaperStudentDetailVO.getResult()){
theoreticalPaperStudentDetailVO.setResultDesc("答对");
} else {
theoreticalPaperStudentDetailVO.setResultDesc("答错");
}
}
}
return result;
}
private static Double judgeExamResult(ExamStudentVO result) { private static Double judgeExamResult(ExamStudentVO result) {
Double score = result.getScore(); Double score = result.getScore();
if (score != null) { if (score != null) {
......
...@@ -38,4 +38,9 @@ public class TheoreticalPaperStudentDetailServiceImpl extends ServiceImpl<Theore ...@@ -38,4 +38,9 @@ public class TheoreticalPaperStudentDetailServiceImpl extends ServiceImpl<Theore
public Boolean leaveBlank(TheoreticalPaperStudentDetailDTO theoreticalPaperStudentDetailDTO) { public Boolean leaveBlank(TheoreticalPaperStudentDetailDTO theoreticalPaperStudentDetailDTO) {
return baseMapper.leaveBlank(theoreticalPaperStudentDetailDTO); return baseMapper.leaveBlank(theoreticalPaperStudentDetailDTO);
} }
@Override
public List<TheoreticalPaperStudentDetailVO> gradesNavigation(int examId, String studentId) {
return baseMapper.gradesNavigation(examId, studentId);
}
} }
...@@ -54,6 +54,18 @@ ...@@ -54,6 +54,18 @@
where where
id = #{id} id = #{id}
</select> </select>
<select id="gradesNavigation" resultType="com.platform.business.model.vo.TheoreticalPaperStudentDetailVO">
SELECT
id,
is_partially_right as isPartiallyRight,
result
FROM
theoretical_paper_student_detail
WHERE
student_id = #{studentId}
AND
exam_id = #{examId}
</select>
<update id="leaveBlank"> <update id="leaveBlank">
update update
theoretical_paper_student_detail theoretical_paper_student_detail
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment