| | |
| | | import cn.iocoder.yudao.framework.common.pojo.CommonResult; |
| | | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| | | import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.employee.vo.HrmEmployeeContractDocumentRespVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.employee.vo.HrmEmployeeContractImportExcelVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.employee.vo.HrmEmployeeContractImportReqVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.employee.vo.HrmEmployeeContractImportRespVO; |
| | |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.employee.vo.HrmEmployeeContractRespVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.employee.vo.HrmEmployeeContractSaveReqVO; |
| | | import cn.iocoder.yudao.module.hrm.controller.admin.employee.vo.HrmEmployeeContractTerminateReqVO; |
| | | import cn.iocoder.yudao.module.hrm.service.employee.HrmEmployeeContractDocumentService; |
| | | import cn.iocoder.yudao.module.hrm.service.employee.HrmEmployeeContractService; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | |
| | | |
| | | @Resource |
| | | private HrmEmployeeContractService contractService; |
| | | @Resource |
| | | private HrmEmployeeContractDocumentService contractDocumentService; |
| | | |
| | | @PostMapping("/create") |
| | | @Operation(summary = "创建员工合同") |
| | |
| | | return success(contractService.getExpiringCount()); |
| | | } |
| | | |
| | | @PostMapping("/generate-document") |
| | | @Operation(summary = "生成员工合同文档", description = "按合同明细填充 Word 模板,生成结果存入系统文件库并绑定到该合同的附件") |
| | | @Parameter(name = "id", description = "合同ID", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:employee-contract:update')") |
| | | public CommonResult<HrmEmployeeContractDocumentRespVO> generateContractDocument(@RequestParam("id") Long id) { |
| | | return success(contractDocumentService.generateContractDocument(id)); |
| | | } |
| | | |
| | | @GetMapping("/import-template") |
| | | @Operation(summary = "下载员工合同导入模板") |
| | | @PreAuthorize("@ss.hasPermission('hrm:employee-contract:import')") |