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