|
@@ -22,13 +22,15 @@
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="exgetAllUser" resultType="com.bofeng.entity.ReturnWorkLy">
|
|
<select id="exgetAllUser" resultType="com.bofeng.entity.ReturnWorkLy">
|
|
- select u.rw_id,u.user_id as userId,su.uptown_name as uptownName,CONCAT(uu.ridgepole,uu.unit) as unit,uh.linkman,uh.phone,suh.doorplate
|
|
|
|
|
|
+ select u.rw_id,u.user_id as userId,su.uptown_name as uptownName,CONCAT(uu.ridgepole,uu.unit) as unit,
|
|
|
|
+ uh.linkman,uh.phone,suh.doorplate,de.department_name as departmentName
|
|
from return_work_ly u
|
|
from return_work_ly u
|
|
left join sys_user_role ur on ur.user_id = u.user_id and ur.role_id = 1
|
|
left join sys_user_role ur on ur.user_id = u.user_id and ur.role_id = 1
|
|
left join sys_uptown_home uh on uh.house_id = ur.property_id
|
|
left join sys_uptown_home uh on uh.house_id = ur.property_id
|
|
left join sys_uptown_house suh on suh.house_id = ur.property_id
|
|
left join sys_uptown_house suh on suh.house_id = ur.property_id
|
|
left join sys_uptown_unit uu on uu.unit_id = suh.unit_id
|
|
left join sys_uptown_unit uu on uu.unit_id = suh.unit_id
|
|
left join sys_uptown su on su.uptown_id = uu.uptown_id
|
|
left join sys_uptown su on su.uptown_id = uu.uptown_id
|
|
|
|
+ left join sys_department de on de.department_id = suh.department_id
|
|
<where>
|
|
<where>
|
|
<if test="queryProperties != null and queryProperties != ''">
|
|
<if test="queryProperties != null and queryProperties != ''">
|
|
(uh.phone = #{phone} or uh.linkman like concat('%',#{queryProperties},'%'))
|
|
(uh.phone = #{phone} or uh.linkman like concat('%',#{queryProperties},'%'))
|
|
@@ -36,6 +38,9 @@
|
|
<if test="unitId != null and unitId !=''">
|
|
<if test="unitId != null and unitId !=''">
|
|
and uu.unit_id = #{unitId}
|
|
and uu.unit_id = #{unitId}
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="departmentId != null and departmentId !=''">
|
|
|
|
+ and suh.department_id = #{departmentId}
|
|
|
|
+ </if>
|
|
</where>
|
|
</where>
|
|
order by uu.ridgepole,uu.unit,u.user_id desc
|
|
order by uu.ridgepole,uu.unit,u.user_id desc
|
|
</select>
|
|
</select>
|