|  | @@ -105,7 +105,10 @@
 | 
	
		
			
				|  |  |      <select id="selectStandbyPower"
 | 
	
		
			
				|  |  |              resultType="com.xunmei.core.reportForms.resumption.vo.IntrusionTestReportVO">
 | 
	
		
			
				|  |  |          SELECT
 | 
	
		
			
				|  |  | -        IFNULL( a.exception_count, 0 ) AS abnormalNumber,
 | 
	
		
			
				|  |  | +        IFNULL( SUM( IF ( c.confirm_status >= 2 AND c.reform_status IN ( 10, 11 ), 1, 0 ) ), 0 ) AS abnormalNumber,
 | 
	
		
			
				|  |  | +        IFNULL( SUM( IF ( c.reform_status = 11, 1, 0 )), 0 ) AS realityRectificationNumber,
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +       /* IFNULL( a.exception_count, 0 ) AS abnormalNumber,*/
 | 
	
		
			
				|  |  |          COUNT( a.id ) AS planNumber,
 | 
	
		
			
				|  |  |          IFNULL( SUM( IF ( a.`status` = 3, 1, 0 )), 0 ) AS realityNumber,
 | 
	
		
			
				|  |  |          IF
 | 
	
	
		
			
				|  | @@ -120,7 +123,7 @@
 | 
	
		
			
				|  |  |          ),
 | 
	
		
			
				|  |  |          '%'
 | 
	
		
			
				|  |  |          )) AS realityRate,
 | 
	
		
			
				|  |  | -        COUNT( c.id ) AS realityRectificationNumber,
 | 
	
		
			
				|  |  | +      /*  COUNT( c.id ) AS realityRectificationNumber,*/
 | 
	
		
			
				|  |  |          IF
 | 
	
		
			
				|  |  |          (
 | 
	
		
			
				|  |  |          COUNT( c.id )= 0
 | 
	
	
		
			
				|  | @@ -135,7 +138,20 @@
 | 
	
		
			
				|  |  |          WHERE
 | 
	
		
			
				|  |  |          b.plan_type =5
 | 
	
		
			
				|  |  |          <if test="startTime !=null and endTime !=null">
 | 
	
		
			
				|  |  | -        and    a.ymd_date BETWEEN #{startTime} AND #{endTime}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            and ((
 | 
	
		
			
				|  |  | +            #{startTime} <= a.plan_start_time
 | 
	
		
			
				|  |  | +            and #{endTime} >= a.plan_start_time
 | 
	
		
			
				|  |  | +            )
 | 
	
		
			
				|  |  | +            or (
 | 
	
		
			
				|  |  | +            #{startTime} <= a.plan_end_time
 | 
	
		
			
				|  |  | +            and #{endTime} >= a.plan_end_time
 | 
	
		
			
				|  |  | +            )
 | 
	
		
			
				|  |  | +            or (
 | 
	
		
			
				|  |  | +            #{startTime} >= a.plan_start_time
 | 
	
		
			
				|  |  | +            and #{endTime} <= a.plan_end_time
 | 
	
		
			
				|  |  | +            ))
 | 
	
		
			
				|  |  |          </if>
 | 
	
		
			
				|  |  |          <if test="orgPath !=null">
 | 
	
		
			
				|  |  |              and a.org_path  like concat(#{orgPath},'%')
 |