fix(会商第三步): 流程图入库限 rwfx-A + 修复跳过报告生成流程图出现双调度中卡片

- 入库功能仅 rwfx-A(businessCode 6BF)深链会商模式提供,其它业务深链生成流程图不再出现入库按钮/询问
- 流程图抽取串行化:auto 自动出图与用户「跳过报告直接生成流程图」手动出图竞态时,先中止上一轮、复用/移除被取代气泡,保证任意时刻只有一张流程图卡片

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
fengxiangdebaoziandClaude Opus 4.8 committed 2026-06-25 12:29:45 +08:00
1 parent 04e6d0aa00
commit 893f1e6933
19 files changed
+559 -51

No files matched your search

@@ -0,0 +1,52 @@
"""Add login_params_json column to task_buttons.
按钮管理「外部链接」按钮新增「追加登录参数」能力(与应用管理一致):``url`` 外链在
拼好地址后,可再依次追加 ``?{key}={value}``,``value`` 由前端运行时从 ``userInfo``
按 ``source`` 解析(``other`` 时取字面 ``custom_value``)。整列以 JSON 存一个
``[{key, source, custom_value}, ...]`` 列表,默认空 → 旧按钮行为不变。
ORM: ``TaskButtonRow.login_params_json = PortableJSON()``(SQLite/PG 原生 JSON,
MySQL 落 TEXT)。``create_all`` 给全新库建列;已有库由启动期
``_ensure_orm_columns_sync`` 补列。本 revision 保持 alembic 图一致并留档。
Revision ID: 20260625_01
Revises: 20260620_02
Create Date: 2026-06-25
"""
from __future__ import annotations
import sqlalchemy as sa
from alembic import op
from sqlalchemy import inspect
revision = "20260625_01"
down_revision = "20260620_02"
branch_labels = None
depends_on = None
def _has_table(table_name: str) -> bool:
inspector = inspect(op.get_bind())
return table_name in inspector.get_table_names()
def _has_column(table_name: str, column_name: str) -> bool:
if not _has_table(table_name):
return False
inspector = inspect(op.get_bind())
return any(col["name"] == column_name for col in inspector.get_columns(table_name))
def upgrade() -> None:
if _has_table("task_buttons") and not _has_column("task_buttons", "login_params_json"):
op.add_column(
"task_buttons",
sa.Column("login_params_json", sa.Text(), nullable=True),
)
def downgrade() -> None:
if _has_column("task_buttons", "login_params_json"):
op.drop_column("task_buttons", "login_params_json")