| 
						
						
							
								
							
						
						
					 | 
					@ -86,6 +86,58 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        left join epdc_house_resident t1 on t1.RESIDENT_ID = t.ID | 
					 | 
					 | 
					        left join epdc_house_resident t1 on t1.RESIDENT_ID = t.ID | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        where t.DEL_FLAG ='0' and t1.DEL_FLAG ='0' and t1.IS_HOUSE_HEAD = '1' and t1.HOUSE_ID = #{houseId} limit 1 | 
					 | 
					 | 
					        where t.DEL_FLAG ='0' and t1.DEL_FLAG ='0' and t1.IS_HOUSE_HEAD = '1' and t1.HOUSE_ID = #{houseId} limit 1 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    <select id="selectListOfPopulationInformationDTO" | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            resultType="com.elink.esua.epdc.dto.PopulationInformationDTO"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        select | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        t.ID,t.RESIDENTS_NAME,t.RESIDENTS_SEX,t.RESIDENTS_PHONE,t.RESIDENTS_IDENTITY_NO,t.RESIDENTS_NATION,t.HOUSEHOLD_REGISTRATION_PLACE, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        group_concat(substring_index(t2.ALL_DEPT_NAMES,'-',-1)) as gridNames | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        from epdc_population_information t | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        left join epdc_housing_information t2 on t1.HOUSE_ID = t2.ID | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        where t.DEL_FLAG ='0' and t1.DEL_FLAG ='0' and t2.DEL_FLAG ='0' and t.RESIDENTS_IDENTITY_NO is not null | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <if test="streetId != '' and streetId != null"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            AND (find_in_set(#{streetId},t2.PARENT_DEPT_IDS) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            OR find_in_set(#{streetId},t2.ALL_DEPT_IDS)) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <if test="communityId != '' and communityId != null"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            AND (find_in_set(#{communityId},t2.PARENT_DEPT_IDS) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            OR find_in_set(#{communityId},t2.ALL_DEPT_IDS)) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <if test="gridId != '' and gridId != null"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            and (t2.grid_id = #{gridId} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            OR find_in_set(#{gridId},t2.ALL_DEPT_IDS)) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <if test="residentsName != '' and residentsName != null">and t.RESIDENTS_NAME like concat('%',#{residentsName},'%') </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <if test="residentsPhone != '' and residentsPhone != null">and t.RESIDENTS_PHONE like concat('%',#{residentsPhone},'%') </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <if test="residentsIdentityNo != '' and residentsIdentityNo != null">and t.RESIDENTS_IDENTITY_NO like concat('%',#{residentsIdentityNo},'%') </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        group by t.ID | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        order by t.CREATED_TIME desc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    <resultMap type="com.elink.esua.epdc.dto.PopulationInformationDTO" id="populationInformationMap2"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <result property="id" column="ID"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <result property="residentsName" column="RESIDENTS_NAME"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <result property="residentsSex" column="RESIDENTS_SEX"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <result property="residentsNation" column="RESIDENTS_NATION"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <result property="residentsIdentityNo" column="RESIDENTS_IDENTITY_NO"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <result property="residentsPhone" column="RESIDENTS_PHONE"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <result property="householdRegistrationPlace" column="HOUSEHOLD_REGISTRATION_PLACE"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <collection property="housingInformationList" ofType="com.elink.esua.epdc.dto.HousingInformationDTO"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            <result property="houseAddress" column="HOUSE_ADDRESS"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            <result property="propertyOwner" column="PROPERTY_OWNER"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            <result property="propertyOwnerIdentityNo" column="PROPERTY_OWNER_IDENTITY_NO"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            <result property="propertyOwnerMobile" column="PROPERTY_OWNER_MOBILE"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            <result property="gridName" column="gridName"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        </collection> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    </resultMap> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    <select id="selectDetailOfPopulationInformationDTO" resultMap="populationInformationMap2"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      select | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            t.ID,t.RESIDENTS_NAME,t.RESIDENTS_SEX,t.RESIDENTS_PHONE,t.RESIDENTS_IDENTITY_NO,t.RESIDENTS_NATION,t.HOUSEHOLD_REGISTRATION_PLACE, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            substring_index(t2.ALL_DEPT_NAMES,'-',-1) as gridName,t2.HOUSE_ADDRESS,t2.PROPERTY_OWNER, t2.PROPERTY_OWNER_IDENTITY_NO, t2.PROPERTY_OWNER_MOBILE | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        from epdc_population_information t | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            left join epdc_house_resident t1 on t.ID = t1.RESIDENT_ID | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            left join epdc_housing_information t2 on t1.HOUSE_ID = t2.ID | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        where t.DEL_FLAG ='0' and t1.DEL_FLAG ='0' and t2.DEL_FLAG ='0' and t.ID = #{id}; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					</mapper> | 
					 | 
					 | 
					</mapper> |