blt all 只返回在线标签
This commit is contained in:
parent
e439278da5
commit
0137da7479
|
@ -57,7 +57,8 @@ class BltViewSet(CustomGenericViewSet):
|
|||
blt_list = res['recordList']
|
||||
macs = []
|
||||
for i in blt_list:
|
||||
macs.append(i['mac'])
|
||||
if 'online' in i and i['online']:
|
||||
macs.append(i['mac'])
|
||||
qs = self.queryset.filter(code__in=macs).exclude(employee=None)
|
||||
ret['total'] = qs.count()
|
||||
ret['count_employee'] = qs.filter(employee__type='employee').count()
|
||||
|
@ -97,7 +98,7 @@ class BltViewSet(CustomGenericViewSet):
|
|||
blt_list = res['recordList']
|
||||
macs = []
|
||||
for i in blt_list:
|
||||
if 'online' in i and i['online'] == False:
|
||||
if 'online' in i and i['online'] is False:
|
||||
pass
|
||||
else:
|
||||
if 'userId' in i:
|
||||
|
|
Loading…
Reference in New Issue