| 
					
				 | 
			
			
				@ -426,8 +426,10 @@ public class StatisticsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer emergencyCallNum = jdbcTemplate.queryForObject(emergencyCallSql, Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String securityMonitoringSql = "SELECT COUNT(1) FROM base_security_monitoring_order where 1=1 and hospital " + orgFilter; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer securityMonitoringNum = jdbcTemplate.queryForObject(securityMonitoringSql, Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String oldTotalSql ="SELECT ((SELECT COUNT(distinct p.id) FROM base_patient p  WHERE p.sign_status = 1 AND p.del = 1 ) +(SELECT COUNT(distinct p.id) FROM base_patient p INNER JOIN " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " wlyy_patient_device d ON p.id = d.`user` WHERE p.sign_status = 0 AND p.del = 1  AND d.del = 0)) total"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String oldTotalSql ="SELECT ((SELECT COUNT(distinct p.id) FROM base_patient p  WHERE p.sign_status = 1 AND p.del = 1 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "and p.id not in (SELECT dict_code FROM `base`.`wlyy_hospital_sys_dict` WHERE `dict_name` = 'jkzl_older' or dict_name='jkzl_child') ) +(SELECT COUNT(distinct p.id) FROM base_patient p INNER JOIN " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " wlyy_patient_device d ON p.id = d.`user` WHERE p.sign_status = 0 AND p.del = 1  AND d.del = 0 " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " and p.id not in (SELECT dict_code FROM `base`.`wlyy_hospital_sys_dict` WHERE `dict_name` = 'jkzl_older' or dict_name='jkzl_child'))) total"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Integer> oldTotalList = jdbcTemplate.queryForList(oldTotalSql, Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1451,8 +1453,13 @@ public class StatisticsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            orgCodes = orgCodes.replaceAll(",", "','"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//            filter = " not in ('" + orgCodes + "')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select count(p.id) from base_patient p  where p.del=1 and p.archive_type=1 " + olderFilter.replace("{patient}","p.id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql = " select count(p.id) from base_patient p  where p.del=1 and p.archive_type=1 and p.sign_status=1 " + olderFilter.replace("{patient}","p.id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer olderCount = jdbcTemplate.queryForObject(sql, Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql = " SELECT COUNT(distinct p.id) FROM base_patient p INNER JOIN  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "wlyy_patient_device d ON p.id = d.`user` WHERE p.sign_status = 0 AND p.del = 1  AND d.del = 0\n" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "and p.id not in (SELECT dict_code FROM `base`.`wlyy_hospital_sys_dict` WHERE `dict_name` = 'jkzl_older' or dict_name='jkzl_child') "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer olderCount2 = jdbcTemplate.queryForObject(sql, Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        olderCount +=olderCount2; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql = " select count(DISTINCT p.id) from base_patient p INNER JOIN wlyy_patient_device pd on p.id = pd.user and p.archive_type=1 and pd.del=0 where p.del=1  "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                olderFilter.replace("{patient}","p.id"); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1470,7 +1477,7 @@ public class StatisticsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sqlSign = "SELECT COUNT(DISTINCT p.id) FROM " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "base_patient p "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "WHERE p.del = 1 and p.archive_type =1 "+olderFilter.replace("{patient}","p.id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "WHERE p.del = 1 and p.archive_type =1 and p.sign_status=1 "+olderFilter.replace("{patient}","p.id"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer familyOlderCount = jdbcTemplate.queryForObject(sqlfamily, Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Integer familySignCount = jdbcTemplate.queryForObject(sqlSign, Integer.class); 
			 |