|
@@ -1,22 +1,5 @@
|
|
|
package com.qmth.teachcloud.mark.service.impl;
|
|
|
|
|
|
-import java.io.File;
|
|
|
-import java.nio.charset.StandardCharsets;
|
|
|
-import java.text.DecimalFormat;
|
|
|
-import java.util.*;
|
|
|
-import java.util.stream.Collectors;
|
|
|
-
|
|
|
-import javax.annotation.Resource;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import javax.validation.constraints.NotNull;
|
|
|
-
|
|
|
-import org.apache.commons.collections4.CollectionUtils;
|
|
|
-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;
|
|
@@ -69,6 +52,20 @@ 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.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.servlet.http.HttpServletResponse;
|
|
|
+import javax.validation.constraints.NotNull;
|
|
|
+import java.io.File;
|
|
|
+import java.nio.charset.StandardCharsets;
|
|
|
+import java.util.*;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -190,7 +187,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
|
|
|
@Override
|
|
|
public IPage<StudentScoreDetailDto> pageStudentScore(Long examId, String paperNumber, String college,
|
|
|
- String className, String teacher, Integer filter, Boolean absent, Boolean breach, Double startScore,
|
|
|
+ String className, String teacher, Integer filter, String status, Boolean breach, Double startScore,
|
|
|
Double endScore, Double subScore, Integer objectiveScoreRateLt, String studentName, String studentCode,
|
|
|
String orderType, String orderField, Integer pageNumber, Integer pageSize) {
|
|
|
if (startScore != null && endScore == null) {
|
|
@@ -200,12 +197,20 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
|
MarkPaper markPaper = markPaperService.getByExamIdAndPaperNumber(examId, paperNumber);
|
|
|
Double objectiveScoreLt = objectiveScoreRateLt == null ? null : Calculator.round(Calculator.divide(Calculator.multiply(markPaper.getObjectiveScore(), Double.parseDouble(String.valueOf(objectiveScoreRateLt))), 100), 2);
|
|
|
IPage<StudentScoreDetailDto> studentScoreDetailDtoIPage = this.baseMapper.pageStudentScore(page, examId,
|
|
|
- paperNumber, college, className, teacher, filter, absent, breach, startScore, endScore, subScore,
|
|
|
+ paperNumber, college, className, teacher, filter, status, breach, startScore, endScore, subScore,
|
|
|
objectiveScoreLt, studentName, studentCode, orderType, orderField);
|
|
|
for (StudentScoreDetailDto scoreDetailDto : studentScoreDetailDtoIPage.getRecords()) {
|
|
|
// 原图
|
|
|
scoreDetailDto.setSheetUrls(buildSheetUrls(scoreDetailDto.getStudentId()));
|
|
|
scoreDetailDto.setSheetPath(null);
|
|
|
+ // 状态
|
|
|
+ if (ScanStatus.UNEXIST.equals(scoreDetailDto.getScanStatus())) {
|
|
|
+ scoreDetailDto.setStatusDisplay("未扫描");
|
|
|
+ } else if (ScanStatus.MANUAL_ABSENT.equals(scoreDetailDto.getScanStatus()) || scoreDetailDto.getAbsent() || scoreDetailDto.getOmrAbsent()) {
|
|
|
+ scoreDetailDto.setStatusDisplay("缺考");
|
|
|
+ } else if (!scoreDetailDto.getAbsent() && !scoreDetailDto.getOmrAbsent() && scoreDetailDto.getUpload() && ScanStatus.SCANNED.equals(scoreDetailDto.getScanStatus())) {
|
|
|
+ scoreDetailDto.setStatusDisplay("已扫描");
|
|
|
+ }
|
|
|
}
|
|
|
return studentScoreDetailDtoIPage;
|
|
|
}
|