|  | @@ -383,13 +383,11 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <!--查询7天内根据表类型的抄表率数据统计-->
 | 
	
		
			
				|  |  |      <select id="getRateList7DayByType" resultType="com.bz.smart_city.dto.WaterReadRateListDto">
 | 
	
		
			
				|  |  | -        <if test="siteId != null">select * from (
 | 
	
		
			
				|  |  | -            SELECT
 | 
	
		
			
				|  |  | -            swmt.channel_id,
 | 
	
		
			
				|  |  | -            sdt.equipment_type as device_type_name,
 | 
	
		
			
				|  |  | -            (select SUM(device_count) from sc_stat_meter_read_rate_by_building_7day where channel_id =
 | 
	
		
			
				|  |  | -            swmt.channel_idand site_id = #{siteId}
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | +        select * from (
 | 
	
		
			
				|  |  | +        SELECT
 | 
	
		
			
				|  |  | +        swmt.channel_id,
 | 
	
		
			
				|  |  | +        sdt.equipment_type as device_type_name,
 | 
	
		
			
				|  |  | +        (select SUM(device_count) from sc_stat_meter_read_rate_by_building_7day where channel_id = swmt.channel_id <if test="siteId != null"> and site_id = #{siteId} </if>
 | 
	
		
			
				|  |  |          <if test="buildingIds != null and buildingIds.size() != 0"> and building_id in <foreach collection="buildingIds" item="item" open="(" separator="," close=")">#{item}</foreach> </if>
 | 
	
		
			
				|  |  |          <if test="customerIds != null and customerIds.size() != 0"> and customer_id in <foreach collection="customerIds" item="item" open="(" separator="," close=")">#{item}</foreach> </if>
 | 
	
		
			
				|  |  |          GROUP BY stat_day desc limit 1) as device_count,
 | 
	
	
		
			
				|  | @@ -418,13 +416,11 @@
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <!--查询15天内根据表类型的抄表率数据统计-->
 | 
	
		
			
				|  |  |      <select id="getRateList15DayByType" resultType="com.bz.smart_city.dto.WaterReadRateListDto">
 | 
	
		
			
				|  |  | -        <if test="siteId != null">select * from (
 | 
	
		
			
				|  |  | -            SELECT
 | 
	
		
			
				|  |  | -            swmt.channel_id,
 | 
	
		
			
				|  |  | -            sdt.equipment_type as device_type_name,
 | 
	
		
			
				|  |  | -            (select SUM(device_count) from sc_stat_meter_read_rate_by_building_15day where channel_id =
 | 
	
		
			
				|  |  | -            swmt.channel_idand site_id = #{siteId}
 | 
	
		
			
				|  |  | -        </if>
 | 
	
		
			
				|  |  | +        select * from (
 | 
	
		
			
				|  |  | +        SELECT
 | 
	
		
			
				|  |  | +        swmt.channel_id,
 | 
	
		
			
				|  |  | +        sdt.equipment_type as device_type_name,
 | 
	
		
			
				|  |  | +        (select SUM(device_count) from sc_stat_meter_read_rate_by_building_15day where channel_id = swmt.channel_id <if test="siteId != null"> and site_id = #{siteId} </if>
 | 
	
		
			
				|  |  |          <if test="buildingIds != null and buildingIds.size() != 0"> and building_id in <foreach collection="buildingIds" item="item" open="(" separator="," close=")">#{item}</foreach> </if>
 | 
	
		
			
				|  |  |          <if test="customerIds != null and customerIds.size() != 0"> and customer_id in <foreach collection="customerIds" item="item" open="(" separator="," close=")">#{item}</foreach> </if>
 | 
	
		
			
				|  |  |          GROUP BY stat_day desc limit 1) as device_count,
 |