Browse Source

1.9所有校内导师

Crazy 9 hours ago
parent
commit
bdb123a2db

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

@@ -232,15 +232,16 @@ public class StudentSelectSupervisorRecordController {
             //更新志愿
             UserSaveReqVO saveReqVO = new UserSaveReqVO();
             saveReqVO.setId(record.getStudentId());
-            System.out.println(updateReqVO.getSupervisorId());
+
+//            设置导师id和校外导师id
             if (updateReqVO.getSupervisorId() != null) {
                 AdminUserDO supervisor = adminUserService.getUser(updateReqVO.getSupervisorId());
                 if (supervisor != null) {
-                    if (supervisor.getUserType().equals("3")) {
+                    if (supervisor.getUserType().equals("3")) { //如果是校内导师
                         saveReqVO.setSupervisorId(updateReqVO.getSupervisorId());
-                    } else if (supervisor.getUserType().equals("5")) {
+                    } else if (supervisor.getUserType().equals("5")) {//如果是校外导师
                         saveReqVO.setExternalSupervisorId(updateReqVO.getSupervisorId());
-//                //校外导师的合作导师
+                        //还要添加校内导师的id(直接就是校外导师的合作导师)
                         if (supervisor.getSupervisorId() != null && supervisor.getSupervisorId() != 0) {
                             saveReqVO.setSupervisorId(supervisor.getSupervisorId());
                         }
@@ -484,19 +485,12 @@ public class StudentSelectSupervisorRecordController {
             userSaveReqVO.setIntroduction(updateVo.getIntroduction());//用户简历
         }
 
-        StudentSelectSupervisorRecordSaveReqVO recordUpdateReqVO =new StudentSelectSupervisorRecordSaveReqVO();
         if (roleIds.contains(112L)){
             if (updateVo.getMobile()!=null&&!updateVo.getMobile().isEmpty()){
                 userSaveReqVO.setMobile(updateVo.getMobile());
             }
 
         }else if (roleIds.contains(113L)){//导师
-            //导师提交签名,通过的时候提交
-//            if (updateVo.getSupervisorSignature()!=null&&!updateVo.getSupervisorSignature().isEmpty()) {
-//                recordUpdateReqVO.setId(updateVo.getId());
-//                recordUpdateReqVO.setStudentSignature(updateVo.getSupervisorSignature());
-//                studentSelectSupervisorRecordService.updateStudentSelectSupervisorRecord(recordUpdateReqVO);
-//            }
             //导师填写信息
             //1.研究方向
             if (updateVo.getMajor()!=null&&!updateVo.getMajor().isEmpty()){
@@ -506,8 +500,14 @@ public class StudentSelectSupervisorRecordController {
             if (updateVo.getTitle()!=null&&!updateVo.getTitle().isEmpty()){
                 userSaveReqVO.setTitle(updateVo.getTitle());
             }
-            //学生成果要求,和名额填写
-
+            if (updateVo.getWorkPlace()!=null&&!updateVo.getWorkPlace().isEmpty()){
+                userSaveReqVO.setWorkPlace(updateVo.getWorkPlace());
+            }
+            //设置合作的校内导师id
+            if (updateVo.getSupervisorId()!=null){
+                userSaveReqVO.setSupervisorId(updateVo.getSupervisorId());
+            }
+            //学生成果要求
             supervisorSelectionSettingDO setting = supervisorSelectionSettingService.getSettingBySupervisorIdAndProjectId(loginId,project.getId());
             if (updateVo.getStudentAchievementRequirement()!=null&&!updateVo.getStudentAchievementRequirement().isEmpty()){
                 setting.setStudentAchievementRequirement(updateVo.getStudentAchievementRequirement());

+ 6 - 0
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/studentSelectSupervisorRecord/vo/SelectionBookRespVO.java

@@ -29,6 +29,9 @@ public class SelectionBookRespVO {
     @Schema(description = "学生联系电话")
     private String mobile;
 
+    @Schema(description = "导师id")
+    private Long supervisorId;
+
     @Schema(description = "导师名称")
     private String supervisor;
 
@@ -56,5 +59,8 @@ public class SelectionBookRespVO {
     @Schema(description = "职称")
     private String title;
 
+    @Schema(description = "工作地点")
+    private String workPlace;
+
 
 }

+ 7 - 0
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java

@@ -271,6 +271,13 @@ public class UserController {
         List<AdminUserDO> User = userService.getExternalSupervisor();
         return success(User);
     }
+//获取所有校内的导师
+    @GetMapping("/getInnerSupervisor")
+    @Operation(summary = "获得所有校内导师")
+    public CommonResult<List<AdminUserDO>> getInnerSupervisor() {
+        List<AdminUserDO> User = userService.getInnerSupervisor();
+        return success(User);
+    }
 
     //工作间详情
     @GetMapping("/DeptSupervisor")

+ 6 - 0
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/user/AdminUserMapper.java

@@ -300,6 +300,12 @@ public interface AdminUserMapper extends BaseMapperX<AdminUserDO> {
         return selectList(queryWrapper);
     }
 
+    default List<AdminUserDO> getInnerSupervisor() {
+        LambdaQueryWrapperX<AdminUserDO> queryWrapper = (LambdaQueryWrapperX<AdminUserDO>) new LambdaQueryWrapperX<AdminUserDO>()
+                .eqIfPresent(AdminUserDO::getUserType,3);
+        return selectList(queryWrapper);
+    }
+
     //  查登录工作间下的用户列表
     default List<AdminUserDO> selectDeptUser(UserPageReqVO reqVO) {
         Long deptId = SecurityFrameworkUtils.getLoginUserDeptId();

+ 2 - 0
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserService.java

@@ -140,6 +140,8 @@ public interface AdminUserService {
 
     List<AdminUserDO> getExternalSupervisor();
 
+    List<AdminUserDO> getInnerSupervisor();
+
     List<AdminUserDO> selectAllList(UserPageReqVO reqVO);
     /**
      * 通过用户 ID 查询用户

+ 4 - 0
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/user/AdminUserServiceImpl.java

@@ -530,6 +530,10 @@ public class AdminUserServiceImpl implements AdminUserService {
     public List<AdminUserDO> getExternalSupervisor() {
         return userMapper.getExternalSupervisor();
     }
+    @Override
+    public List<AdminUserDO> getInnerSupervisor(){
+        return userMapper.getInnerSupervisor();
+    }
 
     //<>