| | |
| | | <if test="dto.id != null"> |
| | | and cmvs.id = #{dto.id} |
| | | </if> |
| | | <if test="dto.keyWord!=null and dto.keyWord!=''"> |
| | | and cmvs.name like concat('%',#{dto.keyWord},'%') |
| | | </if> |
| | | <if test="dto.communityId != null"> |
| | | and cmvs.community_id = #{dto.communityId} |
| | | </if> |
| | |
| | | </if> |
| | | <if test="dto.keyWord != null and dto.keyWord != ''"> |
| | | and (`name` like concat(#{dto.keyWord},'%') or |
| | | `contacts` like concat(#{dto.keyWord},'%')) |
| | | `contacts` like concat(#{dto.keyWord},'%') or phone like concat(#{dto.keyWord},'%')) |
| | | </if> |
| | | </where> |
| | | order by create_at desc |
| | |
| | | , cpmr.phone,cpmr.is_reg,cpmr.sex,cpmr.birth_time,cpmr.position,cpmr.position_two |
| | | , cpmr.job_responsibilities,cpmr.photo_path,cpmr.type,cpmr.join_time,cpmr.employment_time |
| | | , cpmr.create_at,cpmr.update_at,cpmr.function,cpmr.specialty_category,cpmr.specialty_name |
| | | ,TIMESTAMPDIFF( |
| | | YEAR, |
| | | cpmr.birth_time, |
| | | DATE_FORMAT( NOW(), '%Y-%m-%d' )) age,cpo.`name` as orgName,cpcu.`name` as checkUnitName |
| | | ,YEAR (now()) - YEAR (substring(cpmr.id_card, 7, 8)) age,cpo.`name` as orgName,cpcu.`name` as checkUnitName |
| | | from com_pb_member_role as cpmr |
| | | left join com_pb_org as cpo on cpo.id = cpmr.org_id |
| | | left join com_pb_check_unit as cpcu on cpcu.id = cpmr.check_unit_id |
| | |
| | | cpo.type, |
| | | cmv.`name` AS areaName, |
| | | cmb.`name` AS buildName, |
| | | cpmr.`name` AS userName, |
| | | cpmr.phone AS phone, |
| | | (select count(id) from com_pb_member where org_id = cpo.id and audit_result = 1) as countPerson |
| | | FROM |
| | | com_pb_org AS cpo |
| | | LEFT JOIN com_mng_village AS cmv ON cmv.village_id = cpo.area_id |
| | | LEFT JOIN com_pb_member_role AS cpmr ON cpmr.org_id = cpo.id |
| | | left join com_mng_building as cmb on cmb.id = cpo.build_id |
| | | <where> |
| | | <if test="partyOrganizationVO.communityId != null"> |