| | |
| | | import cn.iocoder.yudao.module.hrm.dal.dataobject.employee.HrmEmployeeDO; |
| | | import cn.iocoder.yudao.module.hrm.service.certificate.HrmCertificateService; |
| | | import cn.iocoder.yudao.module.hrm.service.employee.HrmEmployeeService; |
| | | import cn.iocoder.yudao.module.hrm.service.remind.HrmExpiryRemindService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | |
| | | private HrmCertificateService certificateService; |
| | | @Resource |
| | | private HrmEmployeeService employeeService; |
| | | @Resource |
| | | private HrmExpiryRemindService expiryRemindService; |
| | | |
| | | @PostMapping("/create") |
| | | @Operation(summary = "创建证书资质") |
| | |
| | | @Operation(summary = "获得证书资质分页") |
| | | @PreAuthorize("@ss.hasPermission('hrm:certificate:query')") |
| | | public CommonResult<PageResult<HrmCertificateRespVO>> getCertificatePage(@Valid HrmCertificatePageReqVO pageReqVO) { |
| | | // 懒触发:有人打开证书列表时顺带补扫即将到期证书并发送站内信提醒(best-effort) |
| | | try { |
| | | expiryRemindService.sendCertificateExpireRemind(); |
| | | } catch (Exception ignored) { |
| | | } |
| | | PageResult<HrmCertificateDO> pageResult = certificateService.getCertificatePage(pageReqVO); |
| | | if (CollUtil.isEmpty(pageResult.getList())) { |
| | | return success(PageResult.empty(pageResult.getTotal())); |