|
|
@ -99,7 +99,7 @@ |
|
|
|
LEFT JOIN epdc_user_tag ut ON pt.TAG_ID = ut.ID |
|
|
|
AND ut.DEL_FLAG = '0' |
|
|
|
WHERE |
|
|
|
eu.PARTY_FLAG = '1' and eu.DEL_FLAG = '0' and pm.DEL_FLAG = '0' |
|
|
|
eu.PARTY_FLAG = '1' and eu.DEL_FLAG = '0' |
|
|
|
<if test="realName != null and realName != '' ">and pm.REAL_NAME = #{realName}</if> |
|
|
|
<if test="mobile != null and mobile != '' ">and pm.MOBILE = #{mobile}</if> |
|
|
|
<if test="identityNo != null and identityNo != '' ">and pm.IDENTITY_NO = #{identityNo}</if> |
|
|
@ -154,4 +154,85 @@ |
|
|
|
UPDATE epdc_party_members SET GRID_NAME = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId} |
|
|
|
</update> |
|
|
|
|
|
|
|
<!--已认证党员分页--> |
|
|
|
<select id="optimizeHasAuthenticationPartyPage" resultType="String"> |
|
|
|
SELECT |
|
|
|
eu.ID |
|
|
|
FROM |
|
|
|
epdc_user eu |
|
|
|
WHERE |
|
|
|
eu.PARTY_FLAG = '1' and eu.DEL_FLAG = '0' |
|
|
|
<if test="realName != null and realName != '' ">and eu.REAL_NAME = #{realName}</if> |
|
|
|
<if test="mobile != null and mobile != '' ">and eu.MOBILE = #{mobile}</if> |
|
|
|
<if test="identityNo != null and identityNo != '' ">and eu.IDENTITY_NO = #{identityNo}</if> |
|
|
|
<if test="registFlag != null and registFlag != '' ">and eu.REGIST_FLAG = #{registFlag}</if> |
|
|
|
<if test="startTime != null and startTime != '' ">and eu.REGISTER_TIME >= #{startTime}</if> |
|
|
|
<if test="endTime != null and endTime != '' "> <![CDATA[ and eu.REGISTER_TIME <= ]]> #{endTime}</if> |
|
|
|
<if test="streetId != '' and streetId != null"> |
|
|
|
AND (find_in_set(#{streetId},eu.PARENT_DEPT_IDS) OR find_in_set(#{streetId},eu.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="communityId != '' and communityId != null"> |
|
|
|
AND (find_in_set(#{communityId},eu.PARENT_DEPT_IDS) OR find_in_set(#{communityId},eu.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
<if test="gridId != '' and gridId != null"> |
|
|
|
and (eu.dept_id = #{gridId} OR find_in_set(#{gridId},eu.ALL_DEPT_IDS)) |
|
|
|
</if> |
|
|
|
ORDER BY eu.REGISTER_TIME DESC |
|
|
|
|
|
|
|
|
|
|
|
</select> |
|
|
|
<!--已认证党员填充数据--> |
|
|
|
<select id="optimizeHasAuthenticationPartyPageInfo" resultType="com.elink.esua.epdc.dto.PartyMembersDTO"> |
|
|
|
SELECT |
|
|
|
pm.CADRE_FLAG, |
|
|
|
pm.CREATED_BY, |
|
|
|
pm.DEPT_ID, |
|
|
|
pm.ID, |
|
|
|
pm.POST, |
|
|
|
pm.POST_VALUE, |
|
|
|
pm.REGIST_FLAG, |
|
|
|
GROUP_CONCAT(ut.TAG_NAME) TAG_NAME, |
|
|
|
allu.CREATED_TIME, |
|
|
|
allu.IDENTITY_NO, |
|
|
|
allu.MOBILE, |
|
|
|
allu.REAL_NAME, |
|
|
|
allu.registTime, |
|
|
|
allu.ALL_DEPT_NAMES |
|
|
|
FROM |
|
|
|
( |
|
|
|
SELECT |
|
|
|
eu.ID, |
|
|
|
eu.CREATED_TIME, |
|
|
|
eu.IDENTITY_NO, |
|
|
|
eu.MOBILE, |
|
|
|
eu.REAL_NAME, |
|
|
|
eu.REGISTER_TIME as registTime, |
|
|
|
eu.ALL_DEPT_NAMES |
|
|
|
FROM |
|
|
|
epdc_user eu |
|
|
|
WHERE |
|
|
|
eu.ID IN |
|
|
|
<foreach collection="userIdList" index="index" item="id" open="(" separator="," close=")"> |
|
|
|
#{id} |
|
|
|
</foreach> |
|
|
|
) allu |
|
|
|
LEFT JOIN epdc_party_members pm ON pm.IDENTITY_NO = allu.IDENTITY_NO |
|
|
|
AND pm.REAL_NAME = allu.REAL_NAME |
|
|
|
LEFT JOIN epdc_party_tag_relation pt ON pm.ID = pt.PARTY_ID |
|
|
|
LEFT JOIN epdc_user_tag ut ON pt.TAG_ID = ut.ID |
|
|
|
AND ut.DEL_FLAG = '0' |
|
|
|
GROUP BY |
|
|
|
allu.ID |
|
|
|
ORDER BY |
|
|
|
allu.registTime DESC |
|
|
|
</select> |
|
|
|
<!--删除党员时候校验是否被认证--> |
|
|
|
<select id="selectCountByIdentity" resultType="Integer"> |
|
|
|
SELECT |
|
|
|
COUNT(u.ID) |
|
|
|
FROM |
|
|
|
epdc_user u |
|
|
|
WHERE |
|
|
|
u.IDENTITY_NO = #{IdentityNo} |
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|