feat(agent): 立账凭证检核
(cherry picked from commit f9e2fb5efc1ec7bf4f6e52e08dd3591b4e77edd9)
This commit is contained in:
1 parent
9bcbf9d211
commit
f615e56bb9
70 files changed
+4968
-108
No files matched your search
@@ -142,6 +142,11 @@ def _build_schedule_run_wecom_description(run: ScheduleRun) -> str:
|
||||
|
||||
|
||||
def _notify_schedule_run_wecom(task: ScheduleTask, run: ScheduleRun) -> None:
|
||||
"""
|
||||
排程完成后的通用企微通知。
|
||||
核心逻辑:若 response_summary_json.domain_notification_managed=true(如立账凭证检核),
|
||||
则跳过以免与领域缺件/失败告警重复。
|
||||
"""
|
||||
from app.services.wecom_notify import (
|
||||
upload_wecom_temp_media,
|
||||
send_wecom_file_message,
|
||||
@@ -151,6 +156,12 @@ def _notify_schedule_run_wecom(task: ScheduleTask, run: ScheduleRun) -> None:
|
||||
_get_enabled_events,
|
||||
)
|
||||
|
||||
# 领域自行管理通知时跳过通用完成通知,避免重复刷屏
|
||||
summary = run.response_summary_json if isinstance(run.response_summary_json, dict) else {}
|
||||
if summary.get('domain_notification_managed'):
|
||||
run.wecom_notify_error = 'domain_notification_managed'
|
||||
return
|
||||
|
||||
if not current_app.config.get('WECOM_NOTIFY_ENABLED', True):
|
||||
run.wecom_notify_error = 'WECOM_NOTIFY_ENABLED=false'
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user