瀏覽代碼

查询设备列表C1返回完整序列号

locky 3 年之前
父節點
當前提交
963e9e4ecb
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Controller/EquipmentManagerV3.py

+ 5 - 0
Controller/EquipmentManagerV3.py

@@ -670,6 +670,11 @@ 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'] = CommonService.get_full_serial_number(p['UID'], p['serial_number'], p['Type'])
+            else:
+                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']:  # 存在序列号根据序列号查询