| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -74,26 +74,13 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        b.comparison_result comparisonResult | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        FROM | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            ic_resi_user a | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <choose> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					           <when test='identical == null or identical == "" or identical == "0" or type == null and type == "" or type == "0" '> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                LEFT JOIN ic_resi_comparison_record b ON a.id = b.resi_id AND b.del_flag = '0' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <if test="identical != null and identical != ''"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    AND b.identical =#{identical} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <if test="type != null and type != ''"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    AND b.type =#{type} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </when> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            <otherwise> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                INNER JOIN ic_resi_comparison_record b ON a.id = b.resi_id AND b.del_flag = '0' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <if test="identical != null and identical != ''"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    AND b.identical =#{identical} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                <if test="type != null and type != ''"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                    AND b.type =#{type} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					                </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            </otherwise> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </choose> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        LEFT JOIN ic_resi_comparison_record b ON a.id = b.resi_id AND b.del_flag = '0' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <if test='identical != null and identical != "" and identical == "0" '> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AND b.identical =#{identical} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <if test='type != null and type != "" and type == "0" '> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AND b.type =#{type} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        WHERE | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            a.del_flag = '0' | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        AND a.customer_id = #{customerId} | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -101,6 +88,12 @@ | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <if test="idCard != null and idCard != ''"> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AND a.id_card =#{idCard} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <if test='identical != null and identical != "" and identical != "0" '> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AND b.identical =#{identical} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        <if test='type != null and type != "" and type != "0" '> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					            AND b.type =#{type} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        </if> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					        ORDER BY a.pids ASC, b.created_time DESC | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					    </select> | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |