瀏覽代碼

修改获取iot信息失败

zhangdongming 3 年之前
父節點
當前提交
7d35cd39a4
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      Controller/EquipmentManagerV3.py

+ 3 - 4
Controller/EquipmentManagerV3.py

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