|
@@ -156,7 +156,6 @@ class SageMakerAiObject:
|
|
|
nickname = uid_push_list[0]['uid_set__nickname']
|
|
|
lang = uid_push_list[0]['lang']
|
|
|
event_type = res['event_type']
|
|
|
- label_str = SageMakerAiObject().get_push_tag_message(lang, event_type)
|
|
|
coords = json.dumps(res['coords']) if res['coords'] else '' # 坐标框字典转json字符串
|
|
|
now_time = int(time.time())
|
|
|
# 推送表存储数据
|
|
@@ -169,7 +168,6 @@ class SageMakerAiObject:
|
|
|
'event_type': event_type,
|
|
|
'event_time': d_push_time,
|
|
|
'add_time': now_time,
|
|
|
- 'alarm': label_str,
|
|
|
'border_coords': coords
|
|
|
}
|
|
|
push_msg_list = []
|
|
@@ -177,6 +175,10 @@ class SageMakerAiObject:
|
|
|
equipment_info_model = EquipmentInfoService.randoms_choice_equipment_info() # 随机获取其中一张推送表
|
|
|
for up in uid_push_list:
|
|
|
# 保存推送数据
|
|
|
+ lang = up['lang']
|
|
|
+ label_str = SageMakerAiObject().get_push_tag_message(lang, event_type)
|
|
|
+ equipment_info_kwargs['alarm'] = label_str
|
|
|
+
|
|
|
tz = up['tz']
|
|
|
if tz is None or tz == '':
|
|
|
tz = 0
|
|
@@ -190,7 +192,7 @@ class SageMakerAiObject:
|
|
|
push_type = up['push_type']
|
|
|
app_bundle_id = up['appBundleId']
|
|
|
token_val = up['token_val']
|
|
|
- lang = up['lang']
|
|
|
+
|
|
|
# 推送标题和推送内容
|
|
|
msg_title = PushObject.get_msg_title(nickname=nickname)
|
|
|
msg_text = PushObject.get_ai_msg_text(channel=channel, n_time=d_push_time, lang=lang, tz=tz,
|