|  | @ -966,9 +966,16 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //数据采集量
 | 
	
		
			
				|  |  |             if(1==device.getDeviceType()){//安防设备
 | 
	
		
			
				|  |  |                 sql = " select count(id) from device_data_push_log where device_sn='"+deviceSn+"' ";
 | 
	
		
			
				|  |  |                 Long dataCount = jdbcTemplate.queryForObject(sql,Long.class);
 | 
	
		
			
				|  |  |                 devInfo.put("dataCount",dataCount);//
 | 
	
		
			
				|  |  |                 if("20".equals(device.getCategoryCode())){
 | 
	
		
			
				|  |  |                     //电表数据
 | 
	
		
			
				|  |  |                     sql = " select count(id) from base_device_electric_record where cons_no='"+deviceSn+"' ";
 | 
	
		
			
				|  |  |                     Long dataCount = jdbcTemplate.queryForObject(sql,Long.class);
 | 
	
		
			
				|  |  |                     devInfo.put("dataCount",dataCount);//
 | 
	
		
			
				|  |  |                 }else{
 | 
	
		
			
				|  |  |                     sql = " select count(id) from device_data_push_log where device_sn='"+deviceSn+"' ";
 | 
	
		
			
				|  |  |                     Long dataCount = jdbcTemplate.queryForObject(sql,Long.class);
 | 
	
		
			
				|  |  |                     devInfo.put("dataCount",dataCount);//
 | 
	
		
			
				|  |  |                 }
 | 
	
		
			
				|  |  |                 sql = " select sum(total) from (\n" +
 | 
	
		
			
				|  |  |                         "select count(id) total from base_emergency_assistance_order where device_sn='"+deviceSn+"'\n" +
 | 
	
		
			
				|  |  |                         "UNION ALL\n" +
 |