From b3738c9a1bd0d7feea890ab18479216db3321430 Mon Sep 17 00:00:00 2001 From: 20918 <2091823062@qq.com> Date: Tue, 16 Apr 2024 17:34:13 +0800 Subject: [PATCH] userleave --- .../controller/system/TdLeaveController.java | 20 ++++++++++++++++++- .../templates/system/leave/leaveexamine.html | 10 ++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 ruoyi-admin/src/main/resources/templates/system/leave/leaveexamine.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TdLeaveController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TdLeaveController.java index 2c28879..983aacd 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TdLeaveController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/TdLeaveController.java @@ -1,6 +1,9 @@ package com.ruoyi.web.controller.system; import java.util.List; + +import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.system.service.ISysUserService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -34,6 +37,7 @@ public class TdLeaveController extends BaseController @Autowired private ITdLeaveService tdLeaveService; + @RequiresPermissions("system:leave:view") @GetMapping() public String leave() @@ -74,6 +78,7 @@ public class TdLeaveController extends BaseController @GetMapping("/add") public String add() { + return prefix + "/add"; } @@ -84,8 +89,9 @@ public class TdLeaveController extends BaseController @Log(title = "人员离职", businessType = BusinessType.INSERT) @PostMapping("/add") @ResponseBody - public AjaxResult addSave(TdLeave tdLeave) + public AjaxResult addSave(TdLeave tdLeave,ModelMap mmap) { + mmap.put("addleave",getSysUser()); return toAjax(tdLeaveService.insertTdLeave(tdLeave)); } @@ -124,4 +130,16 @@ public class TdLeaveController extends BaseController { return toAjax(tdLeaveService.deleteTdLeaveByIds(ids)); } + + /** + * 人员离职审核 + */ + @RequiresPermissions("system:leave:examine") + @Log(title = "人员离职", businessType = BusinessType.EXAMINE) + @GetMapping( "/examine/{id}") + public String examine(@PathVariable("id") Long id,ModelMap mmap){ + TdLeave leaveuser = tdLeaveService.selectTdLeaveById(id); + mmap.put("leaveuser", leaveuser); + return prefix + "/leaveexamine"; + } } diff --git a/ruoyi-admin/src/main/resources/templates/system/leave/leaveexamine.html b/ruoyi-admin/src/main/resources/templates/system/leave/leaveexamine.html new file mode 100644 index 0000000..566549b --- /dev/null +++ b/ruoyi-admin/src/main/resources/templates/system/leave/leaveexamine.html @@ -0,0 +1,10 @@ + + +
+ +