| | |
| | | |
| | | @PostMapping("/create") |
| | | @Operation(summary = "新增考勤异常申请") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance:create')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-exception:create')") |
| | | public CommonResult<Long> createAttendanceException(@Valid @RequestBody HrmAttendanceExceptionSaveReqVO createReqVO) { |
| | | return success(attendanceExceptionService.createAttendanceException(createReqVO)); |
| | | } |
| | | |
| | | @PutMapping("/update") |
| | | @Operation(summary = "更新考勤异常申请") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance:update')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-exception:update')") |
| | | public CommonResult<Boolean> updateAttendanceException(@Valid @RequestBody HrmAttendanceExceptionSaveReqVO updateReqVO) { |
| | | attendanceExceptionService.updateAttendanceException(updateReqVO); |
| | | return success(true); |
| | |
| | | @DeleteMapping("/delete") |
| | | @Operation(summary = "删除考勤异常申请") |
| | | @Parameter(name = "id", description = "申请ID", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance:delete')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-exception:delete')") |
| | | public CommonResult<Boolean> deleteAttendanceException(@RequestParam("id") Long id) { |
| | | attendanceExceptionService.deleteAttendanceException(id); |
| | | return success(true); |
| | |
| | | @GetMapping("/get") |
| | | @Operation(summary = "获得考勤异常申请") |
| | | @Parameter(name = "id", description = "申请ID", required = true) |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance:query')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-exception:query')") |
| | | public CommonResult<HrmAttendanceExceptionRespVO> getAttendanceException(@RequestParam("id") Long id) { |
| | | HrmAttendanceExceptionDO attendanceException = attendanceExceptionService.getAttendanceException(id); |
| | | if (attendanceException == null) { |
| | |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得考勤异常申请分页") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance:query')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-exception:query')") |
| | | public CommonResult<PageResult<HrmAttendanceExceptionRespVO>> getAttendanceExceptionPage(@Valid HrmAttendanceExceptionPageReqVO pageReqVO) { |
| | | PageResult<HrmAttendanceExceptionDO> pageResult = attendanceExceptionService.getAttendanceExceptionPage(pageReqVO); |
| | | List<HrmAttendanceExceptionRespVO> list = BeanUtils.toBean(pageResult.getList(), HrmAttendanceExceptionRespVO.class); |
| | |
| | | |
| | | @PostMapping("/submit") |
| | | @Operation(summary = "提交考勤异常申请") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance:submit')") |
| | | @PreAuthorize("@ss.hasPermission('hrm:attendance-exception:submit')") |
| | | public CommonResult<Boolean> submitAttendanceException( |
| | | @RequestParam("id") Long id, |
| | | @RequestParam("processDefinitionKey") String processDefinitionKey) { |