【修改】 学生交卷后的数据展示
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package pc.exam.pp.module.exam.dal.dataobject.student;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.*;
|
||||
@@ -49,6 +50,9 @@ public class StuPaperScoreDO extends TenantBaseDO {
|
||||
* 是否正确
|
||||
*/
|
||||
private int isTrue;
|
||||
|
||||
/**
|
||||
* 题型名称
|
||||
*/
|
||||
private String subjectName;
|
||||
|
||||
}
|
@@ -22,4 +22,8 @@ public class StuScoreVo {
|
||||
|
||||
@Schema(description = "正确得分")
|
||||
private BigDecimal trueScore;
|
||||
|
||||
@Schema(description = "头像地址")
|
||||
private String picUrl;
|
||||
|
||||
}
|
||||
|
@@ -51,10 +51,12 @@ public class StuPaperScoreServiceImpl implements StuPaperScoreService {
|
||||
String stuNumber = "";
|
||||
String nickName = "";
|
||||
String taskId = "";
|
||||
String picUrl = "";
|
||||
List<StuScoreVo> stuScoreVos = stuPaperScoreMapper.getStuScore(stuId, paperId);
|
||||
for (StuScoreVo scoreVo : stuScoreVos) {
|
||||
stuNumber = scoreVo.getStuNumber();
|
||||
nickName = scoreVo.getNickName();
|
||||
picUrl = scoreVo.getPicUrl();
|
||||
// 3、查询出来的所有分数进行相加
|
||||
score = score.add(scoreVo.getScore());
|
||||
trueScore = trueScore.add(scoreVo.getTrueScore());
|
||||
@@ -63,6 +65,7 @@ public class StuPaperScoreServiceImpl implements StuPaperScoreService {
|
||||
stuScoreVo.setTrueScore(trueScore);
|
||||
stuScoreVo.setStuNumber(stuNumber);
|
||||
stuScoreVo.setNickName(nickName);
|
||||
stuScoreVo.setPicUrl(picUrl);
|
||||
// 4、通过paperId查询任务编号
|
||||
EducationPaper educationPaper = educationPaperMapper.selectEducationPaperByPaperId(paperId);
|
||||
stuScoreVo.setTaskId(educationPaper.getTaskId());
|
||||
|
@@ -20,7 +20,8 @@
|
||||
esps.score AS score,
|
||||
esps.true_score AS trueScore,
|
||||
su.username AS stuNumber,
|
||||
su.nickname AS nickName
|
||||
su.nickname AS nickName,
|
||||
su.avatar AS picUrl
|
||||
FROM
|
||||
exam_stu_paper_score AS esps
|
||||
LEFT JOIN system_users AS su ON esps.stu_id = su.id
|
||||
|
@@ -161,7 +161,7 @@ public class AutoToolsServiceImpl implements AutoToolsService{
|
||||
@Override
|
||||
public CommonResult<Double> judgementScore(Long stuId, String paperId) throws Exception {
|
||||
//监控管理 生成选择题文件路径
|
||||
endStuMonitorUtils.endStuMonitor(String.valueOf(stuId), paperId);
|
||||
// endStuMonitorUtils.endStuMonitor(String.valueOf(stuId), paperId);
|
||||
// 获取平台文件参数
|
||||
ConfigDO config = configService.getConfigByKey("file_down_path");
|
||||
double score = 0;
|
||||
@@ -192,6 +192,7 @@ public class AutoToolsServiceImpl implements AutoToolsService{
|
||||
// 判断是否做过该题
|
||||
boolean isNull = false;
|
||||
if (stuPaperScoreDO == null) {
|
||||
stuPaperScoreDO = new StuPaperScoreDO();
|
||||
stuPaperScoreDO.setStuId(stuId);
|
||||
stuPaperScoreDO.setQuId(key);
|
||||
stuPaperScoreDO.setPaperId(paperId);
|
||||
@@ -313,7 +314,7 @@ public class AutoToolsServiceImpl implements AutoToolsService{
|
||||
// fileService.createStuFile(stuId, paperId, file.getOriginalFilename(), path, IoUtil.readBytes(file.getInputStream()));
|
||||
|
||||
//更新学生分数
|
||||
endStuMonitorUtils.endStuMonitor(String.valueOf(stuId),paperId,score);
|
||||
// endStuMonitorUtils.endStuMonitor(String.valueOf(stuId),paperId,score);
|
||||
// end、删除文件
|
||||
// zip_file.delete();
|
||||
// folder.delete();
|
||||
|
@@ -51,6 +51,7 @@ public class JudgementChoiceServiceImpl implements JudgementChoiceService
|
||||
// 原始正确分数
|
||||
stuPaperScoreDO.setTrueScore(new BigDecimal(score));
|
||||
stuPaperScoreDO.setIsTrue(0);
|
||||
stuPaperScoreDO.setSubjectName(examQuestion.getSubjectName());
|
||||
if (isNull) {
|
||||
// 如果之前没做过,则插入该题的分数
|
||||
stuPaperScoreService.insertStuPaperScore(stuPaperScoreDO);
|
||||
@@ -65,6 +66,7 @@ public class JudgementChoiceServiceImpl implements JudgementChoiceService
|
||||
// 原始正确分数
|
||||
stuPaperScoreDO.setTrueScore(new BigDecimal(score));
|
||||
stuPaperScoreDO.setIsTrue(1);
|
||||
stuPaperScoreDO.setSubjectName(examQuestion.getSubjectName());
|
||||
if (isNull) {
|
||||
// 如果之前没做过,则插入该题的分数
|
||||
stuPaperScoreService.insertStuPaperScore(stuPaperScoreDO);
|
||||
|
Reference in New Issue
Block a user