|  | @@ -713,6 +713,8 @@ class EquipmentManagerV3(View):
 | 
	
		
			
				|  |  |              uv_dict[us['uid']]['channels'] = channels
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          for p in dvls:
 | 
	
		
			
				|  |  | +            p['UID'] = p['UID'].replace('\n', '').replace('\r', '')
 | 
	
		
			
				|  |  | +            p_uid = p['UID'].upper()
 | 
	
		
			
				|  |  |              if p['serial_number']:
 | 
	
		
			
				|  |  |                  u_device_info_qs = UnicomDeviceInfo.objects.filter(serial_no=p['serial_number'])
 | 
	
		
			
				|  |  |                  if u_device_info_qs.exists():
 | 
	
	
		
			
				|  | @@ -723,7 +725,7 @@ class EquipmentManagerV3(View):
 | 
	
		
			
				|  |  |              if p['serial_number']:  # 存在序列号根据序列号查询
 | 
	
		
			
				|  |  |                  iotdeviceInfo_qs = iotdeviceInfoModel.objects.filter(serial_number=p['serial_number'][0:6])
 | 
	
		
			
				|  |  |              else:  # 根据uid查询
 | 
	
		
			
				|  |  | -                iotdeviceInfo_qs = iotdeviceInfoModel.objects.filter(uid=p['UID'])
 | 
	
		
			
				|  |  | +                iotdeviceInfo_qs = iotdeviceInfoModel.objects.filter(uid=p_uid)
 | 
	
		
			
				|  |  |              if iotdeviceInfo_qs.exists():
 | 
	
		
			
				|  |  |                  iotdeviceInfo = iotdeviceInfo_qs.values('endpoint', 'token_iot_number')
 | 
	
		
			
				|  |  |                  p['iot'].append({
 | 
	
	
		
			
				|  | @@ -733,17 +735,16 @@ class EquipmentManagerV3(View):
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              p['vod'] = []
 | 
	
		
			
				|  |  |              for dm in ubqs:
 | 
	
		
			
				|  |  | -                if p['UID'] == dm['uid']:
 | 
	
		
			
				|  |  | +                if p_uid == dm['uid']:
 | 
	
		
			
				|  |  |                      if dm['endTime'] > nowTime:
 | 
	
		
			
				|  |  |                          p['vod'].append(dm)
 | 
	
		
			
				|  |  |              p['preview'] = []
 | 
	
		
			
				|  |  |              for up in upqs:
 | 
	
		
			
				|  |  | -                if p['UID'] == up['uid']:
 | 
	
		
			
				|  |  | +                if p_uid == up['uid']:
 | 
	
		
			
				|  |  |                      obj = 'uid_preview/{uid}/channel_{channel}.png'.format(uid=up['uid'], channel=up['channel'])
 | 
	
		
			
				|  |  |                      img_sign = bucket.sign_url('GET', obj, 300)
 | 
	
		
			
				|  |  |                      p['preview'].append(img_sign)
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | -            p_uid = p['UID'].upper()
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |              # 返回设备初始化字符
 | 
	
		
			
				|  |  |              uid_qs = UIDModel.objects.filter(uid=p_uid).values('platform', 'init_string', 'init_string_app')
 |