|  | @@ -106,27 +106,27 @@
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      <select id="selectOrgBaseInfo" resultType="com.xunmei.core.board.dto.app.AppOrgBaseInfoDto">
 | 
	
		
			
				|  |  | -        SELECT count(0)                                                                                            as total,
 | 
	
		
			
				|  |  | -               sum(if(oh.org_id is null, 1, 0))                                                                    as unreachedCount,
 | 
	
		
			
				|  |  | -               sum(if(o.type = 4, 1, 0))                                                                           as bankingCount,
 | 
	
		
			
				|  |  | -               sum(if(o.type = 5, 1, 0))                                                                           as offATMCount,
 | 
	
		
			
				|  |  | -               sum(if(o.type = 4 and oh.ga382021 is not null, 1, 0))                                               as bankingGA382021,
 | 
	
		
			
				|  |  | -               sum(if(o.type = 4 and oh.ga382015 is not null, 1, 0))                                               as bankingGA382015,
 | 
	
		
			
				|  |  | -               sum(if(o.type = 5 and oh.ga382021 is not null, 1, 0))                                               as offATMGA382021,
 | 
	
		
			
				|  |  | -               sum(if(o.type = 5 and oh.ga382015 is not null, 1, 0))                                               as offATMGA382015,
 | 
	
		
			
				|  |  | -               sum(if(oe.business_library_type = 1, 1, 0))                                                         as businessLibraryOne,
 | 
	
		
			
				|  |  | -               sum(if(oe.business_library_type = 2, 1, 0))                                                         as businessLibraryTwo,
 | 
	
		
			
				|  |  | -               sum(if(oe.business_library_type = 3, 1, 0))                                                         as businessLibraryThree,
 | 
	
		
			
				|  |  | -               sum(if(oe.business_library_type = 4, 1, 0))                                                         as businessLibraryFour,
 | 
	
		
			
				|  |  | -               sum(if(oe.askari = 1, 1, 0))                                                                        as orgWithSecurityCount,
 | 
	
		
			
				|  |  | +        SELECT count(0)                                              as total,
 | 
	
		
			
				|  |  | +               sum(if(oh.org_id is null, 1, 0))                      as unreachedCount,
 | 
	
		
			
				|  |  | +               sum(if(o.type = 4, 1, 0))                             as bankingCount,
 | 
	
		
			
				|  |  | +               sum(if(o.type = 5, 1, 0))                             as offATMCount,
 | 
	
		
			
				|  |  | +               sum(if(o.type = 4 and oh.ga382021 is not null, 1, 0)) as bankingGA382021,
 | 
	
		
			
				|  |  | +               sum(if(o.type = 4 and oh.ga382015 is not null, 1, 0)) as bankingGA382015,
 | 
	
		
			
				|  |  | +               sum(if(o.type = 5 and oh.ga382021 is not null, 1, 0)) as offATMGA382021,
 | 
	
		
			
				|  |  | +               sum(if(o.type = 5 and oh.ga382015 is not null, 1, 0)) as offATMGA382015,
 | 
	
		
			
				|  |  | +               sum(if(oe.business_library_type = 1, 1, 0))           as businessLibraryOne,
 | 
	
		
			
				|  |  | +               sum(if(oe.business_library_type = 2, 1, 0))           as businessLibraryTwo,
 | 
	
		
			
				|  |  | +               sum(if(oe.business_library_type = 3, 1, 0))           as businessLibraryThree,
 | 
	
		
			
				|  |  | +               sum(if(oe.business_library_type = 4, 1, 0))           as businessLibraryFour,
 | 
	
		
			
				|  |  | +               sum(if(oe.askari = 1, 1, 0))                          as orgWithSecurityCount,
 | 
	
		
			
				|  |  |                 sum(if(o.type = 4 and oe.lobby_equipment is not null, oe.lobby_equipment,
 | 
	
		
			
				|  |  | -                      0))                                                                                          as bankingObbyDeviceCount,
 | 
	
		
			
				|  |  | +                      0))                                            as bankingObbyDeviceCount,
 | 
	
		
			
				|  |  |                 sum(if(o.type = 4 and oe.wall_penetrating_equipment is not null, oe.wall_penetrating_equipment,
 | 
	
		
			
				|  |  | -                      0))                                                                                          as bankingWallDeviceCount,
 | 
	
		
			
				|  |  | +                      0))                                            as bankingWallDeviceCount,
 | 
	
		
			
				|  |  |                 sum(if(o.type = 5 and oe.lobby_equipment is not null, oe.lobby_equipment,
 | 
	
		
			
				|  |  | -                      0))                                                                                          as offATMObbyDeviceCount,
 | 
	
		
			
				|  |  | +                      0))                                            as offATMObbyDeviceCount,
 | 
	
		
			
				|  |  |                 sum(if(o.type = 5 and oe.wall_penetrating_equipment is not null, oe.wall_penetrating_equipment,
 | 
	
		
			
				|  |  | -                      0))                                                                                          as offATMWallDeviceCount
 | 
	
		
			
				|  |  | +                      0))                                            as offATMWallDeviceCount
 | 
	
		
			
				|  |  |          FROM sys_org o
 | 
	
		
			
				|  |  |                   LEFT JOIN (SELECT org_id,
 | 
	
		
			
				|  |  |                                     IF
 | 
	
	
		
			
				|  | @@ -162,7 +162,7 @@
 | 
	
		
			
				|  |  |          GROUP BY p.plan_type
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  |      <select id="selectSyntheticSafetyCheck" resultType="com.xunmei.core.board.dto.app.AppSyntheticTaskCategoryDto">
 | 
	
		
			
				|  |  | -        SELECT p.check_type as plan_type,
 | 
	
		
			
				|  |  | +        SELECT p.check_type                      as plan_type,
 | 
	
		
			
				|  |  |                 count(0)                          AS total,
 | 
	
		
			
				|  |  |                 sum(
 | 
	
		
			
				|  |  |                         IF
 | 
	
	
		
			
				|  | @@ -240,4 +240,28 @@
 | 
	
		
			
				|  |  |            and reform_status != 11
 | 
	
		
			
				|  |  |            and confirm_status != 3
 | 
	
		
			
				|  |  |      </select>
 | 
	
		
			
				|  |  | +    <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
 | 
	
		
			
				|  |  | +        where start_date BETWEEN #{startDate} and #{endDate}
 | 
	
		
			
				|  |  | +          AND org_path LIKE CONCAT(#{orgPath}, '%')
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  | +    <select id="selectSyntheticInout" resultType="com.xunmei.core.board.vo.app.AppSyntheticInOutVo">
 | 
	
		
			
				|  |  | +        SELECT COUNT(*)        as total,
 | 
	
		
			
				|  |  | +               sum(l.type = 1) as department,
 | 
	
		
			
				|  |  | +               sum(l.type = 2) as temporary,
 | 
	
		
			
				|  |  | +               sum(l.type = 3) as emergency
 | 
	
		
			
				|  |  | +        FROM core_out_in_record r
 | 
	
		
			
				|  |  | +                 INNER JOIN core_introduce_letter l ON r.letter_id = l.id
 | 
	
		
			
				|  |  | +                 INNER JOIN sys_org o ON r.org_id = o.id
 | 
	
		
			
				|  |  | +        where arrival_time >= #{startDate}
 | 
	
		
			
				|  |  | +          AND arrival_time <= #{endDate}
 | 
	
		
			
				|  |  | +          and o.path LIKE CONCAT(#{orgPath}, '%')
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  | +    <select id="selectSyntheticMonitor" resultType="com.xunmei.core.board.dto.app.AppSyntheticTaskCategoryDto">
 | 
	
		
			
				|  |  | +        SELECT count(0) as total, sum(`status` = 2) as completed
 | 
	
		
			
				|  |  | +        from core_monitoring_retrieval_task
 | 
	
		
			
				|  |  | +        where ymd_date BETWEEN '2023-11-1' and '2023-11-30'
 | 
	
		
			
				|  |  | +          and org_path LIKE CONCAT(#{orgPath}, '%')
 | 
	
		
			
				|  |  | +    </select>
 | 
	
		
			
				|  |  |  </mapper>
 |