【修改】学生端试卷任务列表 次数
This commit is contained in:
@@ -498,6 +498,21 @@ public class EducationPaperTaskServiceImpl implements IEducationPaperTaskService
|
||||
if ("0".equals(taskType)){
|
||||
for (EducationPaperTask paperTask : list) {
|
||||
String taskId = paperTask.getTaskId();
|
||||
int count=0;
|
||||
List<EducationPaper> educationPapers = educationPaperMapper.selectPaperListByTaskId(paperTask.getTaskId());
|
||||
if (educationPapers!=null&&educationPapers.size()>0){
|
||||
for (EducationPaper educationPaper : educationPapers) {
|
||||
try {
|
||||
count += Integer.parseInt(educationPaper.getCounts());
|
||||
} catch (NumberFormatException e) {
|
||||
// 可选:记录异常或忽略非法数字
|
||||
System.err.println("无效的 counts 值: " + educationPaper.getCounts());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
paperTask.setCount(String.valueOf(count));
|
||||
|
||||
EducationPaperParam educationPaperParam = educationPaperParamMapper.selectEducationPaperParamByTaskId(taskId);
|
||||
//最高成绩
|
||||
|
||||
|
@@ -119,7 +119,7 @@ select task_id from education_paper where paper_id=#{paperId}
|
||||
</select>
|
||||
<select id="selectPaperListByTaskId" resultMap="EducationPaperResult">
|
||||
<include refid="selectEducationPaperVo"/>
|
||||
where task_id =#{taskId} and deleted ='0'
|
||||
where task_id =#{taskId} and deleted ='0' and status ='0'
|
||||
</select>
|
||||
<select id="selectCountPaperList" resultType="java.lang.Integer">
|
||||
select count(*) from education_paper
|
||||
|
Reference in New Issue
Block a user