From 0766c42639d0e9b12d8dc2f93589b4713ced57a6 Mon Sep 17 00:00:00 2001
From: weicd <weicd@yhzhg.cn>
Date: Fri, 27 Dec 2024 07:19:36 +0000
Subject: [PATCH] 修改

---
 eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/rest/AttendanceLeaveController.java |   26 ++++++++++++++++++++++----
 1 files changed, 22 insertions(+), 4 deletions(-)

diff --git a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/rest/AttendanceLeaveController.java b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/rest/AttendanceLeaveController.java
index 29d6b64..17af2f7 100644
--- a/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/rest/AttendanceLeaveController.java
+++ b/eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/attendance/rest/AttendanceLeaveController.java
@@ -16,6 +16,7 @@
 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;
@@ -95,15 +96,23 @@
 
     @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);
+    }
+
+    @PostMapping(value = "/getOverTimeLength")
+    @Log("获取调休假时长")
+    @ApiOperation("获取调休假时长")
+    public ResponseEntity<Object> getOverTimeLength(@RequestBody Long userId) throws ParseException {
+        return new ResponseEntity<>(attendanceLeaveService.getOverTimeLength(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);
     }
@@ -116,4 +125,13 @@
         attendanceLeaveService.deleteAll(ids);
         return new ResponseEntity<>(HttpStatus.OK);
     }
+
+    @PutMapping(value = "/updateAgree")
+    @Log("批量审核")
+    @ApiOperation("批量审核")
+    @PreAuthorize("@el.check('attendanceLeave:updateAgree')")
+    public ResponseEntity<Object> editIsAgree(@Validated @RequestBody AgreeUpdateRequest request) throws Exception {
+        attendanceLeaveService.updateAgree(request);
+        return new ResponseEntity<>(HttpStatus.NO_CONTENT);
+    }
 }
\ No newline at end of file

--
Gitblit v1.9.3