|
@@ -193,7 +193,7 @@ class EquipmentInfoService:
|
|
|
equipment_info_qs = equipment_info_qs.values('id', 'device_uid', 'device_nick_name', 'channel', 'event_type',
|
|
|
'status', 'answer_status', 'alarm',
|
|
|
'event_time', 'receive_time', 'is_st', 'add_time',
|
|
|
- 'storage_location', 'border_coords', 'tab_val')
|
|
|
+ 'storage_location', 'border_coords', 'tab_val', 'event_tag')
|
|
|
|
|
|
equipment_info_qs = equipment_info_qs.order_by('-event_time')
|
|
|
qs_page = equipment_info_qs[(page - 1) * size:page * size]
|
|
@@ -212,6 +212,7 @@ class EquipmentInfoService:
|
|
|
item['receiveTime'] = item['receive_time']
|
|
|
item['addTime'] = item['add_time']
|
|
|
item['borderCoords'] = item['border_coords']
|
|
|
+ item['eventTag'] = item['event_tag']
|
|
|
item.pop('device_uid')
|
|
|
item.pop('device_nick_name')
|
|
|
item.pop('channel')
|
|
@@ -221,6 +222,7 @@ class EquipmentInfoService:
|
|
|
item.pop('add_time')
|
|
|
item.pop('border_coords')
|
|
|
item.pop('tab_val')
|
|
|
+ item.pop('event_tag')
|
|
|
return qs_page
|
|
|
|
|
|
@classmethod
|
|
@@ -315,18 +317,23 @@ class EquipmentInfoService:
|
|
|
return equipment_info
|
|
|
|
|
|
@classmethod
|
|
|
- def get_combo_types(cls, event_type):
|
|
|
+ def get_combo_types(cls, event_type, event_tag):
|
|
|
"""
|
|
|
获取设备算法组合类型
|
|
|
51:移动侦测,52:传感器报警,53:影像遗失,54:PIR,55:门磁报警,56:外部发报,57:人型报警(提示:有人出现),58:车型,59:宠物,60:人脸,61:异响,
|
|
|
62:区域闯入,63:区域闯出,64:长时间无人检测,65:长时间无人检测
|
|
|
0:代表空字符,702:摄像头休眠,703:摄像头唤醒,704:电量过低
|
|
|
AWS AI识别 1:人形,2:车型,3:宠物,4:包裹。云端AI类型
|
|
|
+ @param event_tag:
|
|
|
@param event_type:
|
|
|
@return:
|
|
|
"""
|
|
|
try:
|
|
|
types = []
|
|
|
+ if event_tag:
|
|
|
+ res = event_tag.split(',')
|
|
|
+ types = [int(var) for var in res if var]
|
|
|
+ return types
|
|
|
res_type = cls.is_type_exist(event_type)
|
|
|
if res_type == 0:
|
|
|
return types
|