Browse Source

校验没有客观题或者主观题的情况下,分数默认是“”

nikang 6 năm trước cách đây
mục cha
commit
4c0eabcd49

+ 2 - 2
stmms-web/src/main/java/cn/com/qmth/stmms/api/controller/ExamStudentController.java

@@ -209,8 +209,8 @@ public class ExamStudentController {
             obj.accumulate("answers", student.getAnswers() == null ? "" : student.getAnswers());
             obj.accumulate("upload", student.isUpload());
             obj.accumulate("absent", student.isAbsent());
-            obj.accumulate("objectiveScore", student.getObjectiveScore());
-            obj.accumulate("subjectiveScore", student.getSubjectiveScore());
+            obj.accumulate("objectiveScore", student.getObjectiveScore()==null?"":student.getObjectiveScore());
+            obj.accumulate("subjectiveScore", student.getSubjectiveScore()==null?"":student.getSubjectiveScore());
             Campus campus = campusService.findBySchoolAndName(exam.getSchoolId(), student.getCampusName());
             obj.accumulate("campusCode", campus != null ? campus.getId().toString() : "");
             array.add(obj);