|
@@ -311,10 +311,8 @@ public class ExamStudentController extends BaseApiController {
|
|
detail.accumulate("mainNumber", question.getMainNumber());
|
|
detail.accumulate("mainNumber", question.getMainNumber());
|
|
detail.accumulate("subNumber", question.getSubNumber());
|
|
detail.accumulate("subNumber", question.getSubNumber());
|
|
detail.accumulate("score", item.getScore());
|
|
detail.accumulate("score", item.getScore());
|
|
- detail.accumulate("marker",
|
|
|
|
- getMarkerNames(student, question.getGroupNumber()).get("markerNames"));
|
|
|
|
- detail.accumulate("header",
|
|
|
|
- getMarkerNames(student, question.getGroupNumber()).get("headerNames"));
|
|
|
|
|
|
+ detail.accumulate("marker", getMarkerNames(student, question.getGroupNumber()));
|
|
|
|
+ detail.accumulate("header", getHeaderNames(student, question.getGroupNumber()));
|
|
subjective.add(detail);
|
|
subjective.add(detail);
|
|
}
|
|
}
|
|
obj.accumulate("subjectiveScoreDetail", subjective);
|
|
obj.accumulate("subjectiveScoreDetail", subjective);
|
|
@@ -332,17 +330,22 @@ public class ExamStudentController extends BaseApiController {
|
|
return array;
|
|
return array;
|
|
}
|
|
}
|
|
|
|
|
|
- private Map<String, String> getMarkerNames(ExamStudent student, Integer groupNumber) {
|
|
|
|
- Map<String, String> map = new HashMap<String, String>();
|
|
|
|
|
|
+ private String getMarkerNames(ExamStudent student, Integer groupNumber) {
|
|
List<String> markerNames = new LinkedList<>();
|
|
List<String> markerNames = new LinkedList<>();
|
|
- List<String> headerNames = new LinkedList<>();
|
|
|
|
-
|
|
|
|
List<MarkLibrary> list = libraryService.findByStudentAndGroup(student.getId(), groupNumber);
|
|
List<MarkLibrary> list = libraryService.findByStudentAndGroup(student.getId(), groupNumber);
|
|
for (MarkLibrary library : list) {
|
|
for (MarkLibrary library : list) {
|
|
Marker marker = markerService.findById(library.getMarkerId());
|
|
Marker marker = markerService.findById(library.getMarkerId());
|
|
if (marker != null) {
|
|
if (marker != null) {
|
|
markerNames.add(marker.getName());
|
|
markerNames.add(marker.getName());
|
|
}
|
|
}
|
|
|
|
+ }
|
|
|
|
+ return StringUtils.join(markerNames, ",");
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private String getHeaderNames(ExamStudent student, Integer groupNumber) {
|
|
|
|
+ List<String> headerNames = new LinkedList<>();
|
|
|
|
+ List<MarkLibrary> list = libraryService.findByStudentAndGroup(student.getId(), groupNumber);
|
|
|
|
+ for (MarkLibrary library : list) {
|
|
if (library.getHeaderId() == null) {
|
|
if (library.getHeaderId() == null) {
|
|
continue;
|
|
continue;
|
|
}
|
|
}
|
|
@@ -351,9 +354,7 @@ public class ExamStudentController extends BaseApiController {
|
|
headerNames.add(user.getName());
|
|
headerNames.add(user.getName());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- map.put("markerNames", StringUtils.join(markerNames, ","));
|
|
|
|
- map.put("headerNames", StringUtils.join(headerNames, ","));
|
|
|
|
- return map;
|
|
|
|
|
|
+ return StringUtils.join(headerNames, ",");
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|