|
@@ -1,36 +1,5 @@
|
|
package com.qmth.teachcloud.mark.service.impl;
|
|
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 com.qmth.teachcloud.mark.bean.student.MarkStudentQuery;
|
|
|
|
-import com.qmth.teachcloud.mark.dto.mark.MarkStudentVo;
|
|
|
|
-import org.apache.commons.collections4.CollectionUtils;
|
|
|
|
-import org.apache.commons.io.FilenameUtils;
|
|
|
|
-import org.apache.commons.lang3.StringUtils;
|
|
|
|
-import org.apache.poi.ss.usermodel.CellStyle;
|
|
|
|
-import org.apache.poi.ss.usermodel.FillPatternType;
|
|
|
|
-import org.apache.poi.ss.usermodel.IndexedColors;
|
|
|
|
-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.JSON;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
@@ -53,7 +22,10 @@ import com.qmth.boot.tools.io.ZipWriter;
|
|
import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
|
|
import com.qmth.teachcloud.common.bean.dto.DataPermissionRule;
|
|
import com.qmth.teachcloud.common.bean.vo.FilePathVo;
|
|
import com.qmth.teachcloud.common.bean.vo.FilePathVo;
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
import com.qmth.teachcloud.common.contant.SystemConstant;
|
|
-import com.qmth.teachcloud.common.entity.*;
|
|
|
|
|
|
+import com.qmth.teachcloud.common.entity.BasicExam;
|
|
|
|
+import com.qmth.teachcloud.common.entity.BasicExamStudent;
|
|
|
|
+import com.qmth.teachcloud.common.entity.MarkQuestion;
|
|
|
|
+import com.qmth.teachcloud.common.entity.SysUser;
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
import com.qmth.teachcloud.common.enums.ExceptionResultEnum;
|
|
import com.qmth.teachcloud.common.enums.PageSizeEnum;
|
|
import com.qmth.teachcloud.common.enums.PageSizeEnum;
|
|
import com.qmth.teachcloud.common.enums.ScanStatus;
|
|
import com.qmth.teachcloud.common.enums.ScanStatus;
|
|
@@ -70,9 +42,11 @@ import com.qmth.teachcloud.mark.bean.scanexaminfo.CheckTask;
|
|
import com.qmth.teachcloud.mark.bean.scanexaminfo.ScanExamCheckInfoVo;
|
|
import com.qmth.teachcloud.mark.bean.scanexaminfo.ScanExamCheckInfoVo;
|
|
import com.qmth.teachcloud.mark.bean.scanexaminfo.ScanExamInfoVo;
|
|
import com.qmth.teachcloud.mark.bean.scanexaminfo.ScanExamInfoVo;
|
|
import com.qmth.teachcloud.mark.bean.student.AbsentManualUpdateVo;
|
|
import com.qmth.teachcloud.mark.bean.student.AbsentManualUpdateVo;
|
|
|
|
+import com.qmth.teachcloud.mark.bean.student.MarkStudentQuery;
|
|
import com.qmth.teachcloud.mark.bean.student.StudentQuery;
|
|
import com.qmth.teachcloud.mark.bean.student.StudentQuery;
|
|
import com.qmth.teachcloud.mark.bean.student.StudentVo;
|
|
import com.qmth.teachcloud.mark.bean.student.StudentVo;
|
|
import com.qmth.teachcloud.mark.dto.UnexistStudentDto;
|
|
import com.qmth.teachcloud.mark.dto.UnexistStudentDto;
|
|
|
|
+import com.qmth.teachcloud.mark.dto.mark.MarkStudentVo;
|
|
import com.qmth.teachcloud.mark.dto.mark.ScoreInfo;
|
|
import com.qmth.teachcloud.mark.dto.mark.ScoreInfo;
|
|
import com.qmth.teachcloud.mark.dto.mark.ScoreItem;
|
|
import com.qmth.teachcloud.mark.dto.mark.ScoreItem;
|
|
import com.qmth.teachcloud.mark.dto.mark.manage.Task;
|
|
import com.qmth.teachcloud.mark.dto.mark.manage.Task;
|
|
@@ -88,6 +62,33 @@ import com.qmth.teachcloud.mark.service.*;
|
|
import com.qmth.teachcloud.mark.utils.BatchGetDataUtil;
|
|
import com.qmth.teachcloud.mark.utils.BatchGetDataUtil;
|
|
import com.qmth.teachcloud.mark.utils.Calculator;
|
|
import com.qmth.teachcloud.mark.utils.Calculator;
|
|
import com.qmth.teachcloud.mark.utils.ScoreCalculateUtil;
|
|
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.apache.poi.ss.usermodel.CellStyle;
|
|
|
|
+import org.apache.poi.ss.usermodel.FillPatternType;
|
|
|
|
+import org.apache.poi.ss.usermodel.IndexedColors;
|
|
|
|
+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>
|
|
* <p>
|
|
@@ -242,7 +243,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
Calculator.round(Calculator.divide(Calculator.multiply(markPaper.getObjectiveScore(), Double.parseDouble(String.valueOf(objectiveScoreRateLt))), 100), 2);
|
|
Calculator.round(Calculator.divide(Calculator.multiply(markPaper.getObjectiveScore(), Double.parseDouble(String.valueOf(objectiveScoreRateLt))), 100), 2);
|
|
DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(sysUser.getSchoolId(), sysUser.getId(), "/api/admin/mark/setting/scoreList");
|
|
DataPermissionRule dpr = basicRoleDataPermissionService.findDataPermission(sysUser.getSchoolId(), sysUser.getId(), "/api/admin/mark/setting/scoreList");
|
|
IPage<StudentScoreDetailDto> studentScoreDetailDtoIPage = this.baseMapper.pageStudentScore(page, examId,
|
|
IPage<StudentScoreDetailDto> studentScoreDetailDtoIPage = this.baseMapper.pageStudentScore(page, examId,
|
|
- paperNumber, college, majorName,teachClassName, className, teacher, filter, status, breach, startScore, endScore,
|
|
|
|
|
|
+ paperNumber, college, majorName, teachClassName, className, teacher, filter, status, breach, startScore, endScore,
|
|
subjectiveStartScore, subjectiveEndScore, objectiveStartScore, objectiveEndScore, subScore,
|
|
subjectiveStartScore, subjectiveEndScore, objectiveStartScore, objectiveEndScore, subScore,
|
|
objectiveScoreLt, studentName, studentCode, orderType, orderField, dpr);
|
|
objectiveScoreLt, studentName, studentCode, orderType, orderField, dpr);
|
|
for (StudentScoreDetailDto scoreDetailDto : studentScoreDetailDtoIPage.getRecords()) {
|
|
for (StudentScoreDetailDto scoreDetailDto : studentScoreDetailDtoIPage.getRecords()) {
|
|
@@ -977,7 +978,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
public void scoreExport(ArchiveStudentQuery query, HttpServletResponse response) {
|
|
public void scoreExport(ArchiveStudentQuery query, HttpServletResponse response) {
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
Long schoolId = Long.valueOf(ServletUtil.getRequestHeaderSchoolId().toString());
|
|
//生成表头
|
|
//生成表头
|
|
- String[] columnName = new String[]{"学生姓名", "学号", "学院", "班级", "课程代码", "课程名称","状态", "客观分", "主观分",
|
|
|
|
|
|
+ String[] columnName = new String[]{"学生姓名", "学号", "学院", "班级", "课程代码", "课程名称", "状态", "客观分", "主观分",
|
|
"成绩"};
|
|
"成绩"};
|
|
List<MarkQuestion> oQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndGroupNumber(query.getExamId(), query.getPaperNumber(), null, true);
|
|
List<MarkQuestion> oQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndGroupNumber(query.getExamId(), query.getPaperNumber(), null, true);
|
|
List<MarkQuestion> sQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndGroupNumber(query.getExamId(), query.getPaperNumber(), null, false);
|
|
List<MarkQuestion> sQuestionList = markQuestionService.listQuestionByExamIdAndPaperNumberAndGroupNumber(query.getExamId(), query.getPaperNumber(), null, false);
|
|
@@ -1001,7 +1002,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
valueList.add(s.getClassName());
|
|
valueList.add(s.getClassName());
|
|
valueList.add(s.getCourseCode());
|
|
valueList.add(s.getCourseCode());
|
|
valueList.add(s.getCourseName());
|
|
valueList.add(s.getCourseName());
|
|
- valueList.add(s.getStatus().getName());
|
|
|
|
|
|
+ valueList.add(Objects.nonNull(s.getStatus()) ? s.getStatus().getName() : null);
|
|
valueList.add(s.getObjectiveScore() == null ? "" : s.getObjectiveScore().toString());
|
|
valueList.add(s.getObjectiveScore() == null ? "" : s.getObjectiveScore().toString());
|
|
valueList.add(s.getSubjectiveScore() == null ? "" : s.getSubjectiveScore().toString());
|
|
valueList.add(s.getSubjectiveScore() == null ? "" : s.getSubjectiveScore().toString());
|
|
valueList.add(s.getTotalScore() == null ? "" : s.getTotalScore().toString());
|
|
valueList.add(s.getTotalScore() == null ? "" : s.getTotalScore().toString());
|