| | |
| | | package me.zhengjie.modules.attendance.rest; |
| | | |
| | | import me.zhengjie.annotation.Log; |
| | | import me.zhengjie.modules.attendance.domain.AgreeUpdateRequest; |
| | | import me.zhengjie.modules.attendance.domain.AttendanceCardreplacement; |
| | | import me.zhengjie.modules.attendance.domain.AttendanceLeave; |
| | | import me.zhengjie.modules.attendance.service.AttendanceLeaveService; |
| | |
| | | |
| | | @PostMapping(value = "/getYearTimeLength") |
| | | @Log("获取年假时长") |
| | | @ApiOperation("计算请假时长") |
| | | public ResponseEntity<Object> getYearTimeLength() throws ParseException { |
| | | return new ResponseEntity<>(attendanceLeaveService.getYearTimeLength(), HttpStatus.OK); |
| | | @ApiOperation("获取年假时长") |
| | | public ResponseEntity<Object> getYearTimeLength(@RequestBody Long userId) throws ParseException { |
| | | return new ResponseEntity<>(attendanceLeaveService.getYearTimeLength(userId), HttpStatus.OK); |
| | | } |
| | | |
| | | @PutMapping(value = "/approve") |
| | | @Log("审核功能") |
| | | @ApiOperation("审核功能") |
| | | public ResponseEntity<Object> checkApprove(@Validated @RequestBody AttendanceLeave resources){ |
| | | @PreAuthorize("@el.check('attendanceLeave:approve')") |
| | | public ResponseEntity<Object> checkApprove(@Validated @RequestBody AttendanceLeave resources) throws Exception { |
| | | attendanceLeaveService.updateApprove(resources); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @PutMapping(value = "/updateAgree") |
| | | @Log("批量审核") |
| | | @ApiOperation("批量审核") |
| | | public ResponseEntity<Object> editIsAgree(@Validated @RequestBody AgreeUpdateRequest request) throws Exception { |
| | | attendanceLeaveService.updateAgree(request); |
| | | return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
| | | } |
| | | |
| | | @DeleteMapping |
| | | @Log("删除请假") |
| | | @ApiOperation("删除请假") |