| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得证书资质") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('hrm:certificate:query')") |
| | | public CommonResult<HrmCertificateRespVO> getCertificate(@RequestParam("id") Long id) { |
| | | HrmCertificateDO certificate = certificateService.getCertificate(id); |
| | | return success(certificate != null ? buildRespVO(certificate) : null); |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得证书资质分页") |
| | | @PreAuthorize("@ss.hasPermission('hrm:certificate:query')") |
| | | public CommonResult<PageResult<HrmCertificateRespVO>> getCertificatePage(@Valid HrmCertificatePageReqVO pageReqVO) { |
| | | // 懒触发:有人打开证书列表时顺带补扫即将到期证书并发送站内信提醒(best-effort) |
| | | try { |
| | |
| | | .expireDate(LocalDate.of(2029, 1, 1)).remark("").build() |
| | | ); |
| | | // 输出 |
| | | ExcelUtils.write(response, "证书资质导入模板.xls", "证书资质列表", HrmCertificateImportExcelVO.class, list); |
| | | ExcelUtils.writeTemplate(response, "证书资质导入模板.xls", "证书资质列表", HrmCertificateImportExcelVO.class, list); |
| | | } |
| | | |
| | | @PostMapping("/import") |