blt all 只返回在线标签
This commit is contained in:
parent
cfc6b072c6
commit
e439278da5
|
@ -97,9 +97,12 @@ class BltViewSet(CustomGenericViewSet):
|
||||||
blt_list = res['recordList']
|
blt_list = res['recordList']
|
||||||
macs = []
|
macs = []
|
||||||
for i in blt_list:
|
for i in blt_list:
|
||||||
if 'userId' in i:
|
if 'online' in i and i['online'] == False:
|
||||||
i['mac'] = i['userId']
|
pass
|
||||||
macs.append(i['mac'])
|
else:
|
||||||
|
if 'userId' in i:
|
||||||
|
i['mac'] = i['userId']
|
||||||
|
macs.append(i['mac'])
|
||||||
qs = self.queryset.filter(code__in=macs).exclude(employee=None)
|
qs = self.queryset.filter(code__in=macs).exclude(employee=None)
|
||||||
if data.get('depts', []):
|
if data.get('depts', []):
|
||||||
qs = qs.filter(employee__belong_dept=data['depts'])
|
qs = qs.filter(employee__belong_dept=data['depts'])
|
||||||
|
|
Loading…
Reference in New Issue