xiaofei 1 жил өмнө
parent
commit
4e46681974

+ 1 - 1
teachcloud-common/src/main/java/com/qmth/teachcloud/common/kit/TikuUtils.java

@@ -111,7 +111,7 @@ public class TikuUtils {
             if (file.exists()) {
                 return file;
             } else {
-                throw ExceptionResultEnum.ERROR.exception("试卷结构包获取失败");
+                throw ExceptionResultEnum.ERROR.exception("请在题库管理模块,试卷列表里预览试卷,核对试卷内容确认无误后点击确定");
             }
         } catch (Exception e) {
             throw ExceptionResultEnum.ERROR.exception(e.getMessage());

+ 4 - 11
teachcloud-mark/src/main/java/com/qmth/teachcloud/mark/service/impl/MarkStudentServiceImpl.java

@@ -514,7 +514,7 @@ public class MarkStudentServiceImpl extends ServiceImpl<MarkStudentMapper, MarkS
                 studentObjectiveAnswerDto.setSubNumber(q != null ? q.getSubNumber() : 0);
                 studentObjectiveAnswerDto.setAnswer(answer);
                 studentObjectiveAnswerDto.setExist(q != null && q.getTotalScore() > 0);
-                studentObjectiveAnswerDto.setQuestionType(q !=null ? q.getQuestionType():0);
+                studentObjectiveAnswerDto.setQuestionType(q != null ? q.getQuestionType() : 0);
                 answerDtoList.add(studentObjectiveAnswerDto);
 
                 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) {
             double total = vo.getStudentCount();
             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) {
             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;
     }