|
|
@ -188,6 +188,7 @@ |
|
|
|
from ic_resi_user resi |
|
|
|
inner join ic_volunteer vol on (resi.ID = vol.IC_RESI_USER and vol.DEL_FLAG = '0') |
|
|
|
where resi.DEL_FLAG = '0' |
|
|
|
and resi.IS_VOLUNTEER = '1' |
|
|
|
and resi.CUSTOMER_ID = #{customerId} |
|
|
|
<if test="agencyId != null and agencyId != ''"> |
|
|
|
and resi.AGENCY_ID = #{agencyId} |
|
|
@ -202,11 +203,32 @@ |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="countVolunteersWithoutVolCategory" resultType="java.lang.Integer"> |
|
|
|
select count(0) from (select resi.ID, resi.NAME, resi.ID_CARD, resi.BUILD_ID, vol.VOLUNTEER_CATEGORY volunteerCategory |
|
|
|
from ic_resi_user resi |
|
|
|
left join ic_volunteer vol on (resi.ID = vol.IC_RESI_USER and vol.DEL_FLAG = '0') |
|
|
|
where resi.DEL_FLAG = '0' |
|
|
|
and resi.IS_VOLUNTEER = '1' |
|
|
|
and resi.CUSTOMER_ID = #{customerId} |
|
|
|
<if test="agencyId != null and agencyId != ''"> |
|
|
|
and resi.AGENCY_ID = #{agencyId} |
|
|
|
</if> |
|
|
|
<if test="staffOrgIds != null and staffOrgIds != ''"> |
|
|
|
and resi.PIDS like CONCAT(#{staffOrgIds},'%') |
|
|
|
</if> |
|
|
|
<if test="search != null and search != ''"> |
|
|
|
and resi.NAME like CONCAT('%',#{search},'%') |
|
|
|
</if> |
|
|
|
having volunteerCategory is null |
|
|
|
or volunteerCategory = '') t |
|
|
|
</select> |
|
|
|
|
|
|
|
<select id="listVolunteersByCategory" resultType="com.epmet.dataaggre.entity.epmetuser.IcResiUserEntity"> |
|
|
|
select resi.ID, resi.NAME, resi.ID_CARD, resi.BUILD_ID |
|
|
|
from ic_resi_user resi |
|
|
|
inner join ic_volunteer vol on (resi.ID = vol.IC_RESI_USER and vol.DEL_FLAG = '0') |
|
|
|
where resi.DEL_FLAG = '0' |
|
|
|
and resi.IS_VOLUNTEER = '1' |
|
|
|
and resi.CUSTOMER_ID = #{customerId} |
|
|
|
<if test="agencyId != null and agencyId != ''"> |
|
|
|
and resi.AGENCY_ID = #{agencyId} |
|
|
@ -220,4 +242,25 @@ |
|
|
|
</if> |
|
|
|
|
|
|
|
</select> |
|
|
|
|
|
|
|
<!--列出没有志愿者类别的志愿者--> |
|
|
|
<select id="listVolunteersWithoutVolCategory" resultType="com.epmet.dataaggre.entity.epmetuser.IcResiUserEntity"> |
|
|
|
select resi.ID, resi.NAME, resi.ID_CARD, resi.BUILD_ID, vol.VOLUNTEER_CATEGORY volunteerCategory |
|
|
|
from ic_resi_user resi |
|
|
|
left join ic_volunteer vol on (resi.ID = vol.IC_RESI_USER and vol.DEL_FLAG = '0') |
|
|
|
where resi.DEL_FLAG = '0' |
|
|
|
and resi.IS_VOLUNTEER = '1' |
|
|
|
and resi.CUSTOMER_ID = #{customerId} |
|
|
|
<if test="agencyId != null and agencyId != ''"> |
|
|
|
and resi.AGENCY_ID = #{agencyId} |
|
|
|
</if> |
|
|
|
<if test="staffOrgIds != null and staffOrgIds != ''"> |
|
|
|
and resi.PIDS like CONCAT(#{staffOrgIds},'%') |
|
|
|
</if> |
|
|
|
<if test="search != null and search != ''"> |
|
|
|
and resi.NAME like CONCAT('%',#{search},'%') |
|
|
|
</if> |
|
|
|
having volunteerCategory is null |
|
|
|
or volunteerCategory = '' |
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|