教室班级详情
build / build-push (push) Successful in 50s

This commit is contained in:
wanghu
2026-10-20 14:45:17 +08:00
parent 21d15bd79f
commit 109ea9e4d4
@@ -144,7 +144,7 @@ public class ClassroomService implements IClassroomService {
List<Classroom> pageRooms = rooms.subList(from, to);
// 绑定班级信息(行内展示:班级名/学生人数/班主任)
// 绑定班级信息(行内展示 + 教室详情面板:年级/班级名/学生人数/班主任)
// 本页教室的设备关联 → 设备名映射、数量映射(quantity 列为后加,存量 NULL 按 1)
List<Integer> pageRoomIds = pageRooms.stream().map(Classroom::getId).collect(Collectors.toList());
Map<Integer, Map<Integer, Integer>> roomEquipmentQty = new HashMap<>();
@@ -168,6 +168,8 @@ public class ClassroomService implements IClassroomService {
PlatformSchoolClass bound = r.getClassId() != null ? classMap.get(r.getClassId()) : null;
vo.put("classId", r.getClassId());
vo.put("className", bound != null ? bound.displayName() : null);
vo.put("grade", bound != null ? bound.highGrade() : null);
vo.put("gradeName", bound != null ? bound.getGradeName() : null);
vo.put("studentCount", bound != null ? stuCounts.get(r.getClassId()) : null);
vo.put("headTeacher", bound != null ? bound.getFirstTeacherName() : null);
Map<Integer, Integer> eqQty = roomEquipmentQty.getOrDefault(r.getId(), Collections.emptyMap());