Joburgess 5 years ago
parent
commit
8c00532e81

+ 4 - 0
edu-user/edu-user-server/src/main/java/com/keao/edu/user/service/impl/ExamRoomServiceImpl.java

@@ -148,6 +148,10 @@ public class ExamRoomServiceImpl extends BaseServiceImpl<Long, ExamRoom> impleme
 			examRoom.setAssistantTeacherUserNameList(StringUtils.join(assistantTeacherNames, ","));
 		}
 
+		List<Integer> subjectIds = Arrays.stream(examRoom.getSubjectIdList().split(",")).map(e -> Integer.valueOf(e)).collect(Collectors.toList());
+		Map<Integer, String> subjectIdNameMap = this.getMap("subject", "id_", "name_", subjectIds, Integer.class, String.class);
+		examRoom.setSubjectNameList(StringUtils.join(subjectIdNameMap.keySet(),","));
+
 		List<ExamRoom> examRooms=new ArrayList<>();
 		List<JSONObject> examTimes = JSON.parseArray(examRoom.getExamTimeJson(), JSONObject.class);
 		for (JSONObject examTime : examTimes) {