feat: speaker 接口忽略采集器
This commit is contained in:
parent
8667267046
commit
ae15f1a33c
|
@ -23,7 +23,8 @@ class EquipFilterSet(filters.FilterSet):
|
||||||
"cate__code": ['exact', 'in', 'contains'],
|
"cate__code": ['exact', 'in', 'contains'],
|
||||||
"cate__is_for_safe": ['exact'],
|
"cate__is_for_safe": ['exact'],
|
||||||
"cate__is_for_enp": ['exact'],
|
"cate__is_for_enp": ['exact'],
|
||||||
"cate__is_car": ['exact']
|
"cate__is_car": ['exact'],
|
||||||
|
"is_deleted": ['exact']
|
||||||
}
|
}
|
||||||
|
|
||||||
def filter_tag(self, queryset, name, value):
|
def filter_tag(self, queryset, name, value):
|
||||||
|
|
|
@ -252,6 +252,8 @@ class TDeviceViewSet(ListModelMixin, UpdateModelMixin, DestroyModelMixin, Custom
|
||||||
rows = res['rows']
|
rows = res['rows']
|
||||||
t_l = []
|
t_l = []
|
||||||
for i in rows:
|
for i in rows:
|
||||||
|
if i['name'] == '采集器':
|
||||||
|
continue
|
||||||
t_l.append(i['sn'])
|
t_l.append(i['sn'])
|
||||||
td = TDevice.objects.filter(code=i['sn']).first()
|
td = TDevice.objects.filter(code=i['sn']).first()
|
||||||
if td:
|
if td:
|
||||||
|
@ -425,6 +427,8 @@ class TDeviceViewSet(ListModelMixin, UpdateModelMixin, DestroyModelMixin, Custom
|
||||||
_, res = spClient.request(**spapis['device_list'], params=request.data)
|
_, res = spClient.request(**spapis['device_list'], params=request.data)
|
||||||
codes = []
|
codes = []
|
||||||
for i in res['rows']:
|
for i in res['rows']:
|
||||||
|
if i['name'] == '采集器':
|
||||||
|
continue
|
||||||
codes.append(i['sn'])
|
codes.append(i['sn'])
|
||||||
tds_info = TDeviceSerializer(
|
tds_info = TDeviceSerializer(
|
||||||
instance=TDevice.objects.filter(code__in=codes), many=True).data
|
instance=TDevice.objects.filter(code__in=codes), many=True).data
|
||||||
|
|
Loading…
Reference in New Issue