|
@@ -241,10 +241,8 @@ class DeviceManagement(View):
|
|
|
isHuman = '是' if uid_set_qs[0]['is_human'] else '否'
|
|
|
if uid_set_qs[0]['cloud_vod'] == 2:
|
|
|
cloud_vod = '不支持'
|
|
|
- elif uid_set_qs[0]['cloud_vod'] == 1:
|
|
|
- cloud_vod = '开启'
|
|
|
else:
|
|
|
- cloud_vod = '关闭'
|
|
|
+ cloud_vod = '支持'
|
|
|
if uid_set_qs[0]['is_ai'] == 2:
|
|
|
isAI = '不支持'
|
|
|
elif uid_set_qs[0]['is_ai'] == 1:
|
|
@@ -257,6 +255,20 @@ class DeviceManagement(View):
|
|
|
device_info_list["datas"][k]['fields']['cloudVod'] = cloud_vod
|
|
|
device_info_list["datas"][k]['fields']['ip'] = uid_set_qs[0]['ip']
|
|
|
device_info_list["datas"][k]['fields']['version'] = uid_set_qs[0]['version']
|
|
|
+ uid_bucket_qs = UID_Bucket.objects.filter(
|
|
|
+ uid=device_info_list["datas"][k]['fields']['UID']).values('status')
|
|
|
+ # 0是关闭,1是开启
|
|
|
+ if uid_bucket_qs.exists():
|
|
|
+ res = []
|
|
|
+ for uid_bucket in uid_bucket_qs:
|
|
|
+ status = uid_bucket['status']
|
|
|
+ res.append(status)
|
|
|
+ if 1 in res:
|
|
|
+ device_info_list["datas"][k]['fields']['status'] = 1
|
|
|
+ else:
|
|
|
+ device_info_list["datas"][k]['fields']['status'] = 0
|
|
|
+ else:
|
|
|
+ device_info_list["datas"][k]['fields']['status'] = 0
|
|
|
return response.json(0, {'list': device_info_list, 'total': total})
|
|
|
except Exception as e:
|
|
|
print(e)
|
|
@@ -661,7 +673,7 @@ class DeviceManagement(View):
|
|
|
return response.json(0, res)
|
|
|
except Exception as e:
|
|
|
print(e)
|
|
|
- return response.json(500, (repr(e)))
|
|
|
+ return response.json(500, (repr(e)))
|
|
|
|
|
|
@staticmethod
|
|
|
def get_app_device_type_list(request_dict, response):
|