| 
						
						
							
								
							
						
						
					 | 
					@ -307,12 +307,21 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        </if> | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        WHERE | 
					 | 
					 | 
					        WHERE | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        score.del_flag = '0' | 
					 | 
					 | 
					            score.del_flag = '0' | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            AND score.MONTH_ID = #{monthId,jdbcType=VARCHAR} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        <if test="customerId != null and customerId != ''"> | 
					 | 
					 | 
					        <if test="customerId != null and customerId != ''"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            AND score.CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} | 
					 | 
					 | 
					            AND score.CUSTOMER_ID = #{customerId,jdbcType=VARCHAR} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        </if> | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        AND score.PARENT_ID = #{agencyId,jdbcType=VARCHAR} | 
					 | 
					 | 
					        <!--孔村镇ID 则跳过 直接查社区级别的--> | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        AND score.MONTH_ID = #{monthId,jdbcType=VARCHAR} | 
					 | 
					 | 
					        <choose> | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            <when test="agencyId == '1234085031077498881'"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                AND org.PIDS like  concat(#{agencyId},'%') | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                AND org.LEVEL = 'community' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            </when> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            <otherwise> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                AND score.PARENT_ID = #{agencyId,jdbcType=VARCHAR} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            </otherwise> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        </choose> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        <choose> | 
					 | 
					 | 
					        <choose> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            <when test="orgType != null and orgType != ''"> | 
					 | 
					 | 
					            <when test="orgType != null and orgType != ''"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                AND score.ORG_TYPE = #{orgType,jdbcType=VARCHAR} | 
					 | 
					 | 
					                AND score.ORG_TYPE = #{orgType,jdbcType=VARCHAR} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |