| | |
| | | AND a.name like concat('%',#{pageComActSocialWorkerDTO.name},'%') |
| | | </if> |
| | | <if test="pageComActSocialWorkerDTO.keyword!=null and pageComActSocialWorkerDTO.keyword!=''"> |
| | | AND (a.name like concat('%',#{pageComActSocialWorkerDTO.keyword},'%') or a.telephone like concat('%',#{pageComActSocialWorkerDTO.keyword},'%') ) |
| | | AND (a.name like concat('%',#{pageComActSocialWorkerDTO.keyword},'%') or a.telephone like |
| | | concat('%',#{pageComActSocialWorkerDTO.keyword},'%') ) |
| | | </if> |
| | | <if test="pageComActSocialWorkerDTO.ageBegin!=null"> |
| | | AND a.age>=#{pageComActSocialWorkerDTO.ageBegin} |
| | |
| | | </select> |
| | | |
| | | <select id="queryAll" resultType="com.panzhihua.common.model.dtos.civil.ComActSocialWorkerExcelVO"> |
| | | SELECT a.social_org_id,a.name as name,a.birthday,a.telephone,a.gen,a.social_worker_code,a.skill_field,a.business_scope,b.name as socialOrgId,c.name as communityId,e.name as streetId |
| | | SELECT a.social_org_id,a.name as |
| | | name,a.birthday,a.telephone,a.gen,a.social_worker_code,a.skill_field,a.business_scope,b.name as |
| | | socialOrgId,c.name as communityId,e.name as streetId |
| | | FROM com_act_social_worker a left join com_act_social_org b on a.social_org_id = b.id |
| | | left join com_act c on a.community_id = c.community_id |
| | | left join com_street e on a.street_id = e.street_id |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectType" resultType="Integer"> |
| | | select count(id) from com_act_social_worker where street_id = 15 |
| | | <if test="type ==1"> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectSkillType" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkProjectTypeInfo"> |
| | | select count(*) count,t1.name from com_act_social_worker t INNER JOIN com_act_column t1 on t.skill_type = t1.id where t.street_id = 15 <if test="communityId!=null"> and t.community_id = #{communityId}</if> GROUP BY t1.id |
| | | <select id="selectSkillType" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenHmkProjectTypeInfo"> |
| | | select count(*) count,t1.name from com_act_social_worker t INNER JOIN com_act_column t1 on t.skill_type = t1.id |
| | | where t.street_id = 15 <if test="communityId!=null">and t.community_id = #{communityId}</if> GROUP BY t1.id |
| | | </select> |
| | | |
| | | <select id="selectActivity" resultType="com.panzhihua.common.model.vos.civil.ComActSocialWorkerVO"> |
| | | select t.* from com_act_social_worker t LEFT JOIN sys_user t1 on t.telephone = t1.phone where t1.user_id in (select distinct user_id from com_act_act_regist where activity_id =#{id} ) |
| | | select t.* |
| | | from com_act_social_worker t |
| | | LEFT JOIN sys_user t1 on t.telephone = t1.phone |
| | | where t1.user_id in (select distinct user_id from com_act_act_regist where activity_id = #{id}) |
| | | </select> |
| | | |
| | | <select id="selectOneById" resultType="com.panzhihua.common.model.vos.civil.ComActSocialWorkerVO"> |
| | | SELECT a.*, b.name as socialOrgId, c.name as communityName, e.name as streetId |
| | | FROM com_act_social_worker a |
| | | left join com_act_social_org b on a.social_org_id = b.id |
| | | left join com_act c on a.community_id = c.community_id |
| | | left join com_street e on c.street_id = e.street_id |
| | | where a.id =#{id} |
| | | </select> |
| | | </mapper> |