| | |
| | | return new ResponseEntity<>(attendanceLeaveService.calcTimeLength(resources), HttpStatus.OK); |
| | | } |
| | | |
| | | @PostMapping(value = "/getYearTimeLength") |
| | | @PostMapping(value = "/getYearTimeLength/{userId}")
|
| | | @Log("获取年假时长") |
| | | @ApiOperation("获取年假时长") |
| | | public ResponseEntity<Object> getYearTimeLength(@RequestBody Long userId) throws ParseException { |
| | | return new ResponseEntity<>(attendanceLeaveService.getYearTimeLength(userId), HttpStatus.OK); |
| | | public ResponseEntity<Object> getYearTimeLength(@PathVariable Long userId, @RequestBody String year) throws ParseException {
|
| | | return new ResponseEntity<>(attendanceLeaveService.getYearTimeLength(userId, year), HttpStatus.OK);
|
| | | } |
| | | |
| | | @PostMapping(value = "/getOverTimeLength") |
| | | @PostMapping(value = "/getOverTimeLength/{userId}")
|
| | | @Log("获取调休假时长") |
| | | @ApiOperation("获取调休假时长") |
| | | public ResponseEntity<Object> getOverTimeLength(@RequestBody Long userId) throws ParseException { |
| | | return new ResponseEntity<>(attendanceLeaveService.getOverTimeLength(userId), HttpStatus.OK); |
| | | public ResponseEntity<Object> getOverTimeLength(@PathVariable Long userId, @RequestBody String yearMonth) throws ParseException {
|
| | | Double overTimeLength = attendanceLeaveService.getOverTimeLength(userId, yearMonth);
|
| | | Double overTimeCloseLength = attendanceLeaveService.getOverTimeCloseLength(userId, yearMonth);
|
| | | return new ResponseEntity<>(overTimeLength + overTimeCloseLength, HttpStatus.OK);
|
| | | } |
| | | |
| | | @PutMapping(value = "/approve") |