change - 用户关联工位

master
yinq 10 months ago
parent 7064a19957
commit 1f97788d81

@ -89,6 +89,28 @@ public class SysUser extends BaseEntity
/** 角色ID */
private Long roleId;
/** 工位编号 */
private String stationCode;
/** 工位名称 */
private String stationName;
public String getStationCode() {
return stationCode;
}
public void setStationCode(String stationCode) {
this.stationCode = stationCode;
}
public String getStationName() {
return stationName;
}
public void setStationName(String stationName) {
this.stationName = stationName;
}
public SysUser()
{

@ -23,6 +23,8 @@
<result property="updateBy" column="update_by" />
<result property="updateTime" column="update_time" />
<result property="remark" column="remark" />
<result property="stationCode" column="station_code" />
<result property="stationName" column="station_name" />
<association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" />
<collection property="roles" javaType="java.util.List" resultMap="RoleResult" />
</resultMap>
@ -49,16 +51,19 @@
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status, u.station_code ,pl.PRODUCT_LINE_NAME station_name
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join sys_user_role ur on u.user_id = ur.user_id
left join sys_role r on r.role_id = ur.role_id
left join BASE_PRODUCTLINE pl on pl.PRODUCT_LINE_CODE = u.station_code
</sql>
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip,
u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader, u.station_code ,pl.PRODUCT_LINE_NAME station_name from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
left join BASE_PRODUCTLINE pl on pl.PRODUCT_LINE_CODE = u.station_code
where u.del_flag = '0'
<if test="userId != null and userId != 0">
AND u.user_id = #{userId}
@ -159,6 +164,7 @@
<if test="status != null and status != ''">status,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="remark != null and remark != ''">remark,</if>
<if test="stationCode != null and stationCode != ''">station_code,</if>
create_time
)values(
<if test="userId != null and userId != ''">#{userId},</if>
@ -173,6 +179,7 @@
<if test="status != null and status != ''">#{status},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="remark != null and remark != ''">#{remark},</if>
<if test="stationCode != null and stationCode != ''">#{stationCode},</if>
sysdate
)
</insert>
@ -193,6 +200,7 @@
<if test="loginDate != null">login_date = #{loginDate},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
<if test="stationCode != null and stationCode != ''">station_code = #{stationCode},</if>
update_time = sysdate
</set>
where user_id = #{userId}

Loading…
Cancel
Save