From 828f37ae39569aa002e053f62613356b7706ed98 Mon Sep 17 00:00:00 2001
From: 20918 <2091823062@qq.com>
Date: Wed, 17 Apr 2024 11:05:13 +0800
Subject: [PATCH] userleave
---
.../controller/system/TdLeaveController.java | 2 ++
.../java/com/ruoyi/system/domain/TdLeave.java | 26 ++++++++++++++-----
.../resources/mapper/system/TdLeaveMapper.xml | 15 +++++++----
3 files changed, 32 insertions(+), 11 deletions(-)
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 9f20859..4c426e0 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
@@ -158,6 +158,8 @@ public class TdLeaveController extends BaseController
{
mmap.put("user",userService.selectUserById(userId));
mmap.put("posts", postService.selectPostsByUserIds(userId));
+ SysUser sysUser= getSysUser();
+ mmap.put("sysUser",sysUser);
return prefix + "/leaveprint";
}
}
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdLeave.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdLeave.java
index e25fa06..2fc686a 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdLeave.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/TdLeave.java
@@ -1,6 +1,8 @@
package com.ruoyi.system.domain;
import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
@@ -28,7 +30,18 @@ public class TdLeave extends BaseEntity
/** 提交人 */
@Excel(name = "提交人")
- private String username;
+ private String userId;
+
+ @Excel(name = "提交人")
+ private String userName;
+
+ public String getUserName() {
+ return userName;
+ }
+
+ public void setUserName(String userName) {
+ this.userName = userName;
+ }
/** 城市 */
@Excel(name = "城市")
@@ -81,14 +94,14 @@ public class TdLeave extends BaseEntity
{
return id;
}
- public void setUsername(String username)
+ public void setUserId(String userId)
{
- this.username = username;
+ this.userId = userId;
}
- public String getUsername()
+ public String getUserId()
{
- return username;
+ return userId;
}
public void setCountry(String country)
{
@@ -185,7 +198,8 @@ public class TdLeave extends BaseEntity
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
- .append("username", getUsername())
+ .append("userId", getUserId())
+ .append("userName", getUserName())
.append("country", getCountry())
.append("areaname", getAreaname())
.append("leavereason", getLeavereason())
diff --git a/ruoyi-system/src/main/resources/mapper/system/TdLeaveMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TdLeaveMapper.xml
index 10d038b..b12d3df 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TdLeaveMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TdLeaveMapper.xml
@@ -6,7 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
-
+
+
@@ -20,13 +21,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
- select id, username, country, areaname, leavereason, depart, leavedate, workstate, leavestate, examinename, examinedate, examinestate from td_leave
+ select id, username,userid, country, areaname, leavereason, depart, leavedate, workstate, leavestate, examinename, examinedate, examinestate from td_leave