Browse Source

修改获取iot信息失败

zhangdongming 3 năm trước cách đây
mục cha
commit
7d35cd39a4
1 tập tin đã thay đổi với 3 bổ sung4 xóa
  1. 3 4
      Controller/EquipmentManagerV3.py

+ 3 - 4
Controller/EquipmentManagerV3.py

@@ -670,9 +670,6 @@ class EquipmentManagerV3(View):
             uv_dict[us['uid']]['channels'] = channels
             uv_dict[us['uid']]['channels'] = channels
 
 
         for p in dvls:
         for p in dvls:
-            # C1返回序列号
-            if p['Type'] != 101:
-                p['serial_number'] = ''
             # 获取iot_deviceInfo表的endpoint和token_iot_number
             # 获取iot_deviceInfo表的endpoint和token_iot_number
             p['iot'] = []
             p['iot'] = []
             if p['serial_number']:  # 存在序列号根据序列号查询
             if p['serial_number']:  # 存在序列号根据序列号查询
@@ -685,7 +682,9 @@ class EquipmentManagerV3(View):
                     'endpoint': iotdeviceInfo[0]['endpoint'],
                     'endpoint': iotdeviceInfo[0]['endpoint'],
                     'token_iot_number': iotdeviceInfo[0]['token_iot_number']
                     'token_iot_number': iotdeviceInfo[0]['token_iot_number']
                 })
                 })
-
+            # C1返回序列号
+            if p['Type'] != 101:
+                p['serial_number'] = ''
             p['vod'] = []
             p['vod'] = []
             for dm in ubqs:
             for dm in ubqs:
                 if p['UID'] == dm['uid']:
                 if p['UID'] == dm['uid']: