|
@@ -110,8 +110,8 @@ public class StudentSelectSupervisorRecordController {
|
|
|
if ((roleIds.contains(112L) || roleIds.contains(113L)) && project.getSupervisorConfirmDeadline().isBefore(dateTime)) {
|
|
|
return error(1, "该项目已过截至日期");
|
|
|
}else {
|
|
|
- Integer occupiedAcademicSlots = adminUserService.countStudentListBySupervisorId(Math.toIntExact(createReqVO.getSupervisorId()), 1);//占用学硕
|
|
|
- Integer occupiedProfessionalSlots = adminUserService.countStudentListBySupervisorId(Math.toIntExact(createReqVO.getSupervisorId()), 2);//占用专硕
|
|
|
+ Integer occupiedAcademicSlots = adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),Math.toIntExact(createReqVO.getSupervisorId()), 1);//占用学硕
|
|
|
+ Integer occupiedProfessionalSlots = adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),Math.toIntExact(createReqVO.getSupervisorId()), 2);//占用专硕
|
|
|
supervisorSelectionSettingDO supervisorSelectionSetting = supervisorSelectionSettingService.getSettingBySupervisorIdAndProjectId(createReqVO.getSupervisorId(), createReqVO.getProjectId());
|
|
|
|
|
|
if (supervisorSelectionSetting == null || (supervisorSelectionSetting.getAcademicSlots() == null && supervisorSelectionSetting.getProfessionalSlots() == null)) {
|
|
@@ -154,9 +154,10 @@ public class StudentSelectSupervisorRecordController {
|
|
|
|
|
|
studentSelectSupervisorRecordDO record =studentSelectSupervisorRecordService.getStudentSelectSupervisorRecord(updateReqVO.getId());
|
|
|
//
|
|
|
+ studentSelectionProjectSaveReqVO project = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProject(record.getProjectId()), studentSelectionProjectSaveReqVO.class);
|
|
|
AdminUserDO user =adminUserService.getUser(record.getStudentId());
|
|
|
- Integer occupiedAcademicSlots =adminUserService.countStudentListBySupervisorId(Math.toIntExact(updateReqVO.getSupervisorId()),1);//占用学硕
|
|
|
- Integer occupiedProfessionalSlots =adminUserService.countStudentListBySupervisorId(Math.toIntExact(updateReqVO.getSupervisorId()),2);//占用专硕
|
|
|
+ Integer occupiedAcademicSlots =adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),Math.toIntExact(updateReqVO.getSupervisorId()),1);//占用学硕
|
|
|
+ Integer occupiedProfessionalSlots =adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),Math.toIntExact(updateReqVO.getSupervisorId()),2);//占用专硕
|
|
|
supervisorSelectionSettingDO supervisorSelectionSetting = supervisorSelectionSettingService.getSettingBySupervisorIdAndProjectId(updateReqVO.getSupervisorId(), record.getProjectId());
|
|
|
// 检查导师是否有名额设置
|
|
|
if (supervisorSelectionSetting == null || (supervisorSelectionSetting.getAcademicSlots() == null && supervisorSelectionSetting.getProfessionalSlots() == null)) {
|
|
@@ -272,8 +273,8 @@ public class StudentSelectSupervisorRecordController {
|
|
|
Long loginId = SecurityFrameworkUtils.getLoginUserId();
|
|
|
Set<Long> roleIds = permissionService.getUserRoleIdListByUserId(loginId);
|
|
|
|
|
|
- Integer occupiedAcademicSlots = adminUserService.countStudentListBySupervisorId(Math.toIntExact(loginId), 1);//占用学硕名额
|
|
|
- Integer occupiedProfessionalSlots = adminUserService.countStudentListBySupervisorId(Math.toIntExact(loginId), 2);//占用专硕名额
|
|
|
+ Integer occupiedAcademicSlots = adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),Math.toIntExact(loginId), 1);//占用学硕名额
|
|
|
+ Integer occupiedProfessionalSlots = adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),Math.toIntExact(loginId), 2);//占用专硕名额
|
|
|
|
|
|
supervisorSelectionSettingDO supervisorSelectionSetting = supervisorSelectionSettingService.getSettingBySupervisorIdAndProjectId(loginId, project.getId());
|
|
|
// 检查导师是否有名额设置
|