Browse Source

fix. 大题分析新加几个参数

caozixuan 10 months ago
parent
commit
228f3b9bff

+ 2 - 2
distributed-print-business/src/main/java/com/qmth/distributed/print/business/service/impl/PrintCommonServiceImpl.java

@@ -450,8 +450,8 @@ public class PrintCommonServiceImpl implements PrintCommonService {
             pdfStringJoiner = SystemConstant.getDirName(pdfStringJoiner, UploadFileEnum.PDF, true);
             pdfStringJoiner.add(SystemConstant.getNanoId()).add(SystemConstant.PDF_PREFIX);
 
-            String htmlDirName = stringJoiner.toString();
-            String pdfDirName = pdfStringJoiner.toString();
+            String htmlDirName = stringJoiner.toString().replaceAll("/", "\\\\");
+            String pdfDirName = pdfStringJoiner.toString().replaceAll("/", "\\\\");
 
             JSONObject jsonObject = new JSONObject();
             jsonObject.put(SystemConstant.PATH, htmlDirName);

+ 56 - 3
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/bean/archivescore/QuestionVo.java

@@ -3,6 +3,7 @@ package com.qmth.teachcloud.mark.bean.archivescore;
 import io.swagger.annotations.ApiModelProperty;
 
 public class QuestionVo {
+
 	@ApiModelProperty("考生总数")
 	private Integer studentCount;
 
@@ -35,73 +36,125 @@ public class QuestionVo {
 
 	@ApiModelProperty("满分率")
 	private Double fullScoreRate;
+
+	@ApiModelProperty("最高分")
+	private Double maxScore;
+
+	@ApiModelProperty("最低分")
+	private Double minScore;
+
+	@ApiModelProperty("零分人数")
+	private Integer zeroScoreCount;
+
 	public String getTitle() {
 		return title;
 	}
+
 	public void setTitle(String title) {
 		this.title = title;
 	}
+
 	public Integer getMainNumber() {
 		return mainNumber;
 	}
+
 	public void setMainNumber(Integer mainNumber) {
 		this.mainNumber = mainNumber;
 	}
+
 	public Integer getSubNumber() {
 		return subNumber;
 	}
+
 	public void setSubNumber(Integer subNumber) {
 		this.subNumber = subNumber;
 	}
+
 	public Double getScore() {
 		return score;
 	}
+
 	public void setScore(Double score) {
 		this.score = score;
 	}
+
 	public Double getAvgScore() {
 		return avgScore;
 	}
+
 	public void setAvgScore(Double avgScore) {
 		this.avgScore = avgScore;
 	}
-	
+
 	public Double getScoreRate() {
 		return scoreRate;
 	}
+
 	public void setScoreRate(Double scoreRate) {
 		this.scoreRate = scoreRate;
 	}
+
 	public Double getFullScoreRate() {
 		return fullScoreRate;
 	}
+
 	public void setFullScoreRate(Double fullScoreRate) {
 		this.fullScoreRate = fullScoreRate;
 	}
+
 	public Integer getStudentCount() {
 		return studentCount;
 	}
+
 	public void setStudentCount(Integer studentCount) {
 		this.studentCount = studentCount;
 	}
+
 	public Integer getScoreCount() {
 		return scoreCount;
 	}
+
 	public void setScoreCount(Integer scoreCount) {
 		this.scoreCount = scoreCount;
 	}
+
 	public Integer getFullScoreCount() {
 		return fullScoreCount;
 	}
+
 	public void setFullScoreCount(Integer fullScoreCount) {
 		this.fullScoreCount = fullScoreCount;
 	}
+
 	public Double getScoreSum() {
 		return scoreSum;
 	}
+
 	public void setScoreSum(Double scoreSum) {
 		this.scoreSum = scoreSum;
 	}
-	
-	
+
+	public Double getMaxScore() {
+		return maxScore;
+	}
+
+	public void setMaxScore(Double maxScore) {
+		this.maxScore = maxScore;
+	}
+
+	public Double getMinScore() {
+		return minScore;
+	}
+
+	public void setMinScore(Double minScore) {
+		this.minScore = minScore;
+	}
+
+	public Integer getZeroScoreCount() {
+		return zeroScoreCount;
+	}
+
+	public void setZeroScoreCount(Integer zeroScoreCount) {
+		this.zeroScoreCount = zeroScoreCount;
+	}
 }

+ 14 - 0
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -1514,6 +1514,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
                 questionVo.setScoreCount(0);
                 questionVo.setFullScoreCount(0);
                 questionVo.setScoreSum(0.0);
+                questionVo.setZeroScoreCount(0);
                 mainQuestionMap.put(key, questionVo);
             }
         }
@@ -1529,6 +1530,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
         List<MarkQuestion> objectiveQuestions = questionDatasource.stream().filter(MarkQuestion::getObjective).collect(Collectors.toList());
         for (ArchiveStudentVo studentVo : studentList) {
             List<ScoreItem> scoreItemList = studentVo.getScoreList(true, objectiveQuestions);
+
             for (String key : mainQuestionMap.keySet()) {
                 String[] arr = key.split("-");
                 int mainNumber = Integer.parseInt(arr[0]);
@@ -1563,8 +1565,20 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
                 if (studentScore == questionVo.getScore()) {
                     questionVo.setFullScoreCount(questionVo.getFullScoreCount() + 1);
                 }
+                // 零分总数
+                if (studentScore == 0) {
+                    questionVo.setZeroScoreCount(questionVo.getZeroScoreCount() + 1);
+                }
                 // 考生总得分
                 questionVo.setScoreSum(questionVo.getScoreSum() + studentScore);
+                // 最高分
+                if (Objects.isNull(questionVo.getMaxScore()) || studentScore > questionVo.getMaxScore()) {
+                    questionVo.setMaxScore(studentScore);
+                }
+                // 最低分
+                if (Objects.isNull(questionVo.getMinScore()) || studentScore < questionVo.getMinScore()) {
+                    questionVo.setMinScore(studentScore);
+                }
             }
         }
         List<QuestionVo> questionVoList = new ArrayList<>(mainQuestionMap.values());