|
@@ -514,7 +514,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
studentObjectiveAnswerDto.setSubNumber(q != null ? q.getSubNumber() : 0);
|
|
studentObjectiveAnswerDto.setSubNumber(q != null ? q.getSubNumber() : 0);
|
|
studentObjectiveAnswerDto.setAnswer(answer);
|
|
studentObjectiveAnswerDto.setAnswer(answer);
|
|
studentObjectiveAnswerDto.setExist(q != null && q.getTotalScore() > 0);
|
|
studentObjectiveAnswerDto.setExist(q != null && q.getTotalScore() > 0);
|
|
- studentObjectiveAnswerDto.setQuestionType(q !=null ? q.getQuestionType():0);
|
|
|
|
|
|
+ studentObjectiveAnswerDto.setQuestionType(q != null ? q.getQuestionType() : 0);
|
|
answerDtoList.add(studentObjectiveAnswerDto);
|
|
answerDtoList.add(studentObjectiveAnswerDto);
|
|
|
|
|
|
if (q != null) {
|
|
if (q != null) {
|
|
@@ -1278,15 +1278,8 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- Collections.sort(list, (o1, o2) -> {
|
|
|
|
- if (o1.getMainNumber() > o2.getMainNumber()) {
|
|
|
|
- return 1;
|
|
|
|
- } else if (o1.getSubNumber() < o2.getSubNumber()) {
|
|
|
|
- return -1;
|
|
|
|
- } else {
|
|
|
|
- return 0;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+ list.sort(Comparator.comparingInt(QuestionVo::getMainNumber).thenComparingInt(QuestionVo::getSubNumber));
|
|
|
|
+
|
|
for (QuestionVo vo : list) {
|
|
for (QuestionVo vo : list) {
|
|
double total = vo.getStudentCount();
|
|
double total = vo.getStudentCount();
|
|
vo.setScoreRate(Calculator.divide(vo.getScoreCount(), total, 2));
|
|
vo.setScoreRate(Calculator.divide(vo.getScoreCount(), total, 2));
|
|
@@ -1333,7 +1326,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
|
|
if (list.size() != 0 && totalCount != 0) {
|
|
if (list.size() != 0 && totalCount != 0) {
|
|
rate = Calculator.divide(count, totalCount, 2);
|
|
rate = Calculator.divide(count, totalCount, 2);
|
|
}
|
|
}
|
|
- ScoreRangeVo vo = new ScoreRangeVo(count, start, end, rate * 100);
|
|
|
|
|
|
+ ScoreRangeVo vo = new ScoreRangeVo(count, start, end, Calculator.multiply(rate, 100, 0));
|
|
return vo;
|
|
return vo;
|
|
}
|
|
}
|
|
|
|
|