Crazy před 2 dny
rodič
revize
ef51319e26

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

@@ -472,4 +472,13 @@ public class StudentSelectSupervisorRecordController {
     public CommonResult<List<StudentSelectSupervisorRecordRespVO>> getRecordSelectSupervisorRecordList(@Valid StudentSelectSupervisorRecordPageReqVO listReqVO) {
         return success(BeanUtils.toBean(studentSelectSupervisorRecordService.getStudentSelectSupervisorRecordList(listReqVO), StudentSelectSupervisorRecordRespVO.class));
     }
+
+    //返回当前导师的签名历史记录
+    @GetMapping("/getSupervisorSignature")
+    @Operation(summary = "获取导师的最近一次的签名")
+    @PreAuthorize("@ss.hasPermission('system:student-select-supervisor-record:getSupervisorSignature')")
+    public CommonResult<String> getSupervisorSignatures() {
+        Long loginId =SecurityFrameworkUtils.getLoginUserId();
+        return success(studentSelectSupervisorRecordService.getSupervisorSignatureById(loginId));
+    }
 }

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

@@ -116,4 +116,8 @@ public interface studentSelectSupervisorRecordMapper extends BaseMapperX<student
 
     List<PrintBookVO> getSelectionBookListByProjectId( @Param("projectId") Integer projectId);
 
+    //获取导师历史签名
+    @Select("SELECT supervisor_signature FROM student_select_supervisor_record WHERE supervisor_id=#{supervisorId} AND select_type =2 AND supervisor_signature IS NOT NULL AND supervisor_signature != '' AND deleted =0 ORDER BY ABS(DATEDIFF(CURDATE(), supervisor_sign_date)) LIMIT 1")
+    String getSupervisorSignatureById(@Param("supervisorId") Long supervisorId);
+
 }

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

@@ -63,6 +63,8 @@ public interface studentSelectSupervisorRecordService {
 
     List<PrintBookVO> getSelectionBookListByProjectId(Integer projectId);
 
+    String getSupervisorSignatureById(Long supervisorId);
+
 
 
 }

+ 5 - 0
yudao-module-system/yudao-module-system-biz/src/main/java/cn/iocoder/yudao/module/system/service/studentSelectSupervisorRecord/studentSelectSupervisorRecordServiceImpl.java

@@ -125,4 +125,9 @@ public class studentSelectSupervisorRecordServiceImpl implements studentSelectSu
         return studentSelectSupervisorRecordMapper.getSelectionBookListByProjectId(projectId);
     }
 
+    @Override
+    public String getSupervisorSignatureById(Long supervisorId){
+        return studentSelectSupervisorRecordMapper.getSupervisorSignatureById(supervisorId);
+    }
+
 }