BAOLH
2025-04-25 6ce655e8911e0b1fd54c3b73cc393154e6045dae
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/rest/AttendanceLeaveController.java
@@ -94,18 +94,20 @@
        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")