|
@@ -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,30 +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.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>
|
|
@@ -1315,7 +1317,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
int count = (int) list.stream().filter(s -> s.getTotalScore() >= start && s.getTotalScore() <= end).count();
|
|
|
Double rate = null;
|
|
|
if (list.size() != 0) {
|
|
|
- rate = Calculator.multiply(count, list.size(), 2);
|
|
|
+ rate = Calculator.divide(count, list.size(), 2);
|
|
|
}
|
|
|
ScoreRangeVo vo = new ScoreRangeVo(count, start, end, rate);
|
|
|
return vo;
|