浏览代码

判断设备mobile_4G = 1,将isCameraOpenCloud = 0

guanhailong 2 年之前
父节点
当前提交
b0400701b2
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7 0
      Controller/EquipmentManagerV3.py

+ 7 - 0
Controller/EquipmentManagerV3.py

@@ -704,6 +704,13 @@ class EquipmentManagerV3(View):
                 p['uid_version'] = ''
                 p['ucode'] = ''
             p['View_Password'] = self.encrypt_pwd(p['View_Password'])
+
+            # 判断设备是否支持4G
+            uid_set_qs =UidSetModel.objects.filter(uid=p['UID']).values('mobile_4g')
+            if uid_set_qs.exists():
+                uid_set_qs = uid_set_qs.first()
+                if uid_set_qs['mobile_4g'] == 1:
+                    p['isCameraOpenCloud'] = 0
             data.append(p)
         result = data
         return response.json(0, result)