2 Commits da494093a0 ... cdf54b3650

Author SHA1 Message Date
  Crazy cdf54b3650 Merge branch 'master' of http://gogs.gisvg.com/YDM/graduate 11 hours ago
  Crazy d2df553105 1.9 11 hours ago
9 changed files with 28 additions and 43 deletions
  1. 9 9
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/studentSelectSupervisorRecord/StudentSelectSupervisorRecordController.java
  2. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/studentSelectSupervisorRecord/vo/StudentSelectSupervisorRecordPageReqVO.java
  3. 1 1
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/studentSelectSupervisorRecord/vo/StudentSelectSupervisorRecordRespVO.java
  4. 0 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/studentSelectSupervisorRecord/vo/StudentSelectSupervisorRecordSaveReqVO.java
  5. 2 5
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/studentSelectionProject/studentSelectionProjectController.java
  6. 12 12
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserController.java
  7. 2 2
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java
  8. 1 5
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/studentSelectSupervisorRecord/studentSelectSupervisorRecordDO.java
  9. 0 4
      yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/studentSelectSupervisorRecord/studentSelectSupervisorRecordMapper.java

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

@@ -158,13 +158,13 @@ public class StudentSelectSupervisorRecordController {
         AdminUserDO student  =adminUserService.getUser(createReqVO.getStudentId());
 
         LocalDateTime dateTime =LocalDateTime.now();
-        Integer nextYear =dateTime.getYear()+1 ;
+        Integer lastYear =dateTime.getYear()-1 ;
         studentSelectionProjectSaveReqVO project =new studentSelectionProjectSaveReqVO();
-        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(nextYear),studentSelectionProjectSaveReqVO.class);
+        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(lastYear),studentSelectionProjectSaveReqVO.class);
         studentSelectionProjectSaveReqVO project2 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(dateTime.getYear()),studentSelectionProjectSaveReqVO.class);
         project =project1==null?project2:project1;
         if (project==null) {
-            return error(1,"今年还没有创建互选项目");
+            return error(1,"找不到互选项目");
         }
 
             Integer occupiedAcademicSlots = adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),createReqVO.getSupervisorId(), 1);//占用学硕
@@ -191,7 +191,7 @@ public class StudentSelectSupervisorRecordController {
             } else if (record2 != null) {
                 return error(1, "还有请求在待处理中");
             }
-
+            createReqVO.setProjectId(project.getId());
             createReqVO.setSelectType(2);//同意
 
             studentSelectSupervisorRecordService.createStudentSelectSupervisorRecord(createReqVO);
@@ -210,7 +210,7 @@ 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(project.getStudentGrade(),updateReqVO.getSupervisorId(),1);//占用学硕
         Integer  occupiedProfessionalSlots =adminUserService.countStudentListBySupervisorId(project.getStudentGrade(),updateReqVO.getSupervisorId(),2);//占用专硕
@@ -434,9 +434,9 @@ public class StudentSelectSupervisorRecordController {
     @PreAuthorize("@ss.hasPermission('system:student-select-supervisor-record:getSelectionList')")
     public CommonResult<List<PrintBookVO>> getSelectionBookList() {
         LocalDate date =LocalDate.now();
-        Integer nextYear =date.getYear()+1 ;
+        Integer lastYear =date.getYear()-1 ;
         studentSelectionProjectSaveReqVO project =new studentSelectionProjectSaveReqVO();
-        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(nextYear),studentSelectionProjectSaveReqVO.class);
+        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(lastYear),studentSelectionProjectSaveReqVO.class);
         studentSelectionProjectSaveReqVO project2 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(date.getYear()),studentSelectionProjectSaveReqVO.class);
         project =project1==null?project2:project1;
         if (project == null) {
@@ -468,9 +468,9 @@ public class StudentSelectSupervisorRecordController {
         Set<Long> roleIds =permissionService.getUserRoleIdListByUserId(loginId);
 
         LocalDate date =LocalDate.now();
-        Integer nextYear =date.getYear()+1 ;
+        Integer lastYear =date.getYear()-1 ;
         studentSelectionProjectSaveReqVO project =new studentSelectionProjectSaveReqVO();
-        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(nextYear),studentSelectionProjectSaveReqVO.class);
+        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(lastYear),studentSelectionProjectSaveReqVO.class);
         studentSelectionProjectSaveReqVO project2 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(date.getYear()),studentSelectionProjectSaveReqVO.class);
         project =project1==null?project2:project1;
         if (project==null){

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

@@ -41,7 +41,7 @@ public class StudentSelectSupervisorRecordPageReqVO extends PageParam {
     private String supervisorSignature;
 
     @Schema(description = "校外导师id", example = "17747")
-    private Integer externalSupervisorId;
+    private Long externalSupervisorId;
 
     @Schema(description = "硕士类型")
     private Integer masterType;

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

@@ -55,7 +55,7 @@ public class StudentSelectSupervisorRecordRespVO {
 
     @Schema(description = "校外导师id", example = "17747")
     @ExcelProperty("校外导师id")
-    private Integer externalSupervisorId;
+    private Long externalSupervisorId;
 
     @Schema(description = "硕士类型")
     @DictFormat("system_student_master_type")

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

@@ -33,15 +33,11 @@ public class StudentSelectSupervisorRecordSaveReqVO {
     private String studentSignature;
 
     @Schema(description = "导师审批时间")
-    @TableField(fill = FieldFill.UPDATE)//可以插入null值
     private LocalDateTime supervisorApproveTime;
 
     @Schema(description = "导师电子签名")
     private String supervisorSignature;
 
-    @Schema(description = "校外导师id", example = "17747")
-    private Integer externalSupervisorId;
-
     @Schema(description = "学生签字日期")
     private LocalDate studentSignDate;
 

+ 2 - 5
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/studentSelectionProject/studentSelectionProjectController.java

@@ -87,11 +87,8 @@ public class studentSelectionProjectController {
             return error(1,"时间设置错误");
         }
         LocalDate date =LocalDate.now();
-        Integer nextYear =date.getYear()+1 ;
-        studentSelectionProjectSaveReqVO project =new studentSelectionProjectSaveReqVO();
-        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(nextYear),studentSelectionProjectSaveReqVO.class);
-        studentSelectionProjectSaveReqVO project2 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(date.getYear()),studentSelectionProjectSaveReqVO.class);
-        project =project1==null?project2:project1;
+
+        studentSelectionProjectSaveReqVO project = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(date.getYear()),studentSelectionProjectSaveReqVO.class);
         if (project!=null){
             return error(1,"今年已经创建过项目了");
         }else {

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

@@ -355,9 +355,9 @@ public class UserController {
         }
 //      //查询用户的选择状态()
         LocalDate date =LocalDate.now();
-        Integer nextYear =date.getYear()+1 ;
+        Integer lastYear =date.getYear()-1 ;
         studentSelectionProjectSaveReqVO project =new studentSelectionProjectSaveReqVO();
-        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(nextYear),studentSelectionProjectSaveReqVO.class);
+        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(lastYear),studentSelectionProjectSaveReqVO.class);
         studentSelectionProjectSaveReqVO project2 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(date.getYear()),studentSelectionProjectSaveReqVO.class);
         project =project1==null?project2:project1;
         if (project!=null) {
@@ -621,9 +621,9 @@ public class UserController {
         AdminUserDO loginUser =userService.getUser(loginId);
         Set<Long> roleIds = permissionService.getUserRoleIdListByUserId(loginId);
 
-        Integer nextYear =date.getYear()+1 ;
+        Integer lastYear =date.getYear()-1 ;
         studentSelectionProjectSaveReqVO project =new studentSelectionProjectSaveReqVO();
-        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(nextYear),studentSelectionProjectSaveReqVO.class);
+        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(lastYear),studentSelectionProjectSaveReqVO.class);
         studentSelectionProjectSaveReqVO project2 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(date.getYear()),studentSelectionProjectSaveReqVO.class);
         project =project1==null?project2:project1;
         if (project==null){
@@ -658,9 +658,9 @@ public class UserController {
             userService.updatePop(popData);
 
             LocalDate date =LocalDate.now();
-            Integer nextYear =date.getYear()+1 ;
+            Integer lastYear =date.getYear()-1 ;
             studentSelectionProjectSaveReqVO project =new studentSelectionProjectSaveReqVO();
-            studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(nextYear),studentSelectionProjectSaveReqVO.class);
+            studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(lastYear),studentSelectionProjectSaveReqVO.class);
             studentSelectionProjectSaveReqVO project2 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(date.getYear()),studentSelectionProjectSaveReqVO.class);
             project =project1==null?project2:project1;
 
@@ -710,13 +710,13 @@ public class UserController {
     @PreAuthorize("@ss.hasPermission('system:user:getPassedStudentsPage')")
     public CommonResult<PageResult<AdminUserDO>> getPassedStudentsPage(@Valid UserPageReqVO pageReqVO) {
         LocalDate date =LocalDate.now();
-        Integer nextYear =date.getYear()+1 ;
+        Integer lastYear =date.getYear()-1 ;
         studentSelectionProjectSaveReqVO project =new studentSelectionProjectSaveReqVO();
-        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(nextYear),studentSelectionProjectSaveReqVO.class);
+        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(lastYear),studentSelectionProjectSaveReqVO.class);
         studentSelectionProjectSaveReqVO project2 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(date.getYear()),studentSelectionProjectSaveReqVO.class);
         project =project1==null?project2:project1;
         if (project==null) {
-            return error(1,"今年还没有创建互选项目");
+            return error(1,"还没有创建互选项目");
         }
         pageReqVO.setGrade(project.getStudentGrade());
         pageReqVO.setUserType("1");
@@ -730,13 +730,13 @@ public class UserController {
     @PreAuthorize("@ss.hasPermission('system:user:getUnPassedStudentsPage')")
     public CommonResult<PageResult<AdminUserDO>> getUnPassedStudentsPage(@Valid UserPageReqVO reqVO) {
         LocalDate date =LocalDate.now();
-        Integer nextYear =date.getYear()+1 ;
+        Integer lastYear =date.getYear()-1 ;
         studentSelectionProjectSaveReqVO project =new studentSelectionProjectSaveReqVO();
-        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(nextYear),studentSelectionProjectSaveReqVO.class);
+        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(lastYear),studentSelectionProjectSaveReqVO.class);
         studentSelectionProjectSaveReqVO project2 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(date.getYear()),studentSelectionProjectSaveReqVO.class);
         project =project1==null?project2:project1;
         if (project==null) {
-            return error(1,"今年还没有创建互选项目");
+            return error(1,"还没有创建互选项目");
         }
 
         reqVO.setGrade(project.getStudentGrade());

+ 2 - 2
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/controller/admin/user/UserProfileController.java

@@ -85,9 +85,9 @@ public class UserProfileController {
 
         //获取互选项目用户的选择状态()
         LocalDate date =LocalDate.now();
-        Integer nextYear =date.getYear()+1 ;
+        Integer lastYear =date.getYear()-1 ;
         studentSelectionProjectSaveReqVO project =new studentSelectionProjectSaveReqVO();
-        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(nextYear),studentSelectionProjectSaveReqVO.class);
+        studentSelectionProjectSaveReqVO project1 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(lastYear),studentSelectionProjectSaveReqVO.class);
         studentSelectionProjectSaveReqVO project2 = BeanUtils.toBean(studentSelectionProjectService.getStudentSelectionProjectByYear(date.getYear()),studentSelectionProjectSaveReqVO.class);
         project =project1==null?project2:project1;
         if (project!=null) {

+ 1 - 5
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/dataobject/studentSelectSupervisorRecord/studentSelectSupervisorRecordDO.java

@@ -45,13 +45,9 @@ public class studentSelectSupervisorRecordDO extends BaseDO {
      * 校内导师id
      */
     private Long supervisorId;
-    /**
-     * 校外导师id
-     */
-    private Long externalSupervisorId;
 
     /**
-     * 选择状态(0编辑(撤回),1待处理,2同意,3退回)
+     * 选择状态(0(撤回),1待处理,2同意,3退回)
      */
     private Integer selectType;
     /**

+ 0 - 4
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/dal/mysql/studentSelectSupervisorRecord/studentSelectSupervisorRecordMapper.java

@@ -49,7 +49,6 @@ public interface studentSelectSupervisorRecordMapper extends BaseMapperX<student
                 .eqIfExists(studentSelectSupervisorRecordDO::getSelectType, reqVO.getSelectType())
                 .eqIfExists(studentSelectSupervisorRecordDO::getStudentSignature, reqVO.getStudentSignature())
                 .eqIfExists(studentSelectSupervisorRecordDO::getSupervisorSignature, reqVO.getSupervisorSignature())
-                .eqIfExists(studentSelectSupervisorRecordDO::getExternalSupervisorId, reqVO.getExternalSupervisorId())
                 .orderByDesc(studentSelectSupervisorRecordDO::getCreateTime);
 
         if (roleIds.contains(113L)){//导师看自己的待处理,同意,退回
@@ -91,7 +90,6 @@ public interface studentSelectSupervisorRecordMapper extends BaseMapperX<student
                 .eqIfExists(studentSelectSupervisorRecordDO::getSelectType, reqVO.getSelectType())
                 .eqIfExists(studentSelectSupervisorRecordDO::getStudentSignature, reqVO.getStudentSignature())
                 .eqIfExists(studentSelectSupervisorRecordDO::getSupervisorSignature, reqVO.getSupervisorSignature())
-                .eqIfExists(studentSelectSupervisorRecordDO::getExternalSupervisorId, reqVO.getExternalSupervisorId())
                 .orderByDesc(studentSelectSupervisorRecordDO::getCreateTime);
         if (roleIds.contains(113L)){//导师看自己的待处理,同意,退回
             queryWrapperX.eqIfPresent(studentSelectSupervisorRecordDO::getSupervisorId,loginUser.getId())
@@ -136,7 +134,6 @@ public interface studentSelectSupervisorRecordMapper extends BaseMapperX<student
                 .eqIfExists(studentSelectSupervisorRecordDO::getSelectType, reqVO.getSelectType())
                 .eqIfExists(studentSelectSupervisorRecordDO::getStudentSignature, reqVO.getStudentSignature())
                 .eqIfExists(studentSelectSupervisorRecordDO::getSupervisorSignature, reqVO.getSupervisorSignature())
-                .eqIfExists(studentSelectSupervisorRecordDO::getExternalSupervisorId, reqVO.getExternalSupervisorId())
                 .orderByDesc(studentSelectSupervisorRecordDO::getCreateTime);
 
         if (roleIds.contains(113L)){//导师看自己的待处理
@@ -170,7 +167,6 @@ public interface studentSelectSupervisorRecordMapper extends BaseMapperX<student
                 .eqIfExists(studentSelectSupervisorRecordDO::getSelectType, reqVO.getSelectType())
                 .eqIfExists(studentSelectSupervisorRecordDO::getStudentSignature, reqVO.getStudentSignature())
                 .eqIfExists(studentSelectSupervisorRecordDO::getSupervisorSignature, reqVO.getSupervisorSignature())
-                .eqIfExists(studentSelectSupervisorRecordDO::getExternalSupervisorId, reqVO.getExternalSupervisorId())
                 .orderByDesc(studentSelectSupervisorRecordDO::getCreateTime);
 
         if (roleIds.contains(113L)){//导师看自己的同意和退回