|
@@ -1,5 +1,31 @@
|
|
|
package com.qmth.teachcloud.mark.service.impl;
|
|
|
|
|
|
+import java.awt.*;
|
|
|
+import java.awt.color.ColorSpace;
|
|
|
+import java.awt.image.BufferedImage;
|
|
|
+import java.awt.image.ColorConvertOp;
|
|
|
+import java.io.*;
|
|
|
+import java.math.BigDecimal;
|
|
|
+import java.net.URLEncoder;
|
|
|
+import java.nio.charset.StandardCharsets;
|
|
|
+import java.util.*;
|
|
|
+import java.util.List;
|
|
|
+import java.util.stream.Collectors;
|
|
|
+
|
|
|
+import javax.annotation.Resource;
|
|
|
+import javax.imageio.ImageIO;
|
|
|
+import javax.servlet.ServletOutputStream;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.validation.constraints.NotNull;
|
|
|
+
|
|
|
+import org.apache.commons.collections4.CollectionUtils;
|
|
|
+import org.apache.commons.io.FilenameUtils;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
+import org.springframework.util.FileCopyUtils;
|
|
|
+
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -57,31 +83,6 @@ import com.qmth.teachcloud.mark.service.*;
|
|
|
import com.qmth.teachcloud.mark.utils.BatchGetDataUtil;
|
|
|
import com.qmth.teachcloud.mark.utils.Calculator;
|
|
|
import com.qmth.teachcloud.mark.utils.ScoreCalculateUtil;
|
|
|
-import org.apache.commons.collections4.CollectionUtils;
|
|
|
-import org.apache.commons.io.FilenameUtils;
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
-import org.springframework.stereotype.Service;
|
|
|
-import org.springframework.transaction.annotation.Transactional;
|
|
|
-import org.springframework.util.FileCopyUtils;
|
|
|
-
|
|
|
-import javax.annotation.Resource;
|
|
|
-import javax.imageio.ImageIO;
|
|
|
-import javax.print.attribute.standard.Severity;
|
|
|
-import javax.servlet.ServletOutputStream;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import javax.validation.constraints.NotNull;
|
|
|
-import java.awt.*;
|
|
|
-import java.awt.color.ColorSpace;
|
|
|
-import java.awt.image.BufferedImage;
|
|
|
-import java.awt.image.ColorConvertOp;
|
|
|
-import java.io.*;
|
|
|
-import java.math.BigDecimal;
|
|
|
-import java.net.URLEncoder;
|
|
|
-import java.nio.charset.StandardCharsets;
|
|
|
-import java.util.List;
|
|
|
-import java.util.*;
|
|
|
-import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -870,6 +871,8 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
calculateObjectiveScore(student);
|
|
|
scanOmrTaskService.saveTask(student.getId());
|
|
|
}
|
|
|
+ markPaperService.updateUploadCount(examId, student.getPaperNumber(),
|
|
|
+ this.countUploadedByExamIdAndPaperNumber(examId, student.getPaperNumber()));
|
|
|
markPaperService.updateAbsentCount(examId, student.getPaperNumber(),
|
|
|
this.countAbsentByExamIdAndPaperNumber(examId, student.getPaperNumber()));
|
|
|
return UpdateTimeVo.create();
|
|
@@ -1322,8 +1325,8 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
|
|
|
private ScoreRangeVo getScoreRangeVo(int totalCount, List<ArchiveStudentVo> list, Double start, Double end) {
|
|
|
int count = (int) list.stream().filter(s -> s.getTotalScore() >= start && s.getTotalScore() <= end).count();
|
|
|
- Double rate = null;
|
|
|
- if (list.size() != 0) {
|
|
|
+ Double rate = 0d;
|
|
|
+ if (list.size() != 0 && totalCount!=0) {
|
|
|
rate = Calculator.divide(count, totalCount, 2);
|
|
|
}
|
|
|
ScoreRangeVo vo = new ScoreRangeVo(count, start, end, rate * 100);
|