|
|
@@ -18,14 +18,18 @@ import com.xjrsoft.module.base.entity.BaseClass;
|
|
|
import com.xjrsoft.module.base.entity.BaseGrade;
|
|
|
import com.xjrsoft.module.base.service.IBaseClassService;
|
|
|
import com.xjrsoft.module.base.service.IBaseGradeService;
|
|
|
+import com.xjrsoft.module.concat.service.IXjrUserService;
|
|
|
+import com.xjrsoft.module.room.service.IRoomBedService;
|
|
|
import com.xjrsoft.module.student.dto.AddBaseStudentUserDto;
|
|
|
import com.xjrsoft.module.student.dto.BaseStudentUserPageDto;
|
|
|
import com.xjrsoft.module.student.dto.UpdateBaseStudentUserDto;
|
|
|
import com.xjrsoft.module.student.entity.BaseStudentUser;
|
|
|
import com.xjrsoft.module.student.service.IStudentManagerService;
|
|
|
+import com.xjrsoft.module.student.vo.BaseStudentSchoolRollVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentTreeVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentUserPageVo;
|
|
|
import com.xjrsoft.module.student.vo.BaseStudentUserVo;
|
|
|
+import com.xjrsoft.module.teacher.entity.XjrUser;
|
|
|
import io.swagger.annotations.Api;
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
import lombok.AllArgsConstructor;
|
|
|
@@ -57,7 +61,8 @@ public class StudentManagerController {
|
|
|
private final IStudentManagerService studentManagerService;
|
|
|
private final IBaseGradeService baseGradeService;
|
|
|
private final IBaseClassService baseClassService;
|
|
|
-
|
|
|
+ private final IXjrUserService xjrUserService;
|
|
|
+ private final IRoomBedService roomBedService;
|
|
|
@GetMapping(value = "/page")
|
|
|
@ApiOperation(value = "学生列表(分页)")
|
|
|
@SaCheckPermission("studentmanager:detail")
|
|
|
@@ -137,6 +142,16 @@ public class StudentManagerController {
|
|
|
return R.error("找不到此数据!");
|
|
|
}
|
|
|
BaseStudentUserVo userVo = BeanUtil.toBean(baseStudentUser, BaseStudentUserVo.class);
|
|
|
+
|
|
|
+ for (BaseStudentSchoolRollVo roll : userVo.getBaseStudentSchoolRollList()) {
|
|
|
+ BaseClass aClass = baseClassService.getById(roll.getClassId());
|
|
|
+ XjrUser xjrUser = xjrUserService.getById(aClass.getTeacherId());
|
|
|
+ roll.setTeacherName(xjrUser.getName());
|
|
|
+
|
|
|
+ String roomName = roomBedService.getRoomNameByStudentUserId(roll.getUserId());
|
|
|
+ roll.setRoomName(roomName);
|
|
|
+ }
|
|
|
+
|
|
|
userVo.setGenderCn(GenderDictionaryEnum.getValue(userVo.getGender()));
|
|
|
return R.ok(userVo);
|
|
|
}
|