"...java/com/git@gitlab.ruzhoukj.com:wujipeng/integration.git" did not exist on "42f628f311eddbd1ebfd93ec0913d5febdf10440"
Commit 21b28131 authored by wujipeng's avatar wujipeng
Browse files

考试中心-我的成绩-成绩分析

parent 23fb5ade
...@@ -48,7 +48,7 @@ public class ExamStudentVO extends ExamStudentEntity { ...@@ -48,7 +48,7 @@ public class ExamStudentVO extends ExamStudentEntity {
private String lev; private String lev;
@ApiModelProperty(value = "成绩标签") @ApiModelProperty(value = "成绩标签/考试结果")
private String scoreLabel; private String scoreLabel;
@ApiModelProperty(value = "班级人数") @ApiModelProperty(value = "班级人数")
......
...@@ -128,7 +128,7 @@ public class ExamController extends BaseController { ...@@ -128,7 +128,7 @@ public class ExamController extends BaseController {
@ApiOperation(value = "考试中心-我的成绩-成绩分析") @ApiOperation(value = "考试中心-我的成绩-成绩分析")
@GetMapping("/grades/analysis/{id}") @GetMapping("/grades/analysis/{id}")
public Result<ExamStudentVO> gradesAnalysis(@PathVariable(name = "id") String id) { public Result<Map<String,ExamStudentVO>> gradesAnalysis(@PathVariable(name = "id") String id) {
return Result.data(examService.gradesAnalysis(id)); return Result.data(examService.gradesAnalysis(id));
} }
......
...@@ -36,4 +36,6 @@ public interface ExamMapper extends BaseMapper<ExamEntity> { ...@@ -36,4 +36,6 @@ public interface ExamMapper extends BaseMapper<ExamEntity> {
ExamStudentVO gradesStatistics(@Param("id") String id); ExamStudentVO gradesStatistics(@Param("id") String id);
List<ExamStudentVO> gradesAnalysis(@Param("examId") int examId, @Param("studentId") String studentId);
} }
...@@ -49,7 +49,7 @@ public interface ExamService extends IService<ExamEntity> { ...@@ -49,7 +49,7 @@ public interface ExamService extends IService<ExamEntity> {
ExamStudentVO gradesSummary(String id); ExamStudentVO gradesSummary(String id);
ExamStudentVO gradesAnalysis(String id); Map<String,ExamStudentVO> gradesAnalysis(String id);
ExamStudentVO gradesStatistics(String id); ExamStudentVO gradesStatistics(String id);
......
...@@ -420,10 +420,17 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, ExamEntity> impleme ...@@ -420,10 +420,17 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, ExamEntity> impleme
} }
@Override @Override
public ExamStudentVO gradesAnalysis(String id) { public Map<String,ExamStudentVO> gradesAnalysis(String id) {
//获取考试基础信息
ExamStudentEntity examStudent = examStudentService.getById(id);
//个人 //个人
List<ExamStudentVO> personal = baseMapper.gradesAnalysis(examStudent.getExamId(), examStudent.getStudentId());
return null; //班级
List<ExamStudentVO> classList = baseMapper.gradesAnalysis(examStudent.getExamId(), null);
Map<String,ExamStudentVO> result = new HashMap<>();
result.put("个人", personal.get(0));
result.put("班级", classList.get(0));
return result;
} }
@Override @Override
......
...@@ -241,4 +241,15 @@ ...@@ -241,4 +241,15 @@
where where
es.id = #{id} es.id = #{id}
</select> </select>
<select id="gradesAnalysis" resultType="com.platform.business.model.vo.ExamStudentVO">
SELECT
type,
(SUM(IF(result = 1, score, 0)) / SUM(score)) * 100 AS scoreRate
FROM theoretical_paper_student_detail
WHERE type IS NOT NULL
AND exam_id = #{examId}
AND student_id = #{studentId}
AND score IS NOT NULL
GROUP BY type;
</select>
</mapper> </mapper>
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