|
@@ -893,10 +893,17 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
if (oneQuestionAnswerDetailList.size() == 0){
|
|
|
System.out.println("异常");
|
|
|
}
|
|
|
+ BigDecimal fullScore = paperStruct.getFullScore();
|
|
|
+ PaperStructJudgeEnum paperStructJudgeEnum;
|
|
|
+ if (oneQuestionAnswerDetailList.stream().anyMatch(e -> fullScore.compareTo(e.getScore()) != 0)){
|
|
|
+ paperStructJudgeEnum = PaperStructJudgeEnum.NOT_QUITE_RIGHT;
|
|
|
+ }else {
|
|
|
+ paperStructJudgeEnum = PaperStructJudgeEnum.ALL_CORRECT;
|
|
|
+ }
|
|
|
|
|
|
DoubleSummaryStatistics descriptiveStatistics = oneQuestionAnswerDetailList.stream()
|
|
|
.collect(Collectors.summarizingDouble(e -> e.getScore().doubleValue()));
|
|
|
- BigDecimal fullScore = paperStruct.getFullScore();
|
|
|
+
|
|
|
double scoreAvg = descriptiveStatistics.getAverage();
|
|
|
BigDecimal scoreRate = BigDecimal.valueOf(scoreAvg).divide(fullScore, 4, BigDecimal.ROUND_HALF_UP);
|
|
|
scoreRate = scoreRate.setScale(1, BigDecimal.ROUND_HALF_UP);
|
|
@@ -923,10 +930,10 @@ public class AnalyzeForReportServiceImpl implements AnalyzeForReportService {
|
|
|
taPaperStruct.setKnowledgeDimension(paperStruct.getKnowledgeDimension());
|
|
|
taPaperStruct.setAbilityDimension(paperStruct.getAbilityDimension());
|
|
|
taPaperStruct.setLiteracyDimension(paperStruct.getLiteracyDimension());
|
|
|
-
|
|
|
taPaperStruct.setScoreRate(scoreRate);
|
|
|
taPaperStruct.setDifficult(difficult);
|
|
|
taPaperStruct.setValidity(BigDecimal.valueOf(validity));
|
|
|
+ taPaperStruct.setPaperStructJudge(paperStructJudgeEnum);
|
|
|
taPaperStructList.add(taPaperStruct);
|
|
|
}
|
|
|
}
|