| | |
| | | @PostMapping("/submit") |
| | | @Operation(summary = "提交调岗申请审批") |
| | | @Parameter(name = "id", description = "申请ID", required = true) |
| | | @Parameter(name = "processDefinitionKey", description = "流程定义Key", required = true) |
| | | @Parameter(name = "processDefinitionKey", description = "流程定义Key(不传时自动使用「调动审批」分类下最新的活跃流程)") |
| | | @PreAuthorize("@ss.hasPermission('hrm:transfer:submit')") |
| | | public CommonResult<Boolean> submitTransferApplication(@RequestParam("id") Long id, |
| | | @RequestParam("processDefinitionKey") String processDefinitionKey) { |
| | | @RequestParam(value = "processDefinitionKey", required = false) String processDefinitionKey) { |
| | | Long userId = SecurityFrameworkUtils.getLoginUserId(); |
| | | transferApplicationService.submitTransferApplication(id, processDefinitionKey, userId); |
| | | return success(true); |
| | |
| | | return success(transferApplicationService.getApproveProcessDefinitionList()); |
| | | } |
| | | |
| | | @PostMapping("/cancel") |
| | | @Operation(summary = "撤销调岗申请") |
| | | @Parameter(name = "id", description = "申请ID", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:transfer:cancel')") |
| | | public CommonResult<Boolean> cancelTransferApplication(@RequestParam("id") Long id) { |
| | | transferApplicationService.cancelTransferApplication(id, SecurityFrameworkUtils.getLoginUserId()); |
| | | return success(true); |
| | | } |
| | | |
| | | @GetMapping("/export-excel") |
| | | @Operation(summary = "导出调岗申请 Excel") |
| | | @PreAuthorize("@ss.hasPermission('hrm:transfer:export')") |