master
20918 12 months ago
parent f9183ce64d
commit 828f37ae39

@ -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";
}
}

@ -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())

@ -6,7 +6,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<resultMap type="TdLeave" id="TdLeaveResult">
<result property="id" column="id" />
<result property="username" column="username" />
<result property="userId" column="userid" />
<result property="userName" column="username" />
<result property="country" column="country" />
<result property="areaname" column="areaname" />
<result property="leavereason" column="leavereason" />
@ -20,13 +21,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectTdLeaveVo">
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
</sql>
<select id="selectTdLeaveList" parameterType="TdLeave" resultMap="TdLeaveResult">
<include refid="selectTdLeaveVo"/>
<where>
<if test="username != null and username != ''"> and username like concat('%', #{username}, '%')</if>
<if test="username != null and username != ''"> and username like concat('%', #{userName}, '%')</if>
<if test="userid != null and userid != ''"> and userid = #{userId}</if>
<if test="country != null and country != ''"> and country = #{country}</if>
<if test="areaname != null and areaname != ''"> and areaname like concat('%', #{areaname}, '%')</if>
<if test="leavereason != null and leavereason != ''"> and leavereason = #{leavereason}</if>
@ -49,6 +51,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
insert into td_leave
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="username != null">username,</if>
<if test="userid != null">userid,</if>
<if test="country != null">country,</if>
<if test="areaname != null">areaname,</if>
<if test="leavereason != null">leavereason,</if>
@ -61,7 +64,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="examinestate != null">examinestate,</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="username != null">#{username},</if>
<if test="username != null">#{userName},</if>
<if test="userid != null">#{userId},</if>
<if test="country != null">#{country},</if>
<if test="areaname != null">#{areaname},</if>
<if test="leavereason != null">#{leavereason},</if>
@ -78,7 +82,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateTdLeave" parameterType="TdLeave">
update td_leave
<trim prefix="SET" suffixOverrides=",">
<if test="username != null">username = #{username},</if>
<if test="username != null">username = #{userName},</if>
<if test="userid != null">userid = #{userId},</if>
<if test="country != null">country = #{country},</if>
<if test="areaname != null">areaname = #{areaname},</if>
<if test="leavereason != null">leavereason = #{leavereason},</if>

Loading…
Cancel
Save