增加联查sys_flow模块的sql
This commit is contained in:
parent
bfd18dce39
commit
257e7c2235
|
@ -69,6 +69,8 @@ public class SysUserEntity extends BaseEntity {
|
||||||
* 人员姓名
|
* 人员姓名
|
||||||
*/
|
*/
|
||||||
private String personName;
|
private String personName;
|
||||||
|
//编码
|
||||||
|
private String personCode;
|
||||||
/**
|
/**
|
||||||
* 关联组织机构名称
|
* 关联组织机构名称
|
||||||
*/
|
*/
|
||||||
|
@ -237,5 +239,13 @@ public class SysUserEntity extends BaseEntity {
|
||||||
public void setOldPassword(String oldPassword) {
|
public void setOldPassword(String oldPassword) {
|
||||||
OldPassword = oldPassword;
|
OldPassword = oldPassword;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPersonCode() {
|
||||||
|
return personCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPersonCode(String personCode) {
|
||||||
|
this.personCode = personCode;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
<result property="org_id" column="org_id" jdbcType="VARCHAR"/>
|
||||||
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
<result property="companyId" column="company_id" jdbcType="VARCHAR"/>
|
||||||
<result property="personName" column="person_Name" jdbcType="VARCHAR"/>
|
<result property="personName" column="person_Name" jdbcType="VARCHAR"/>
|
||||||
|
<result property="personCode" column="person_code" jdbcType="VARCHAR"/>
|
||||||
<result property="organName" column="organ_name" jdbcType="VARCHAR"/>
|
<result property="organName" column="organ_name" jdbcType="VARCHAR"/>
|
||||||
<result property="mobilePhone" column="mobile_phone" jdbcType="VARCHAR"/>
|
<result property="mobilePhone" column="mobile_phone" jdbcType="VARCHAR"/>
|
||||||
<result property="ddUserId" column="dd_user_id" jdbcType="VARCHAR"/>
|
<result property="ddUserId" column="dd_user_id" jdbcType="VARCHAR"/>
|
||||||
|
@ -72,6 +73,7 @@
|
||||||
,a.org_id
|
,a.org_id
|
||||||
,a.company_id
|
,a.company_id
|
||||||
,p.person_Name
|
,p.person_Name
|
||||||
|
,p.person_code
|
||||||
,a.wx_user_id
|
,a.wx_user_id
|
||||||
,a.dd_user_id
|
,a.dd_user_id
|
||||||
from
|
from
|
||||||
|
@ -266,6 +268,66 @@
|
||||||
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
<if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- 查询未分配过权限的用户 (sys_flow模块用) -->
|
||||||
|
<select id="entity_list_notin_sys_flowClass" resultMap="get-SysUserEntity-result"
|
||||||
|
parameterType="com.hzya.frame.sysnew.user.entity.SysUserEntity">
|
||||||
|
select
|
||||||
|
a.id
|
||||||
|
,a.person_id
|
||||||
|
,a.login_code
|
||||||
|
,a.password
|
||||||
|
,a.salt
|
||||||
|
,a.last_login_time
|
||||||
|
,a.last_connection_time
|
||||||
|
,a.last_login_ip
|
||||||
|
,a.state
|
||||||
|
,a.remark
|
||||||
|
,a.sorts
|
||||||
|
,a.create_user_id
|
||||||
|
,a.create_time
|
||||||
|
,a.modify_user_id
|
||||||
|
,a.modify_time
|
||||||
|
,a.sts
|
||||||
|
,a.org_id
|
||||||
|
,a.company_id
|
||||||
|
,p.person_Name
|
||||||
|
,p.mobile_phone
|
||||||
|
,o.organ_name
|
||||||
|
from
|
||||||
|
sys_user a
|
||||||
|
LEFT JOIN sys_person p on p.id = a.person_id and p.sts = 'Y'
|
||||||
|
LEFT JOIN sys_organ o on o.id = p.organ_id and o.sts = 'Y'
|
||||||
|
<trim prefix="where" prefixOverrides="and">
|
||||||
|
<if test="id != null and id != ''">and a.id like concat('%',#{id},'%')</if>
|
||||||
|
<if test="personId != null and personId != ''">and a.person_id like concat('%',#{personId},'%')</if>
|
||||||
|
<if test="loginCode != null and loginCode != ''">and a.login_code like concat('%',#{loginCode},'%')</if>
|
||||||
|
<if test="password != null and password != ''">and a.password like concat('%',#{password},'%')</if>
|
||||||
|
<if test="salt != null and salt != ''">and a.salt like concat('%',#{salt},'%')</if>
|
||||||
|
<if test="lastLoginTime != null">and a.last_login_time like concat('%',#{lastLoginTime},'%')</if>
|
||||||
|
<if test="lastConnectionTime != null">and a.last_connection_time like concat('%',#{lastConnectionTime},'%')
|
||||||
|
</if>
|
||||||
|
<if test="lastLoginIp != null and lastLoginIp != ''">and a.last_login_ip like concat('%',#{lastLoginIp},'%')
|
||||||
|
</if>
|
||||||
|
<if test="state != null and state != ''">and a.state like concat('%',#{state},'%')</if>
|
||||||
|
<if test="remark != null and remark != ''">and a.remark like concat('%',#{remark},'%')</if>
|
||||||
|
<if test="sorts != null">and a.sorts like concat('%',#{sorts},'%')</if>
|
||||||
|
<if test="create_user_id != null and create_user_id != ''">and a.create_user_id like
|
||||||
|
concat('%',#{create_user_id},'%')
|
||||||
|
</if>
|
||||||
|
<if test="create_time != null">and a.create_time like concat('%',#{create_time},'%')</if>
|
||||||
|
<if test="modify_user_id != null and modify_user_id != ''">and a.modify_user_id like
|
||||||
|
concat('%',#{modify_user_id},'%')
|
||||||
|
</if>
|
||||||
|
<if test="modify_time != null">and a.modify_time like concat('%',#{modify_time},'%')</if>
|
||||||
|
<if test="sts != null and sts != ''">and a.sts like concat('%',#{sts},'%')</if>
|
||||||
|
<if test="org_id != null and org_id != ''">and a.org_id like concat('%',#{org_id},'%')</if>
|
||||||
|
<if test="companyId != null and companyId != ''">and a.company_id like concat('%',#{companyId},'%')</if>
|
||||||
|
<if test="organId != null and organId != ''">and p.organ_id = #{organId}</if>
|
||||||
|
and a.sts='Y'
|
||||||
|
and a.id not in (select user_id from sys_flow_class_rule where sts = 'Y')
|
||||||
|
</trim>
|
||||||
|
</select>
|
||||||
|
|
||||||
<!--新增所有列-->
|
<!--新增所有列-->
|
||||||
<insert id="entity_insert" parameterType="com.hzya.frame.sysnew.user.entity.SysUserEntity"
|
<insert id="entity_insert" parameterType="com.hzya.frame.sysnew.user.entity.SysUserEntity"
|
||||||
>
|
>
|
||||||
|
|
Loading…
Reference in New Issue