| 
					
				 | 
			
			
				@ -2253,7 +2253,7 @@ public class StatisticsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //照护老人  :  签约老人+有设备未签约的 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sign_OldSql = "SELECT SUM(a.zf_num) AS zf_num FROM ( SELECT count(DISTINCT id) zf_num FROM base_patient WHERE sign_status = 1 AND del = 1 AND id NOT IN (SELECT dict_code from wlyy_hospital_sys_dict WHERE  dict_name = 'jkzl_older')" ; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sign_OldSql+=" UNION ALL "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sign_OldSql += " SELECT COUNT( DISTINCT a.id ) zf_num FROM base_patient a  WHERE a.archive_type = 1 AND a.sign_status = 0 AND register = '1' AND a.del = '1' AND EXISTS ( SELECT 1 FROM wlyy_patient_device pd WHERE pd.USER = a.id AND pd.del = 0 ) ) a"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sign_OldSql += " SELECT COUNT( DISTINCT a.id ) zf_num FROM base_patient a  WHERE a.archive_type = 1 AND a.sign_status = 0  AND a.del = '1' AND EXISTS ( SELECT 1 FROM wlyy_patient_device pd WHERE pd.USER = a.id AND pd.del = 0 ) ) a"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //需照护老人 : 未签约 register=1  - 有设备未签约的 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String unSign_oldSql = "SELECT COUNT(*) c from base_patient a WHERE archive_type = 1 and a.register = 1 and (sign_status=0 or sign_status is null ) and del='1' and not EXISTS (select 1 from wlyy_patient_device pd where pd.user = a.id and pd.del=0) "; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -3856,7 +3856,10 @@ public class StatisticsService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //设备类型总数 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String deviceCodeTotalSql ="SELECT count(DISTINCT device_code) FROM wlyy_devices WHERE (device_code IS NOT NULL OR device_code <> '') AND category_code = '"+deviceCategory+"'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //long start=System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Integer> total = jdbcTemplate.queryForList(typeTotalSql, Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //long end=System.currentTimeMillis(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //System.out.println("类型数量运行多少毫秒:" + "=" + (end-start)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        jsonObject.put("typeTotal",total.get(0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        total = jdbcTemplate.queryForList(offLineDeviceSql,Integer.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        jsonObject.put("offLineDevice",total.get(0)); 
			 |