| | |
| | | public CommonResult<Boolean> delete(@RequestParam Long id) { |
| | | service.delete(id, SecurityFrameworkUtils.getLoginUserId()); return success(true); |
| | | } |
| | | @GetMapping("/get") @PreAuthorize("@ss.hasAnyPermissions('hrm:overtime:query', 'bpm:task:query')") |
| | | @GetMapping("/get") |
| | | public CommonResult<HrmOvertimeApplicationRespVO> get(@RequestParam Long id) { |
| | | return success(service.getDetail(id, SecurityFrameworkUtils.getLoginUserId(), canManage())); |
| | | } |
| | |
| | | public CommonResult<HrmOvertimeApplicationRespVO> currentApplicant() { |
| | | return success(service.getCurrentApplicant(SecurityFrameworkUtils.getLoginUserId())); |
| | | } |
| | | @GetMapping("/page") @PreAuthorize("@ss.hasPermission('hrm:overtime:query')") |
| | | @GetMapping("/page") |
| | | public CommonResult<PageResult<HrmOvertimeApplicationRespVO>> page(@Valid HrmOvertimeApplicationPageReqVO reqVO) { |
| | | if (!canManage()) { |
| | | reqVO.setUserId(SecurityFrameworkUtils.getLoginUserId()); |
| | |
| | | public CommonResult<Boolean> cancel(@RequestParam Long id) { |
| | | service.cancel(id, SecurityFrameworkUtils.getLoginUserId()); return success(true); |
| | | } |
| | | @GetMapping("/approve-process-definition-list") @PreAuthorize("@ss.hasPermission('hrm:overtime:query')") |
| | | @GetMapping("/approve-process-definition-list") |
| | | public CommonResult<List<Map<String, Object>>> processes() { return success(service.getApproveProcessDefinitionList()); } |
| | | |
| | | private boolean canManage() { |