|  | @@ -73,9 +73,10 @@
 | 
	
		
			
				|  |  |                 sum(if(t.start_date < #{date}, 1, 0))                        as prevTotal,
 | 
	
		
			
				|  |  |                 sum(if(t.start_date < #{date} and t.`status` = 2, 1, 0)) as prevcompleted
 | 
	
		
			
				|  |  |          FROM core_edu_training_task t
 | 
	
		
			
				|  |  | -        inner join core_edu_training_plan p on t.plan_id =p.id and p.plan_cycle < 4
 | 
	
		
			
				|  |  | +        left join core_edu_training_plan p on t.plan_id =p.id
 | 
	
		
			
				|  |  |          WHERE t.start_date >= #{prevdate} and t.start_date <=#{end}
 | 
	
		
			
				|  |  |            and t.org_path like concat(#{orgPath}, '%')
 | 
	
		
			
				|  |  | +          and ( p.plan_cycle < 4 or t.plan_id is null)
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectOverViewDrillTaskInfo" resultType="com.xunmei.core.board.dto.app.AppOverviewTaskInfoDto">
 | 
	
	
		
			
				|  | @@ -84,9 +85,10 @@
 | 
	
		
			
				|  |  |                 sum(if(t.start_date < #{date}, 1, 0))                        as prevTotal,
 | 
	
		
			
				|  |  |                 sum(if(t.start_date < #{date}, (if(t.`status` = 4, 1, 0)), 0)) as prevcompleted
 | 
	
		
			
				|  |  |          FROM core_drill_task t
 | 
	
		
			
				|  |  | -        inner join core_drill_plan p on t.plan_id=p.id and p.plan_cycle < 5
 | 
	
		
			
				|  |  | +        left join core_drill_plan p on t.plan_id=p.id
 | 
	
		
			
				|  |  |          WHERE t.start_date >= #{prevdate}  and t.start_date <=#{end}
 | 
	
		
			
				|  |  |            and t.org_path like concat(#{orgPath}, '%')
 | 
	
		
			
				|  |  | +          and (p.plan_cycle < 5 or t.plan_id is null)
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectOverViewMonitorTaskInfo" resultType="com.xunmei.core.board.dto.app.AppOverviewTaskInfoDto">
 | 
	
	
		
			
				|  | @@ -177,7 +179,7 @@
 | 
	
		
			
				|  |  |                             (r.STATUS = 3, 1, 0)) AS completed,
 | 
	
		
			
				|  |  |                 sum(r.exception_count)            AS exceptionCount
 | 
	
		
			
				|  |  |          FROM core_safety_task r
 | 
	
		
			
				|  |  | -                 INNER JOIN core_safecheck_plan p ON r.plan_id = p.id
 | 
	
		
			
				|  |  | +        left JOIN core_safecheck_plan p ON r.plan_id = p.id
 | 
	
		
			
				|  |  |          WHERE ((
 | 
	
		
			
				|  |  |              #{startDate}   <![CDATA[<=]]> r.plan_start_time
 | 
	
		
			
				|  |  |            and #{endDate} >= r.plan_start_time
 | 
	
	
		
			
				|  | @@ -277,9 +279,10 @@
 | 
	
		
			
				|  |  |      <select id="selectSyntheticEdu" resultType="com.xunmei.core.board.dto.app.AppSyntheticTaskCategoryDto">
 | 
	
		
			
				|  |  |          SELECT count(0) as total, sum(`status` = 2) as completed
 | 
	
		
			
				|  |  |          from core_edu_training_task t
 | 
	
		
			
				|  |  | -        inner join core_edu_training_plan p on t.plan_id =p.id and p.plan_cycle < 4
 | 
	
		
			
				|  |  | +        left join core_edu_training_plan p on t.plan_id =p.id
 | 
	
		
			
				|  |  |          where t.start_date BETWEEN #{startDate} and #{endDate}
 | 
	
		
			
				|  |  |            AND t.org_path LIKE CONCAT(#{orgPath}, '%')
 | 
	
		
			
				|  |  | +        and  (p.plan_cycle < 4 or t.plan_id is null)
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |      <select id="selectSyntheticInout" resultType="com.xunmei.core.board.vo.app.AppSyntheticInOutVo">
 | 
	
		
			
				|  |  |          SELECT COUNT(*)        as total,
 |