Crazy 14 hours ago
parent
commit
4cdd1d1edc

+ 1 - 11
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/studentSelectSupervisorRecord/StudentSelectSupervisorRecordController.java

@@ -210,8 +210,7 @@ public class StudentSelectSupervisorRecordController {
         studentSelectSupervisorRecordDO record =studentSelectSupervisorRecordService.getStudentSelectSupervisorRecord(updateReqVO.getId());
         //
         studentSelectionProjectSaveReqVO project = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProject(record.getProjectId()), studentSelectionProjectSaveReqVO.class);
-
-        Integer selectStatus =adminUserService.getUserSelectStatus(updateReqVO.getStudentId(),project.getId());
+        
         AdminUserDO user =adminUserService.getUser(record.getStudentId());
         Integer  occupiedAcademicSlots =adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),updateReqVO.getSupervisorId(),1);//占用学硕
         Integer  occupiedProfessionalSlots =adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),updateReqVO.getSupervisorId(),2);//占用专硕
@@ -230,14 +229,6 @@ public class StudentSelectSupervisorRecordController {
                 return error(1, "该老师专硕名额已经满了");
             }
         }
-        if (selectStatus==0){//未提交要新建直接同意
-            StudentSelectSupervisorRecordSaveReqVO createReqVO =new StudentSelectSupervisorRecordSaveReqVO();
-            createReqVO.setStudentId(user.getId());
-            createReqVO.setSupervisorId(updateReqVO.getSupervisorId());
-            createReqVO.setProjectId(project.getId());
-            createReqVO.setSelectType(2);
-            studentSelectSupervisorRecordService.createStudentSelectSupervisorRecord(createReqVO);
-        }else {
             //更新志愿
             UserSaveReqVO saveReqVO = new UserSaveReqVO();
             saveReqVO.setId(record.getStudentId());
@@ -270,7 +261,6 @@ public class StudentSelectSupervisorRecordController {
             }
             adminUserService.updateUser(saveReqVO);
             studentSelectSupervisorRecordService.updateRecordNull(BeanUtils.toBean(record, StudentSelectSupervisorRecordSaveReqVO.class));
-        }
         return success("志愿修改成功");
     }