| | |
| | | } |
| | | |
| | | @GetMapping("/download-template") |
| | | @Operation(summary = "下载合同空白模板", description = "1-劳动合同(简版) 2-劳动合同(标准) 3-劳务合同") |
| | | @Parameter(name = "type", description = "模板类型:1-劳动合同(简版) 2-劳动合同(标准) 3-劳务合同", required = true) |
| | | @Operation(summary = "下载合同空白模板", description = "1-劳动合同(简版) 2-劳动合同(标准) 3-劳务合同 4-退休返聘合同") |
| | | @Parameter(name = "type", description = "模板类型:1-劳动合同(简版) 2-劳动合同(标准) 3-劳务合同 4-退休返聘合同", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:employee-contract:query')") |
| | | public void downloadTemplate(@RequestParam("type") Integer type, HttpServletResponse response) throws IOException { |
| | | String path; |
| | |
| | | path = "template/contract/original/service.doc"; |
| | | fileName = "劳务合同.doc"; |
| | | contentType = "application/msword"; |
| | | } else if (type == 4) { |
| | | path = "template/contract/original/retire.docx"; |
| | | fileName = "退休返聘合同.docx"; |
| | | contentType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; |
| | | } else { |
| | | throw exception(CONTRACT_TEMPLATE_TYPE_NOT_SUPPORT); |
| | | } |