| 
					
				 | 
			
			
				@ -107,8 +107,13 @@ public class PatientDeviceService  { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //校验sn码是否被使用 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (needVerify) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if("1".equals(isScan)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                //解绑 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                List<DevicePatientDevice> devices = patientDeviceDao.findByDeviceSnAndUserType2(sn, userType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                patientDeviceDao.deleteAll(devices); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            DevicePatientDevice device = patientDeviceDao.findByDeviceSnAndUserType(sn, userType); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (!"1".equals(isScan)&&device != null && !device.getId().equals(patientDevice.getId())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if (device != null && !device.getId().equals(patientDevice.getId())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                throw new ServiceException("sn码" + sn + "已被使用!"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            deviceDetailService.registerToWlyy(patientDevice); 
			 |