Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
practical_train
Commits
21b28131
Commit
21b28131
authored
Aug 10, 2026
by
wujipeng
Browse files
考试中心-我的成绩-成绩分析
parent
23fb5ade
Changes
6
Show whitespace changes
Inline
Side-by-side
practical-api/practical-business-api/src/main/java/com/platform/business/model/vo/ExamStudentVO.java
View file @
21b28131
...
...
@@ -48,7 +48,7 @@ public class ExamStudentVO extends ExamStudentEntity {
private
String
lev
;
@ApiModelProperty
(
value
=
"成绩标签"
)
@ApiModelProperty
(
value
=
"成绩标签
/考试结果
"
)
private
String
scoreLabel
;
@ApiModelProperty
(
value
=
"班级人数"
)
...
...
practical-business/src/main/java/com/platform/business/controller/ExamController.java
View file @
21b28131
...
...
@@ -128,7 +128,7 @@ public class ExamController extends BaseController {
@ApiOperation
(
value
=
"考试中心-我的成绩-成绩分析"
)
@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
));
}
...
...
practical-business/src/main/java/com/platform/business/mapper/ExamMapper.java
View file @
21b28131
...
...
@@ -36,4 +36,6 @@ public interface ExamMapper extends BaseMapper<ExamEntity> {
ExamStudentVO
gradesStatistics
(
@Param
(
"id"
)
String
id
);
List
<
ExamStudentVO
>
gradesAnalysis
(
@Param
(
"examId"
)
int
examId
,
@Param
(
"studentId"
)
String
studentId
);
}
practical-business/src/main/java/com/platform/business/service/ExamService.java
View file @
21b28131
...
...
@@ -49,7 +49,7 @@ public interface ExamService extends IService<ExamEntity> {
ExamStudentVO
gradesSummary
(
String
id
);
ExamStudentVO
gradesAnalysis
(
String
id
);
Map
<
String
,
ExamStudentVO
>
gradesAnalysis
(
String
id
);
ExamStudentVO
gradesStatistics
(
String
id
);
...
...
practical-business/src/main/java/com/platform/business/service/impl/ExamServiceImpl.java
View file @
21b28131
...
...
@@ -420,10 +420,17 @@ public class ExamServiceImpl extends ServiceImpl<ExamMapper, ExamEntity> impleme
}
@Override
public
ExamStudentVO
gradesAnalysis
(
String
id
)
{
public
Map
<
String
,
ExamStudentVO
>
gradesAnalysis
(
String
id
)
{
//获取考试基础信息
ExamStudentEntity
examStudent
=
examStudentService
.
getById
(
id
);
//个人
return
null
;
List
<
ExamStudentVO
>
personal
=
baseMapper
.
gradesAnalysis
(
examStudent
.
getExamId
(),
examStudent
.
getStudentId
());
//班级
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
...
...
practical-business/src/main/resources/com/platform/business/mapper/ExamMapper.xml
View file @
21b28131
...
...
@@ -241,4 +241,15 @@
where
es.id = #{id}
</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>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment