|
@ -18,19 +18,25 @@ |
|
|
, s.SPECIAL_RQLB SPECIAL_TYPES_STR |
|
|
, s.SPECIAL_RQLB SPECIAL_TYPES_STR |
|
|
from ic_resi_user r |
|
|
from ic_resi_user r |
|
|
inner join ic_special s on (r.ID = s.IC_RESI_USER and s.DEL_FLAG = 0) |
|
|
inner join ic_special s on (r.ID = s.IC_RESI_USER and s.DEL_FLAG = 0) |
|
|
where r.DEL_FLAG = 0 |
|
|
where |
|
|
|
|
|
r.DEL_FLAG = 0 |
|
|
|
|
|
and (r.PIDS like CONCAT(#{orgIdPath}, '%') |
|
|
|
|
|
<if test="orgType == 'agency'"> |
|
|
|
|
|
or r.AGENCY_ID = #{orgId} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="orgType == 'grid'"> |
|
|
|
|
|
or r.GRID_ID = #{orgId} |
|
|
|
|
|
</if> |
|
|
|
|
|
) |
|
|
<if test="name != null and name != ''"> |
|
|
<if test="name != null and name != ''"> |
|
|
and r.NAME like CONCAT('%', #{name}, '%') |
|
|
and r.NAME like CONCAT('%', #{name}, '%') |
|
|
</if> |
|
|
</if> |
|
|
<if test="specialType != null and specialType != ''"> |
|
|
<if test="specialType != null and specialType != ''"> |
|
|
and s.SPECIAL_RQLB like #{specialType} |
|
|
and s.SPECIAL_RQLB like CONCAT('%', #{specialType}, '%') |
|
|
</if> |
|
|
</if> |
|
|
<if test="idCard != null and idCard != ''"> |
|
|
<if test="idCard != null and idCard != ''"> |
|
|
and r.ID_CARD like CONCAT('%', #{idCard}, '%') |
|
|
and r.ID_CARD like CONCAT('%', #{idCard}, '%') |
|
|
</if> |
|
|
</if> |
|
|
<if test="orgIdPath != null and orgIdPath != ''"> |
|
|
|
|
|
and r.PIDS like CONCAT(#{orgIdPath}, '%') or r.AGENCY_ID = #{agencyId} |
|
|
|
|
|
</if> |
|
|
|
|
|
<if test="mobile != null and mobile != ''"> |
|
|
<if test="mobile != null and mobile != ''"> |
|
|
and r.MOBILE like CONCAT('%', #{mobile}, '%') |
|
|
and r.MOBILE like CONCAT('%', #{mobile}, '%') |
|
|
</if> |
|
|
</if> |
|
|