فهرست منبع

feat(oa): terminate on return and copy form to start a new instance

Align with DingTalk: returned/rejected/cancelled are terminal; progress
shows return on the approver task only; done list includes returned;
deprecate same-instance resubmit and source-instance linking.

Co-authored-by: Cursor <cursoragent@cursor.com>
zlwu 3 ماه پیش
والد
کامیت
c9711d0dce

+ 56 - 143
backend/app/services/oa_engine.py

@@ -200,88 +200,58 @@ def build_progress_items(
     name_map: Dict[str, str],
     events: Optional[List[Any]] = None,
 ) -> List[Dict[str, Any]]:
-    """投影审批进度:按轮次 submit → 树序 tasks → return 事件 → 未到达;终态收尾。"""
+    """投影审批进度:发起人 → 树序 tasks → 未到达;终态收尾。
+
+    钉钉对齐:打回结果落在审批任务节点上,不另插 kind=return;不做同单多轮分段。
+    """
     events = list(events or [])
     sorted_tasks = _sort_tasks_for_detail(list(tasks), flow_root=flow_root)
-    current_round = int(getattr(inst, "current_round", None) or 1)
-    round_set = {1, current_round}
-    for t in sorted_tasks:
-        round_set.add(_task_round(t))
+    # 展示压成单轴(roundNo 统一为 1);历史多轮任务仍按树序合并展示
+    rn = 1
+    submit_ts = _fmt_dt(getattr(inst, "create_time", None))
     for e in events:
-        round_set.add(int(getattr(e, "round_no", None) or 1))
-    rounds = sorted(round_set)
+        if (getattr(e, "event_type", None) or "") == "submit":
+            submit_ts = _fmt_dt(getattr(e, "create_time", None)) or submit_ts
+            break
 
-    returns_by_round: Dict[int, Any] = {}
-    for e in events:
-        if (getattr(e, "event_type", None) or "") == "return":
-            returns_by_round[int(getattr(e, "round_no", None) or 1)] = e
-
-    items: List[Dict[str, Any]] = []
-    for rn in rounds:
-        submit_ts = _fmt_dt(getattr(inst, "create_time", None)) if rn == 1 else ""
-        for e in events:
-            if (getattr(e, "event_type", None) or "") == "submit" and int(
-                getattr(e, "round_no", None) or 1
-            ) == rn:
-                submit_ts = _fmt_dt(getattr(e, "create_time", None)) or submit_ts
-                break
+    items: List[Dict[str, Any]] = [
+        {
+            "kind": "submit",
+            "roundNo": rn,
+            "title": "发起人",
+            "status": "submitted",
+            "assigneeUserId": inst.initiator_user_id,
+            "assigneeUserName": name_map.get(inst.initiator_user_id or "", ""),
+            "timestamp": submit_ts,
+            "commentText": "",
+            "nodeKey": "",
+            "taskType": "",
+        }
+    ]
+    reached_keys = {
+        (t.node_key or "").strip() for t in sorted_tasks if (t.node_key or "").strip()
+    }
+    for t in sorted_tasks:
         items.append(
             {
-                "kind": "submit",
+                "kind": "task",
                 "roundNo": rn,
-                "title": "发起人" if rn == 1 else f"发起人(第 {rn} 次提交)",
-                "status": "submitted",
-                "assigneeUserId": inst.initiator_user_id,
-                "assigneeUserName": name_map.get(inst.initiator_user_id or "", ""),
-                "timestamp": submit_ts,
-                "commentText": "",
-                "nodeKey": "",
-                "taskType": "",
+                "title": t.node_name or t.node_key or "-",
+                "status": t.status,
+                "assigneeUserId": t.assignee_user_id,
+                "assigneeUserName": name_map.get(t.assignee_user_id or "", ""),
+                "timestamp": _fmt_dt(t.update_time or t.create_time),
+                "commentText": t.comment_text or "",
+                "nodeKey": t.node_key or "",
+                "taskType": t.task_type or "",
+                "resolveSource": getattr(t, "resolve_source", None) or "",
+                "taskId": t.id,
             }
         )
-        round_tasks = [t for t in sorted_tasks if _task_round(t) == rn]
-        reached_keys = {
-            (t.node_key or "").strip() for t in round_tasks if (t.node_key or "").strip()
-        }
-        for t in round_tasks:
-            items.append(
-                {
-                    "kind": "task",
-                    "roundNo": rn,
-                    "title": t.node_name or t.node_key or "-",
-                    "status": t.status,
-                    "assigneeUserId": t.assignee_user_id,
-                    "assigneeUserName": name_map.get(t.assignee_user_id or "", ""),
-                    "timestamp": _fmt_dt(t.update_time or t.create_time),
-                    "commentText": t.comment_text or "",
-                    "nodeKey": t.node_key or "",
-                    "taskType": t.task_type or "",
-                    "resolveSource": getattr(t, "resolve_source", None) or "",
-                    "taskId": t.id,
-                }
-            )
-        ret = returns_by_round.get(rn)
-        if ret:
-            actor = getattr(ret, "actor_user_id", None) or ""
-            items.append(
-                {
-                    "kind": "return",
-                    "roundNo": rn,
-                    "title": "打回",
-                    "status": "returned",
-                    "assigneeUserId": actor,
-                    "assigneeUserName": name_map.get(actor, ""),
-                    "timestamp": _fmt_dt(getattr(ret, "create_time", None)),
-                    "commentText": getattr(ret, "comment_text", None) or "",
-                    "nodeKey": getattr(ret, "node_key", None) or "",
-                    "taskType": "approval",
-                    "taskId": getattr(ret, "task_id", None) or "",
-                }
-            )
-        if inst.status == "running" and rn == current_round and isinstance(flow_root, dict):
-            _append_pending_nodes(
-                items, flow_root=flow_root, reached_keys=reached_keys, round_no=rn
-            )
+    if inst.status == "running" and isinstance(flow_root, dict):
+        _append_pending_nodes(
+            items, flow_root=flow_root, reached_keys=reached_keys, round_no=rn
+        )
 
     if inst.status == "completed":
         items.append(_terminal_item("done", "流程结束", inst))
@@ -289,6 +259,8 @@ def build_progress_items(
         items.append(_terminal_item("rejected", "流程结束(已拒绝)", inst))
     elif inst.status == "cancelled":
         items.append(_terminal_item("cancelled", "已撤销", inst))
+    elif inst.status == "returned":
+        items.append(_terminal_item("returned", "已打回", inst))
     return items
 
 
@@ -872,6 +844,8 @@ def start_instance(
     related_instance_ids: Optional[List[str]] = None,
     source_instance_id: Optional[str] = None,
 ) -> Dict[str, Any]:
+    # source_instance_id 保留入参兼容,不再写入关联(复制开新单不挂旧单)
+    _ = source_instance_id
     app = oa_crud.get_app(db, app_id, tenant_no)
     if not app or app.status != "1":
         raise OaEngineError("应用不存在或已停用")
@@ -880,14 +854,6 @@ def start_instance(
     if not ver:
         raise OaEngineError("应用尚未发布,无法发起")
 
-    src_id = (source_instance_id or "").strip() or None
-    if src_id:
-        src = _get_instance(db, src_id, tenant_no)
-        if src.initiator_user_id != initiator_user_id:
-            raise OaEngineError("只能从本人撤销的审批重提")
-        if src.status != "cancelled":
-            raise OaEngineError("仅已撤销的审批可关联重提")
-
     schema = _loads(ver.form_schema_json, {})
     data = dict(form_data or {})
     try:
@@ -904,8 +870,6 @@ def start_instance(
 
     now = datetime.now()
     title_text = (title or app.app_name or "").strip()
-    if src_id and title_text and not title_text.startswith("重提-"):
-        title_text = f"重提-{title_text}"
     inst = OaInstance(
         id=generate_uuid(),
         app_id=app_id,
@@ -915,7 +879,7 @@ def start_instance(
         initiator_dept_id=dept_id,
         form_data_json=_dumps(data),
         status="running",
-        source_instance_id=src_id,
+        source_instance_id=None,
         current_round=1,
         tenant_no=tenant_no,
         order_num=0,
@@ -1040,17 +1004,9 @@ def get_instance_detail(db: Session, instance_id: str, *, tenant_no: str) -> Dic
         name_map=name_map,
         events=events,
     )
-    resub = (
-        db.query(OaInstance)
-        .filter(
-            OaInstance.source_instance_id == instance_id,
-            OaInstance.tenant_no == tenant_no,
-            OaInstance.del_flag == 0,
-        )
-        .order_by(OaInstance.create_time.desc())
-        .first()
-    )
-    data["resubmittedInstanceId"] = resub.id if resub else ""
+    # 不再暴露旧单/重提单关联跳转
+    data["sourceInstanceId"] = ""
+    data["resubmittedInstanceId"] = ""
     return data
 
 
@@ -1076,7 +1032,7 @@ def list_tasks(
             OaTask.del_flag == 0,
             OaTask.assignee_user_id == user_id,
             OaTask.task_type == "approval",
-            OaTask.status.in_(("approved", "rejected")),
+            OaTask.status.in_(("approved", "rejected", "returned")),
         )
     elif kind == "cc":
         q = db.query(OaTask).filter(
@@ -1349,7 +1305,7 @@ def return_task(
     user_id: str,
     comment: Optional[str] = None,
 ) -> Dict[str, Any]:
-    """审批人打回:退回发起人修改,同实例不结束。"""
+    """审批人打回:本单终态 returned;再办须复制表单开新实例。"""
     task = (
         db.query(OaTask)
         .filter(OaTask.id == task_id, OaTask.tenant_no == tenant_no, OaTask.del_flag == 0)
@@ -1431,52 +1387,9 @@ def resubmit_instance(
     form_data: Optional[Dict[str, Any]] = None,
     initiator_select_user_ids: Optional[List[str]] = None,
 ) -> Dict[str, Any]:
-    """打回后发起人修改表单并再次提交(同实例新一轮)。"""
-    inst = _get_instance(db, instance_id, tenant_no)
-    if inst.initiator_user_id != user_id:
-        raise OaEngineError("仅发起人可再次提交")
-    if inst.status != "returned":
-        raise OaEngineError("仅打回待修改的审批可再次提交")
-
-    ver = (
-        db.query(OaAppVersion)
-        .filter(OaAppVersion.id == inst.app_version_id, OaAppVersion.del_flag == 0)
-        .first()
-    )
-    if not ver:
-        raise OaEngineError("流程版本不存在")
-
-    schema = _loads(ver.form_schema_json, {})
-    data = dict(form_data if form_data is not None else (_loads(inst.form_data_json, {}) or {}))
-    try:
-        data = apply_formulas_and_linkages(schema, data)
-    except FormulaError as e:
-        raise OaEngineError(f"公式计算失败: {e}") from e
-
-    now = datetime.now()
-    inst.form_data_json = _dumps(data)
-    inst.current_round = int(getattr(inst, "current_round", None) or 1) + 1
-    inst.status = "running"
-    inst.update_by = user_id
-    inst.update_time = now
-    db.add(inst)
-    _add_instance_event(
-        db,
-        inst=inst,
-        event_type="submit",
-        actor_user_id=user_id,
-        round_no=inst.current_round,
-    )
-    advance_from(
-        db,
-        inst=inst,
-        ver=ver,
-        from_node=None,
-        user_id=user_id,
-        initiator_select_user_ids=initiator_select_user_ids,
-    )
-    db.commit()
-    return get_instance_detail(db, inst.id, tenant_no=tenant_no)
+    """已废弃:同实例再次提交。请复制表单重新发起新实例。"""
+    _ = (db, instance_id, tenant_no, user_id, form_data, initiator_select_user_ids)
+    raise OaEngineError("同实例再次提交已废弃,请复制表单重新发起")
 
 
 def withdraw_instance(

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 171 - 1560
backend/graphify-out/.graphify_analysis.json


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 212 - 149
backend/graphify-out/.graphify_extract.json


+ 95 - 160
backend/graphify-out/GRAPH_REPORT.md

@@ -1,11 +1,11 @@
-# Graph Report - app  (2026-07-13)
+# Graph Report - app  (2026-07-15)
 
 ## Corpus Check
-- Large corpus: 219 files · ~265,676 words. Semantic extraction will be expensive (many Claude tokens). Consider running on a subfolder, or use --no-semantic to run AST-only.
+- Large corpus: 225 files · ~277,357 words. Semantic extraction will be expensive (many Claude tokens). Consider running on a subfolder, or use --no-semantic to run AST-only.
 
 ## Summary
-- 4528 nodes · 24439 edges · 52 communities detected
-- Extraction: 32% EXTRACTED · 68% INFERRED · 0% AMBIGUOUS · INFERRED: 16669 edges (avg confidence: 0.59)
+- 4715 nodes · 25954 edges · 39 communities detected
+- Extraction: 31% EXTRACTED · 69% INFERRED · 0% AMBIGUOUS · INFERRED: 17782 edges (avg confidence: 0.6)
 - Token cost: 0 input · 0 output
 
 ## Community Hubs (Navigation)
@@ -42,302 +42,237 @@
 - [[_COMMUNITY_Community 30|Community 30]]
 - [[_COMMUNITY_Community 31|Community 31]]
 - [[_COMMUNITY_Community 32|Community 32]]
-- [[_COMMUNITY_Community 33|Community 33]]
-- [[_COMMUNITY_Community 34|Community 34]]
 - [[_COMMUNITY_Community 35|Community 35]]
 - [[_COMMUNITY_Community 36|Community 36]]
 - [[_COMMUNITY_Community 37|Community 37]]
 - [[_COMMUNITY_Community 38|Community 38]]
 - [[_COMMUNITY_Community 39|Community 39]]
 - [[_COMMUNITY_Community 40|Community 40]]
-- [[_COMMUNITY_Community 41|Community 41]]
-- [[_COMMUNITY_Community 42|Community 42]]
-- [[_COMMUNITY_Community 43|Community 43]]
-- [[_COMMUNITY_Community 44|Community 44]]
-- [[_COMMUNITY_Community 45|Community 45]]
-- [[_COMMUNITY_Community 48|Community 48]]
-- [[_COMMUNITY_Community 49|Community 49]]
-- [[_COMMUNITY_Community 50|Community 50]]
-- [[_COMMUNITY_Community 51|Community 51]]
-- [[_COMMUNITY_Community 52|Community 52]]
-- [[_COMMUNITY_Community 53|Community 53]]
 
 ## God Nodes (most connected - your core abstractions)
-1. `success_response()` - 677 edges
-2. `error_response()` - 561 edges
-3. `SysUser` - 506 edges
-4. `BizQcTaskResult` - 316 edges
-5. `BizProductionMaterial` - 312 edges
-6. `BizProductionMaterialUsage` - 306 edges
-7. `BizQcMaterialUsage` - 304 edges
-8. `BizQcMaterial` - 294 edges
-9. `BizProductionMaterialStockBatch` - 293 edges
-10. `BizMaterialUsage` - 290 edges
+1. `success_response()` - 707 edges
+2. `error_response()` - 586 edges
+3. `SysUser` - 533 edges
+4. `BizQcTaskResult` - 328 edges
+5. `BizProductionMaterial` - 324 edges
+6. `BizProductionMaterialUsage` - 318 edges
+7. `BizQcMaterialUsage` - 316 edges
+8. `BizQcMaterial` - 306 edges
+9. `BizProductionMaterialStockBatch` - 305 edges
+10. `BizMaterialUsage` - 302 edges
 
 ## Surprising Connections (you probably didn't know these)
 - `统一记录 API 请求/响应出入参的中间件` --uses--> `SysApiRequestLog`  [INFERRED]
   core/api_request_log_middleware.py → models/models.py
 - `get_menu_list()` --calls--> `success_response()`  [INFERRED]
   api/menu.py → core/response.py
-- `sync_lab_storage_seq_after_use()` --calls--> `generate_uuid()`  [INFERRED]
-  crud/sample_reception_lab_code.py → core/utils.py
 - `保留匹配节点及其全部上级,供关键词检索后仍能正确组树。` --uses--> `SysDept`  [INFERRED]
   crud/dept.py → models/models.py
 - `物品单位 CRUD(biz_item_unit)` --uses--> `BizItemUnit`  [INFERRED]
   crud/item_unit.py → models/models.py
+- `快递公司 CRUD(biz_express_company)` --uses--> `BizExpressCompany`  [INFERRED]
+  crud/express_company.py → models/models.py
 
 ## Communities
 
 ### Community 0 - "Community 0"
 Cohesion: 0.01
-Nodes (879): attachment_download_url(), create_dept(), create_dict_data(), create_dict_type(), create_express_company(), create_item_unit(), create_menu(), create_post() (+871 more)
+Nodes (874): attachment_download_url(), create_dept(), create_dict_data(), create_dict_type(), create_express_company(), create_item_unit(), create_menu(), create_post() (+866 more)
 
 ### Community 1 - "Community 1"
 Cohesion: 0.01
-Nodes (625): AttachmentDownloadUrlBody, DeptCreateBody, DeptUpdateBody, DictDataCreateBody, DictDataUpdateBody, DictTypeCreateBody, DictTypeUpdateBody, ExpressCompanyCreateBody (+617 more)
+Nodes (629): _ensure_customer_for_mother(), generate_uuid(), create_cell_sample_type(), get_cell_sample_type(), list_cell_sample_types(), 细胞样本类型 CRUD(biz_cell_sample_type), _row_to_dict(), soft_delete_cell_sample_type() (+621 more)
 
 ### Community 2 - "Community 2"
 Cohesion: 0.01
-Nodes (410): list_collection_regions(), _normalize_date_bound(), _persist_protocol_sub_resources(), list_ethnics_for_select(), apply_data_scope(), _get_child_dept_ids(), get_user_dept_id(), _resolve_user_role_scopes() (+402 more)
+Nodes (622): AttachmentDownloadUrlBody, DeptCreateBody, DeptUpdateBody, DictDataCreateBody, DictDataUpdateBody, DictTypeCreateBody, DictTypeUpdateBody, ExpressCompanyCreateBody (+614 more)
 
 ### Community 3 - "Community 3"
-Cohesion: 0.09
-Nodes (350): 环境检测 — 检测项维护 + 登记管理 API, 保险公司及险种价格管理 API(保险公司 + 开票信息 + 险种价格), ProcessDefCreateBody, ProcessDefUpdateBody, PublishVersionBody, 审批意见:前端传 commentText,兼容 comment。, StartInstanceBody, TaskActionBody (+342 more)
+Cohesion: 0.06
+Nodes (536): 细胞存储 — 采集协议单 / 审核 / 财务确认 / 分期预警 API, 与列表接口一致:按租户 + 角色数据权限判断是否可访问该协议单。, If mother info exists but no customerId, create a customer record and link it., Base, 细胞产品 CRUD(biz_cell_product), 解析任务样本投入物,返回祖先链单段(样本终止节点)。, 管理端手动改状态:允许在合法枚举间任意变更,并同步库位占用。, 去掉末尾 -P{n}-XX 或 -XX,得到代次产品编码的基础前缀。 (+528 more)
 
 ### Community 4 - "Community 4"
 Cohesion: 0.01
-Nodes (312): generate_uuid(), batch_stock_in(), batch_stock_out(), consumable_code_exists(), create_consumable(), _dec(), get_consumable(), _is_enabled_status() (+304 more)
+Nodes (287): _normalize_date_bound(), _persist_protocol_sub_resources(), _body_to_payload(), _get_current_user_id(), get_production_reception_by_sample_code(), get_production_reception_detail(), _get_tenant_no(), post_production_reception() (+279 more)
 
 ### Community 5 - "Community 5"
 Cohesion: 0.02
-Nodes (253): eq_unicode(), like_unicode(), MySQL 字符串比较/模糊匹配时统一排序规则,避免 Illegal mix of collations。, 跨表字符串等值比较(JOIN / WHERE)时统一为 utf8mb4_unicode_ci。, 将列显式设为 utf8mb4_unicode_ci。, unicode_ci(), build_void_type_label_map(), format_protocol_status_label() (+245 more)
+Nodes (241): eq_unicode(), like_unicode(), MySQL 字符串比较/模糊匹配时统一排序规则,避免 Illegal mix of collations。, 跨表字符串等值比较(JOIN / WHERE)时统一为 utf8mb4_unicode_ci。, 将列显式设为 utf8mb4_unicode_ci。, unicode_ci(), ApiRequestLogCRUD, delete() (+233 more)
 
 ### Community 6 - "Community 6"
-Cohesion: 0.1
-Nodes (217): 细胞存储 — 采集协议单 / 审核 / 财务确认 / 分期预警 API, 与列表接口一致:按租户 + 角色数据权限判断是否可访问该协议单。, If mother info exists but no customerId, create a customer record and link it., 细胞产品 CRUD(biz_cell_product), 解析任务样本投入物,返回祖先链单段(样本终止节点)。, 管理端手动改状态:允许在合法枚举间任意变更,并同步库位占用。, 去掉末尾 -P{n}-XX 或 -XX,得到代次产品编码的基础前缀。, 查询 `{base_code}-{passage}-XX` 形式产品编码在库中的最大两位序号(无匹配则 0)。 (+209 more)
+Cohesion: 0.02
+Nodes (105): get_designer_data(), _error_json(), 数据库异常:返回 JSON 并保留 CORS 头,避免浏览器只报跨域错误, 未捕获异常:统一 JSON 500,确保跨域场景下仍有 Access-Control-Allow-Origin, sqlalchemy_exception_handler(), unhandled_exception_handler(), BaseHTTPMiddleware, ApiCryptoError (+97 more)
 
 ### Community 7 - "Community 7"
 Cohesion: 0.03
-Nodes (176): batch_discard(), batch_options(), _batch_row_to_dict(), batch_stock_in(), batch_stock_out(), _create_batch_and_usage(), delete_batch(), _discard_batch() (+168 more)
+Nodes (156): _batch_line_to_dict(), cancel_check(), _check_header_to_dict(), complete_check(), create_check(), _get_check(), get_check_detail(), _line_counts() (+148 more)
 
 ### Community 8 - "Community 8"
-Cohesion: 0.02
-Nodes (112): get_designer_data(), _error_json(), 数据库异常:返回 JSON 并保留 CORS 头,避免浏览器只报跨域错误, 未捕获异常:统一 JSON 500,确保跨域场景下仍有 Access-Control-Allow-Origin, sqlalchemy_exception_handler(), unhandled_exception_handler(), BaseHTTPMiddleware, ApiCryptoError (+104 more)
+Cohesion: 0.03
+Nodes (145): list_ethnics_for_select(), apply_data_scope(), get_user_dept_id(), _resolve_user_role_scopes(), _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), get_dept() (+137 more)
 
 ### Community 9 - "Community 9"
-Cohesion: 0.04
-Nodes (124): AccessLogCreateBody, AccessLogUpdateBody, CleanRoomCreateBody, CleanRoomUpdateBody, ExhibitionAppointmentCreateBody, ExhibitionAppointmentUpdateBody, list_storage_slot_stats(), OccupancyCreateBody (+116 more)
+Cohesion: 0.03
+Nodes (146): get_next_cell_product_code(), build_void_type_label_map(), format_protocol_status_label(), resolve_void_type_label(), _ancestor_link_from_cell_product_input(), _ancestor_sample_chain_link(), _apply_cell_product_status_change(), _build_ancestor_chain() (+138 more)
 
 ### Community 10 - "Community 10"
-Cohesion: 0.03
-Nodes (118): get_next_cell_product_code(), _ancestor_link_from_cell_product_input(), _ancestor_sample_chain_link(), _apply_cell_product_status_change(), _build_ancestor_chain(), _build_descendant_chain(), _build_facility_path_label(), build_split_product_codes() (+110 more)
+Cohesion: 0.05
+Nodes (103): AccessLogCreateBody, AccessLogUpdateBody, CleanRoomCreateBody, CleanRoomUpdateBody, ExhibitionAppointmentCreateBody, ExhibitionAppointmentUpdateBody, list_storage_slot_stats(), OccupancyCreateBody (+95 more)
 
 ### Community 11 - "Community 11"
-Cohesion: 0.04
-Nodes (75): _jwt_user_payload(), Web 端登录用 RSA 公钥(PKCS#1 v1.5,与 JSEncrypt 一致), Web 端登录:账号为 sys_user.user_no,密码为 sys_user.password(bcrypt)。, refresh_token(), web_login(), web_login_rsa_public_key(), lifespan(), create_access_token() (+67 more)
+Cohesion: 0.05
+Nodes (73): _avatar_url_field(), _build_current_user_payload(), _build_user_info_payload(), get_current_user_profile(), _jwt_user_payload(), logout(), 公共接口(Web 登录、刷新 Token、登出;用户模型对齐 docs/sql/zkxw.sql 基线), Web 端登录用 RSA 公钥(PKCS#1 v1.5,与 JSEncrypt 一致) (+65 more)
 
 ### Community 12 - "Community 12"
 Cohesion: 0.05
-Nodes (79): batch_delete_research_donations(), change_donation_status(), convert_from_storage(), convert_to_storage(), create_research_donation(), delete_research_donation(), _get_current_user_id(), get_research_donation_detail() (+71 more)
+Nodes (77): api_save_application(), auto_generate_schedules(), complete_application(), create_application(), create_basic_experiment_sale_schedules(), create_infusion_plan(), create_schedule(), _create_schedule_products() (+69 more)
 
 ### Community 13 - "Community 13"
-Cohesion: 0.34
-Nodes (74): BatchStockInBody, BatchStockInItem, BatchStockOutBody, BatchStockOutItem, ConsumableCreateBody, ConsumablePackCreateBody, ConsumablePackUpdateBody, ConsumableUpdateBody (+66 more)
+Cohesion: 0.07
+Nodes (57): _find_latest_published(), list_oa_role_user_ids(), _active_user_id(), AssigneeResolveError, OA 审批人解析(不读 sys_role), 按节点 approverConfig 解析处理人。     assigneeType: users | oa_roles | dept_leader | dir, resolve_assignees(), resolve_dept_leader() (+49 more)
 
 ### Community 14 - "Community 14"
-Cohesion: 0.06
-Nodes (61): complete_application(), create_basic_experiment_sale_schedules(), create_infusion_plan(), create_schedule(), _create_schedule_products(), _format_yyyy_mm_dd(), _generate_application_no(), get_application() (+53 more)
+Cohesion: 0.45
+Nodes (69): BatchStockInBody, BatchStockInItem, BatchStockOutBody, BatchStockOutItem, ConsumableCreateBody, ConsumablePackCreateBody, ConsumablePackUpdateBody, ConsumableUpdateBody (+61 more)
 
 ### Community 15 - "Community 15"
-Cohesion: 0.11
-Nodes (35): batch_create_sterilize_logs(), batch_create_wash_logs(), batch_discard_garments(), batch_soft_delete_garments(), _count_map(), create_garment(), create_sterilize_log(), create_wash_log() (+27 more)
+Cohesion: 0.07
+Nodes (52): map_payments_by_schedule_ids(), _fmt_dt(), get_handover_by_schedule(), get_outbound_handover(), get_outbound_handover_view(), _handover_row_to_dict(), _handover_view_dict(), _parse_handover_time() (+44 more)
 
 ### Community 16 - "Community 16"
 Cohesion: 0.12
-Nodes (10): get_wechat_pay_client(), get_wechat_pay_v2(), 微信支付工具模块  支持微信支付 V3 API 文档参考: https://pay.weixin.qq.com/docs/v3/apis/index.ht, 统一下单接口 (V3)          Args:             out_trade_no: 商户订单号             total, 小程序调起支付的二次签名参数(与公众号 JSAPI 规则一致), 统一下单 (V2 API)          Args:             out_trade_no: 商户订单号             tot, 生成签名 V3 (SHA256 with RSA), wechat_pay() (+2 more)
+Nodes (11): get_wechat_pay_client(), get_wechat_pay_v2(), 微信支付工具模块  支持微信支付 V3 API 文档参考: https://pay.weixin.qq.com/docs/v3/apis/index.ht, 统一下单接口 (V3)          Args:             out_trade_no: 商户订单号             total, 申请退款          Args:             out_trade_no: 商户订单号             total_amount, 小程序调起支付的二次签名参数(与公众号 JSAPI 规则一致), 统一下单 (V2 API)          Args:             out_trade_no: 商户订单号             tot, 生成签名 V3 (SHA256 with RSA) (+3 more)
 
 ### Community 17 - "Community 17"
-Cohesion: 0.2
-Nodes (19): _code_exists(), create_material(), _dec(), _fmt_dt(), get_material(), get_material_entity(), get_my_usages(), _is_enabled_status() (+11 more)
+Cohesion: 0.16
+Nodes (22): _code_exists(), create_material(), _dec(), _fmt_dt(), get_material(), get_material_entity(), get_my_usages(), _is_enabled_status() (+14 more)
 
 ### Community 18 - "Community 18"
-Cohesion: 0.27
-Nodes (12): create_equipment(), _dec(), equipment_code_exists(), equipment_is_referenced(), get_equipment(), list_equipments(), _norm_status(), _parse_date() (+4 more)
+Cohesion: 0.21
+Nodes (19): _consumable_row_to_dict(), create_process(), _create_sub_consumable(), _create_sub_data_collection(), _create_sub_output(), _create_sub_reagent(), _data_collection_row_to_dict(), get_process() (+11 more)
 
 ### Community 19 - "Community 19"
-Cohesion: 0.26
-Nodes (12): batch_issue_sample_codes(), batch_revoke_sample_codes(), create_sample_code(), get_sample_code(), list_sample_codes(), _parse_issued_time(), 样本编码池 CRUD(biz_sample_code), _resolve_issued_user_display_name() (+4 more)
+Cohesion: 0.23
+Nodes (17): _apply_qc_status_filter(), _base_query(), _derive_qc_conclusion(), _ensure_notification(), _eq_ci(), _fetch_completed_tasks(), _fmt_dt(), generate_sms_content() (+9 more)
 
 ### Community 20 - "Community 20"
-Cohesion: 0.24
-Nodes (9): 微信消息通知服务  支持微信小程序模板消息推送  使用方式:     from app.core.wechat_message import Wech, 发送模板消息                  Args:             openid: 用户openid             templ, send_delivery_notice(), send_delivery_warning(), send_order_status(), send_payment_success(), send_refund_result(), send_urge_notification() (+1 more)
+Cohesion: 0.27
+Nodes (12): create_equipment(), _dec(), equipment_code_exists(), equipment_is_referenced(), get_equipment(), list_equipments(), _norm_status(), _parse_date() (+4 more)
 
 ### Community 21 - "Community 21"
 Cohesion: 0.24
-Nodes (11): deduct_for_step(), _display_remark(), list_stock_logs(), _parse_receiver_purpose_from_remark(), 试剂变动记录 CRUD(biz_reagent_stock_log), 撤销步骤此前 step_save 扣减,便于重新填报。, 扣减试剂库存并生成变动记录。调用方控制事务,本函数不 commit。, _resolve_receiver_purpose() (+3 more)
+Nodes (9): 微信消息通知服务  支持微信小程序模板消息推送  使用方式:     from app.core.wechat_message import Wech, 发送模板消息                  Args:             openid: 用户openid             templ, send_delivery_notice(), send_delivery_warning(), send_order_status(), send_payment_success(), send_refund_result(), send_urge_notification() (+1 more)
 
 ### Community 22 - "Community 22"
-Cohesion: 0.32
-Nodes (11): create_env_detect_record(), _generate_record_no(), get_env_detect_record(), _join_csv(), list_env_detect_records(), _resolve_inspector_snapshots(), _resolve_item_snapshot(), _row_to_dict() (+3 more)
+Cohesion: 0.24
+Nodes (11): deduct_for_step(), _display_remark(), list_stock_logs(), _parse_receiver_purpose_from_remark(), 试剂变动记录 CRUD(biz_reagent_stock_log), 撤销步骤此前 step_save 扣减,便于重新填报。, 扣减试剂库存并生成变动记录。调用方控制事务,本函数不 commit。, _resolve_receiver_purpose() (+3 more)
 
 ### Community 23 - "Community 23"
 Cohesion: 0.24
 Nodes (11): deduct_for_step(), _display_remark(), list_stock_logs(), _parse_receiver_purpose_from_remark(), 耗材变动记录 CRUD(biz_consumable_stock_log), 撤销步骤此前 step_save 扣减,便于重新填报。, 扣减耗材库存并生成变动记录。调用方控制事务,本函数不 commit。, _resolve_receiver_purpose() (+3 more)
 
 ### Community 24 - "Community 24"
-Cohesion: 0.27
-Nodes (11): _build_tree(), _cascade_soft_delete(), _collect_with_ancestors(), create_dept(), get_dept(), list_depts(), list_depts_tree(), 保留匹配节点及其全部上级,供关键词检索后仍能正确组树。 (+3 more)
+Cohesion: 0.47
+Nodes (8): count_fillable_fields(), _extract_rules(), _node_type(), validate_control_types(), validate_draft_for_publish(), validate_flow_tree(), validate_oa_roles_referenced(), _walk_form_rules()
 
 ### Community 25 - "Community 25"
 Cohesion: 0.29
-Nodes (9): _build_tree(), _cascade_soft_delete(), create_menu(), get_menu(), list_menus(), list_menus_tree(), _row_to_dict(), soft_delete_menu() (+1 more)
-
-### Community 26 - "Community 26"
-Cohesion: 0.27
-Nodes (8): create_customer(), get_customer(), id_card_taken(), list_customers(), 客户 CRUD(biz_customer), _row_to_dict(), soft_delete_customer(), update_customer()
-
-### Community 27 - "Community 27"
-Cohesion: 0.31
-Nodes (8): create_express_company(), express_code_exists(), get_express_company(), list_express_companies(), 快递公司 CRUD(biz_express_company), _row_to_dict(), soft_delete_express_company(), update_express_company()
-
-### Community 28 - "Community 28"
-Cohesion: 0.38
-Nodes (9): create_check_item(), get_check_item(), item_code_exists(), list_active_check_items(), list_check_items(), _order_query(), _row_to_dict(), soft_delete_check_item() (+1 more)
-
-### Community 29 - "Community 29"
-Cohesion: 0.38
-Nodes (9): create_env_detect_item(), get_env_detect_item(), item_code_exists(), list_active_env_detect_items(), list_env_detect_items(), _order_query(), _row_to_dict(), soft_delete_env_detect_item() (+1 more)
-
-### Community 30 - "Community 30"
-Cohesion: 0.31
-Nodes (8): category_code_exists(), create_process_category(), get_process_category(), list_process_categories(), 工艺工序分类 CRUD(biz_process_category), _row_to_dict(), soft_delete_process_category(), update_process_category()
-
-### Community 31 - "Community 31"
-Cohesion: 0.31
-Nodes (8): create_item_unit(), get_item_unit(), list_item_units(), 物品单位 CRUD(biz_item_unit), _row_to_dict(), soft_delete_item_unit(), unit_code_exists(), update_item_unit()
-
-### Community 32 - "Community 32"
-Cohesion: 0.31
-Nodes (8): create_sop_document(), get_sop_document(), list_sop_documents(), SOP文档 CRUD(biz_sop_document), _row_to_dict(), soft_delete_sop_document(), sop_code_exists(), update_sop_document()
-
-### Community 33 - "Community 33"
-Cohesion: 0.31
-Nodes (8): create_cell_sample_type(), get_cell_sample_type(), list_cell_sample_types(), 细胞样本类型 CRUD(biz_cell_sample_type), _row_to_dict(), soft_delete_cell_sample_type(), type_code_exists(), update_cell_sample_type()
-
-### Community 34 - "Community 34"
-Cohesion: 0.31
-Nodes (8): create_output_type(), get_output_type(), list_output_types(), 工艺产出物类型 CRUD(biz_output_type), _row_to_dict(), soft_delete_output_type(), type_code_exists(), update_output_type()
-
-### Community 35 - "Community 35"
-Cohesion: 0.36
-Nodes (7): create_post(), get_post(), list_posts(), post_code_exists(), _row_to_dict(), soft_delete_post(), update_post()
-
-### Community 36 - "Community 36"
-Cohesion: 0.36
-Nodes (7): create_tenant(), get_tenant(), list_tenants(), _row_to_dict(), soft_delete_tenant(), tenant_no_exists(), update_tenant()
-
-### Community 37 - "Community 37"
-Cohesion: 0.36
-Nodes (7): create_site(), get_site(), list_sites(), _row_to_dict(), site_code_exists(), soft_delete_site(), update_site()
-
-### Community 38 - "Community 38"
-Cohesion: 0.29
 Nodes (2): BaseModel, SoftDeleteModel
 
-### Community 39 - "Community 39"
+### Community 26 - "Community 26"
 Cohesion: 0.38
 Nodes (6): derive_legacy_status_from_three(), derive_three_status_from_legacy(), 阶段A兼容:从旧 status 推导三字段。     约束:旧 status 本身混合了支付/配送/订单生命周期,因此只能尽力推断;     若业务侧已有更精确, 阶段A兼容:从三字段反推旧 status(用于旧前端/旧筛选参数兼容)。, ThreeStatus, _to_decimal()
 
-### Community 40 - "Community 40"
+### Community 27 - "Community 27"
 Cohesion: 0.5
 Nodes (3): BaseSettings, Config, Settings
 
-### Community 41 - "Community 41"
+### Community 28 - "Community 28"
 Cohesion: 0.5
 Nodes (2): _auto_fill_create_dept_id(), ORM before_insert 钩子:当 create_dept_id 为空时,自动从请求上下文填充当前用户部门 ID
 
-### Community 42 - "Community 42"
+### Community 29 - "Community 29"
 Cohesion: 0.67
 Nodes (2): get_menu_list(), 运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,5 个一级菜单分组)
 
-### Community 43 - "Community 43"
+### Community 30 - "Community 30"
 Cohesion: 1.0
 Nodes (1): 质检物料金额查看授权:专用角色与菜单权限常量。
 
-### Community 44 - "Community 44"
+### Community 31 - "Community 31"
 Cohesion: 1.0
 Nodes (1): 请求级别的用户上下文变量  通过 contextvars 在请求处理链路中传递当前用户信息, 供 SQLAlchemy 事件监听器等底层机制使用,避免逐层手动传
 
-### Community 45 - "Community 45"
+### Community 32 - "Community 32"
 Cohesion: 1.0
 Nodes (1): API 路由包(骨架:公共鉴权 + 静态菜单 + 运营端占位)
 
-### Community 48 - "Community 48"
+### Community 35 - "Community 35"
 Cohesion: 1.0
 Nodes (1): 发送订单状态通知                  Args:             openid: 用户openid             ord
 
-### Community 49 - "Community 49"
+### Community 36 - "Community 36"
 Cohesion: 1.0
 Nodes (1): 发送支付成功通知                  Args:             openid: 用户openid             ord
 
-### Community 50 - "Community 50"
+### Community 37 - "Community 37"
 Cohesion: 1.0
 Nodes (1): 发送配送通知                  Args:             openid: 配送员openid             task
 
-### Community 51 - "Community 51"
+### Community 38 - "Community 38"
 Cohesion: 1.0
 Nodes (1): 发送配送时效预警                  Args:             openid: 配送员openid             ta
 
-### Community 52 - "Community 52"
+### Community 39 - "Community 39"
 Cohesion: 1.0
 Nodes (1): 发送退款结果通知                  Args:             openid: 用户openid             ord
 
-### Community 53 - "Community 53"
+### Community 40 - "Community 40"
 Cohesion: 1.0
 Nodes (1): 发送催单通知给配送员                  Args:             deliver_openid: 配送员openid
 
 ## Knowledge Gaps
-- **131 isolated node(s):** `刷新会话 TTL(refreshToken 续期;已登录用户每次 API 校验通过后滑动续期)`, `写入 refreshToken(用于 one-time 使用/吊销)`, `根据 token 获取当前用户(包含 Redis 会话校验;会话滑动续期)`, `登录凭据 RSA 解密(与前端 JSEncrypt PKCS#1 v1.5 兼容)。`, `加载 RSA 密钥对:优先环境变量,否则使用内置固定默认密钥。` (+126 more)
+- **134 isolated node(s):** `刷新会话 TTL(refreshToken 续期;已登录用户每次 API 校验通过后滑动续期)`, `写入 refreshToken(用于 one-time 使用/吊销)`, `根据 token 获取当前用户(包含 Redis 会话校验;会话滑动续期)`, `登录凭据 RSA 解密(与前端 JSEncrypt PKCS#1 v1.5 兼容)。`, `加载 RSA 密钥对:优先环境变量,否则使用内置固定默认密钥。` (+129 more)
   These have ≤1 connection - possible missing edges or undocumented components.
-- **Thin community `Community 38`** (8 nodes): `BaseModel`, `.to_dict()`, `get_active()`, `base.py`, `SoftDeleteModel`, `.restore()`, `.soft_delete()`, `__tablename__()`
+- **Thin community `Community 25`** (8 nodes): `BaseModel`, `.to_dict()`, `get_active()`, `base.py`, `SoftDeleteModel`, `.restore()`, `.soft_delete()`, `__tablename__()`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 41`** (4 nodes): `_auto_fill_create_dept_id()`, `get_db()`, `database.py`, `ORM before_insert 钩子:当 create_dept_id 为空时,自动从请求上下文填充当前用户部门 ID`
+- **Thin community `Community 28`** (4 nodes): `_auto_fill_create_dept_id()`, `get_db()`, `database.py`, `ORM before_insert 钩子:当 create_dept_id 为空时,自动从请求上下文填充当前用户部门 ID`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 42`** (3 nodes): `get_menu_list()`, `menu.py`, `运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,5 个一级菜单分组)`
+- **Thin community `Community 29`** (3 nodes): `get_menu_list()`, `menu.py`, `运营端菜单接口(与 web-admin 前端静态路由 sqxp.ts 对齐,5 个一级菜单分组)`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 43`** (2 nodes): `qc_material_amount_auth_constants.py`, `质检物料金额查看授权:专用角色与菜单权限常量。`
+- **Thin community `Community 30`** (2 nodes): `qc_material_amount_auth_constants.py`, `质检物料金额查看授权:专用角色与菜单权限常量。`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 44`** (2 nodes): `context.py`, `请求级别的用户上下文变量  通过 contextvars 在请求处理链路中传递当前用户信息, 供 SQLAlchemy 事件监听器等底层机制使用,避免逐层手动传`
+- **Thin community `Community 31`** (2 nodes): `context.py`, `请求级别的用户上下文变量  通过 contextvars 在请求处理链路中传递当前用户信息, 供 SQLAlchemy 事件监听器等底层机制使用,避免逐层手动传`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 45`** (2 nodes): `__init__.py`, `API 路由包(骨架:公共鉴权 + 静态菜单 + 运营端占位)`
+- **Thin community `Community 32`** (2 nodes): `__init__.py`, `API 路由包(骨架:公共鉴权 + 静态菜单 + 运营端占位)`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 48`** (1 nodes): `发送订单状态通知                  Args:             openid: 用户openid             ord`
+- **Thin community `Community 35`** (1 nodes): `发送订单状态通知                  Args:             openid: 用户openid             ord`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 49`** (1 nodes): `发送支付成功通知                  Args:             openid: 用户openid             ord`
+- **Thin community `Community 36`** (1 nodes): `发送支付成功通知                  Args:             openid: 用户openid             ord`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 50`** (1 nodes): `发送配送通知                  Args:             openid: 配送员openid             task`
+- **Thin community `Community 37`** (1 nodes): `发送配送通知                  Args:             openid: 配送员openid             task`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 51`** (1 nodes): `发送配送时效预警                  Args:             openid: 配送员openid             ta`
+- **Thin community `Community 38`** (1 nodes): `发送配送时效预警                  Args:             openid: 配送员openid             ta`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 52`** (1 nodes): `发送退款结果通知                  Args:             openid: 用户openid             ord`
+- **Thin community `Community 39`** (1 nodes): `发送退款结果通知                  Args:             openid: 用户openid             ord`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 53`** (1 nodes): `发送催单通知给配送员                  Args:             deliver_openid: 配送员openid`
+- **Thin community `Community 40`** (1 nodes): `发送催单通知给配送员                  Args:             deliver_openid: 配送员openid`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
 
 ## Suggested Questions
 _Questions this graph is uniquely positioned to answer:_
 
-- **Why does `SysUser` connect `Community 1` to `Community 2`, `Community 3`, `Community 5`, `Community 6`, `Community 7`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 19`, `Community 21`, `Community 23`?**
-  _High betweenness centrality (0.119) - this node is a cross-community bridge._
-- **Why does `generate_uuid()` connect `Community 4` to `Community 0`, `Community 1`, `Community 2`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 15`, `Community 17`, `Community 18`, `Community 19`, `Community 21`, `Community 22`, `Community 23`, `Community 24`, `Community 25`, `Community 26`, `Community 27`, `Community 28`, `Community 29`, `Community 30`, `Community 31`, `Community 32`, `Community 33`, `Community 34`, `Community 35`, `Community 36`, `Community 37`?**
-  _High betweenness centrality (0.082) - this node is a cross-community bridge._
-- **Why does `success_response()` connect `Community 0` to `Community 1`, `Community 2`, `Community 8`, `Community 9`, `Community 42`, `Community 11`, `Community 12`, `Community 10`?**
-  _High betweenness centrality (0.057) - this node is a cross-community bridge._
-- **Are the 746 inferred relationships involving `str` (e.g. with `unhandled_exception_handler()` and `get_current_user_by_token()`) actually correct?**
-  _`str` has 746 INFERRED edges - model-reasoned connections that need verification._
-- **Are the 676 inferred relationships involving `success_response()` (e.g. with `list_storage_release_reviews()` and `get_storage_release_review_detail()`) actually correct?**
-  _`success_response()` has 676 INFERRED edges - model-reasoned connections that need verification._
-- **Are the 560 inferred relationships involving `error_response()` (e.g. with `_json_error_response()` and `list_storage_release_reviews()`) actually correct?**
-  _`error_response()` has 560 INFERRED edges - model-reasoned connections that need verification._
-- **Are the 504 inferred relationships involving `SysUser` (e.g. with `数据权限过滤(V0.3:基于角色 data_scope 的查询级行级过滤)  data_scope 值:   1 = 全部数据   2 = 本部门数据   3` and `从 SysUser 读取用户的 dept_id。`) actually correct?**
-  _`SysUser` has 504 INFERRED edges - model-reasoned connections that need verification._
+- **Why does `SysUser` connect `Community 2` to `Community 0`, `Community 1`, `Community 3`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 13`, `Community 14`, `Community 15`, `Community 17`, `Community 22`, `Community 23`?**
+  _High betweenness centrality (0.126) - this node is a cross-community bridge._
+- **Why does `success_response()` connect `Community 0` to `Community 2`, `Community 4`, `Community 6`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 29`?**
+  _High betweenness centrality (0.051) - this node is a cross-community bridge._
+- **Why does `generate_uuid()` connect `Community 1` to `Community 0`, `Community 2`, `Community 4`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 13`, `Community 15`, `Community 17`, `Community 18`, `Community 19`, `Community 20`, `Community 22`, `Community 23`?**
+  _High betweenness centrality (0.029) - this node is a cross-community bridge._
+- **Are the 776 inferred relationships involving `str` (e.g. with `unhandled_exception_handler()` and `get_current_user_by_token()`) actually correct?**
+  _`str` has 776 INFERRED edges - model-reasoned connections that need verification._
+- **Are the 706 inferred relationships involving `success_response()` (e.g. with `list_storage_release_reviews()` and `get_storage_release_review_detail()`) actually correct?**
+  _`success_response()` has 706 INFERRED edges - model-reasoned connections that need verification._
+- **Are the 585 inferred relationships involving `error_response()` (e.g. with `_json_error_response()` and `list_storage_release_reviews()`) actually correct?**
+  _`error_response()` has 585 INFERRED edges - model-reasoned connections that need verification._
+- **Are the 531 inferred relationships involving `SysUser` (e.g. with `数据权限过滤(V0.3:基于角色 data_scope 的查询级行级过滤)  data_scope 值:   1 = 全部数据   2 = 本部门数据   3` and `从 SysUser 读取用户的 dept_id。`) actually correct?**
+  _`SysUser` has 531 INFERRED edges - model-reasoned connections that need verification._

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
backend/graphify-out/graph.html


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 114 - 114
backend/graphify-out/graph.json


+ 13 - 7
backend/graphify-out/manifest.json

@@ -1,6 +1,6 @@
 {
   "/Users/wuzilong/work/00code/zkxw/backend/app/__init__.py": 1778578257.989357,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/main.py": 1782719013.8957272,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/main.py": 1784018479.717831,
   "/Users/wuzilong/work/00code/zkxw/backend/app/tasks/__init__.py": 1778579841.437791,
   "/Users/wuzilong/work/00code/zkxw/backend/app/core/auth.py": 1782122636.871432,
   "/Users/wuzilong/work/00code/zkxw/backend/app/core/api_crypto.py": 1778578258.039314,
@@ -31,7 +31,7 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/models/material.py": 1782894693.6389399,
   "/Users/wuzilong/work/00code/zkxw/backend/app/models/production_material.py": 1782404882.9262497,
   "/Users/wuzilong/work/00code/zkxw/backend/app/models/qc_param.py": 1782379593.174925,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py": 1783920040.737089,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/models/models.py": 1784098244.5500228,
   "/Users/wuzilong/work/00code/zkxw/backend/app/models/cleanroom_garment.py": 1781347080.6165943,
   "/Users/wuzilong/work/00code/zkxw/backend/app/models/__init__.py": 1781344070.5899634,
   "/Users/wuzilong/work/00code/zkxw/backend/app/models/research_donation.py": 1783920516.0199852,
@@ -87,7 +87,7 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/post.py": 1779265648.38155,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/sample_reception_check_result.py": 1779255909.8554008,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_material_stock_batch.py": 1782404955.550011,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/user.py": 1780539127.1805215,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/user.py": 1784018107.6857984,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/production_work_order.py": 1783305553.0221446,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/material.py": 1781522283.6438622,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/dict_type.py": 1779265621.5212462,
@@ -129,6 +129,7 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_task_assignee.py": 1781233180.3766735,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/research_donation_sample_collection.py": 1782886678.892387,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/qc_material_amount_auth.py": 1783919120.0033576,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/oa_approval.py": 1784098244.5513778,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/cell_product.py": 1782886679.0930216,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/menu.py": 1779265729.0381103,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/collection_region.py": 1782181887.2821388,
@@ -165,7 +166,7 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/cell_sample_type.py": 1781747645.1762104,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/pilot_outbound_status_sync.py": 1781595840.6955194,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/consumable_stock_log.py": 1779515477.284446,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/dept.py": 1779265637.7914758,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/crud/dept.py": 1784018104.4378362,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/base.py": 1778578258.062207,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/protocol_donation_convert.py": 1779161468.6582925,
   "/Users/wuzilong/work/00code/zkxw/backend/app/crud/protocol_sample_collection.py": 1782886678.8686988,
@@ -187,16 +188,17 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/basic_info.py": 1782709076.3968658,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_confirm.py": 1779657043.1389203,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_infusion_schedule_mgmt.py": 1779940938.18027,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/api/__init__.py": 1782719000.5995934,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/api/__init__.py": 1784018479.6819978,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/storage_entry_sms_notification.py": 1780325524.9170487,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_application.py": 1781079904.0516074,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/pre_transit_sample.py": 1782204426.7965167,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/qc_sms_notification.py": 1780326875.7886882,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/research_donation_sample_collection.py": 1780457788.2998126,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/api/oa_approval.py": 1784098244.5513089,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/operations.py": 1782699385.46194,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py": 1783917044.543897,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/api/menu.py": 1784019084.7225814,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/pilot_delivery.py": 1779655584.820777,
-  "/Users/wuzilong/work/00code/zkxw/backend/app/api/admin.py": 1782469068.0578597,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/api/admin.py": 1784018125.3715014,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/env_detect.py": 1782376501.8919773,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/research_donation.py": 1783920522.841086,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/ethnic.py": 1779266243.9511197,
@@ -210,12 +212,16 @@
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/protocol_sample_collection.py": 1780457788.2093296,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/leave.py": 1779266168.8693042,
   "/Users/wuzilong/work/00code/zkxw/backend/app/api/clinical_payment.py": 1781750841.074568,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_engine.py": 1784099764.7237728,
   "/Users/wuzilong/work/00code/zkxw/backend/app/services/workflow_callback.py": 1778727966.7277644,
   "/Users/wuzilong/work/00code/zkxw/backend/app/services/qc_work_order_fee_summary.py": 1783329884.6125586,
   "/Users/wuzilong/work/00code/zkxw/backend/app/services/storage_facility_code.py": 1782289322.2116506,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_publish.py": 1784083474.745629,
   "/Users/wuzilong/work/00code/zkxw/backend/app/services/workflow_engine.py": 1778634664.6293883,
   "/Users/wuzilong/work/00code/zkxw/backend/app/services/web_auth_roles.py": 1782122624.7941194,
   "/Users/wuzilong/work/00code/zkxw/backend/app/services/protocol_payment_installment.py": 1781432208.0765035,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_assignee.py": 1784018431.974365,
   "/Users/wuzilong/work/00code/zkxw/backend/app/services/protocol_pay_mode_switch.py": 1783330423.4238393,
+  "/Users/wuzilong/work/00code/zkxw/backend/app/services/oa_formula.py": 1784018800.5341194,
   "/Users/wuzilong/work/00code/zkxw/backend/app/ws/__init__.py": 1778578258.105995
 }

+ 79 - 19
backend/tests/test_oa_engine.py

@@ -508,7 +508,7 @@ class TestBuildProgress(unittest.TestCase):
             comment_text="不同意",
             resolve_source="users",
         )
-        for status in ("rejected", "completed", "cancelled"):
+        for status in ("rejected", "completed", "cancelled", "returned"):
             inst = MagicMock(
                 status=status,
                 initiator_user_id="u0",
@@ -528,6 +528,66 @@ class TestBuildProgress(unittest.TestCase):
             terminal = [x for x in items if x["kind"] == "terminal"]
             self.assertEqual(len(terminal), 1, f"status={status} should have one terminal")
 
+    def test_progress_returned_has_no_kind_return_node(self):
+        from app.services.oa_engine import build_progress_items
+
+        root = {
+            "id": "s",
+            "type": "start",
+            "child": {
+                "id": "a1",
+                "type": "approval",
+                "name": "审批人",
+                "child": {"id": "e1", "type": "end"},
+            },
+        }
+        ts = datetime(2026, 7, 15, 14, 58, 8)
+        t_approval = MagicMock(
+            id="tA",
+            node_key="a1",
+            node_name="审批人",
+            task_type="approval",
+            status="returned",
+            assignee_user_id="u2",
+            order_num=1,
+            round_no=1,
+            create_time=ts,
+            update_time=ts,
+            comment_text="打回",
+            resolve_source="users",
+        )
+        ret_ev = MagicMock(
+            event_type="return",
+            round_no=1,
+            actor_user_id="u2",
+            create_time=ts,
+            comment_text="打回",
+            node_key="a1",
+            task_id="tA",
+        )
+        inst = MagicMock(
+            status="returned",
+            initiator_user_id="u0",
+            current_round=1,
+            create_time=ts,
+            update_time=ts,
+        )
+        items = build_progress_items(
+            inst=inst,
+            flow_root=root,
+            tasks=[t_approval],
+            name_map={"u0": "发起人", "u2": "审批人"},
+            events=[ret_ev],
+        )
+        self.assertFalse(any(x["kind"] == "return" for x in items))
+        tasks = [x for x in items if x["kind"] == "task"]
+        self.assertEqual(len(tasks), 1)
+        self.assertEqual(tasks[0]["status"], "returned")
+        self.assertEqual(tasks[0]["commentText"], "打回")
+        terminals = [x for x in items if x["kind"] == "terminal"]
+        self.assertEqual(len(terminals), 1)
+        self.assertEqual(terminals[0]["status"], "returned")
+
 
 class TestReturnAndResubmit(unittest.TestCase):
     def setUp(self):
@@ -643,8 +703,8 @@ class TestReturnAndResubmit(unittest.TestCase):
         self.assertIsNotNone(ev)
         self.assertEqual(ev.comment_text, "请补充材料")
 
-    def test_resubmit_starts_new_round(self):
-        from app.services.oa_engine import resubmit_instance, return_task
+    def test_resubmit_raises_deprecated(self):
+        from app.services.oa_engine import OaEngineError, resubmit_instance, return_task
 
         with patch(
             "app.services.oa_engine.get_instance_detail",
@@ -654,13 +714,7 @@ class TestReturnAndResubmit(unittest.TestCase):
                 self.db, "t1", tenant_no="zkxw", user_id="u1", comment="请补充材料"
             )
 
-        fake_task = MagicMock()
-        with patch(
-            "app.services.oa_engine._create_tasks_for_node", return_value=[fake_task]
-        ), patch(
-            "app.services.oa_engine.get_instance_detail",
-            return_value={"id": "i1", "status": "running"},
-        ):
+        with self.assertRaises(OaEngineError) as ctx:
             resubmit_instance(
                 self.db,
                 "i1",
@@ -668,15 +722,21 @@ class TestReturnAndResubmit(unittest.TestCase):
                 user_id="u0",
                 form_data={"x": 1},
             )
-        inst = self.db.query(self.OaInstance).filter_by(id="i1").first()
-        self.assertEqual(inst.status, "running")
-        self.assertEqual(inst.current_round, 2)
-        submit_ev = (
-            self.db.query(self.OaInstanceEvent)
-            .filter_by(instance_id="i1", event_type="submit", round_no=2)
-            .first()
-        )
-        self.assertIsNotNone(submit_ev)
+        self.assertIn("废弃", str(ctx.exception))
+
+    def test_done_list_includes_returned(self):
+        from app.services.oa_engine import list_tasks, return_task
+
+        with patch(
+            "app.services.oa_engine.get_instance_detail",
+            return_value={"id": "i1", "status": "returned"},
+        ):
+            return_task(
+                self.db, "t1", tenant_no="zkxw", user_id="u1", comment="请补充材料"
+            )
+        done = list_tasks(self.db, tenant_no="zkxw", user_id="u1", kind="done")
+        self.assertEqual(len(done), 1)
+        self.assertEqual(done[0]["status"], "returned")
 
 
 if __name__ == "__main__":

+ 64 - 0
docs/superpowers/plans/2026-07-15-oa-return-copy-new-instance.md

@@ -0,0 +1,64 @@
+# OA 打回钉钉化:终态 + 复制开新单 Implementation Plan
+
+> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
+
+**Goal:** 将打回改为本单终态;进度不再出现独立「打回」节点与多轮轴;已处理含打回;已打回/已撤销/已拒绝均可复制表单开新实例(无旧单关联)。
+
+**Architecture:** 引擎侧修正 `list_tasks`/`build_progress_items`,废弃同实例 `resubmit` 与 `source_instance_id` 业务写入;前端统一「复制并重新发起」走 `copyFromInstanceId` 预填后 `start`。
+
+**Tech Stack:** FastAPI / SQLAlchemy / Vue 3 / Element Plus;单测 `backend/tests/test_oa_engine.py`
+
+**Spec:** `docs/superpowers/specs/2026-07-15-oa-return-copy-new-instance-design.md`
+
+---
+
+### Task 1: 后端 — done 含 returned;progress 去重复打回节点;returned 终态收尾
+
+**Files:**
+- Modify: `backend/app/services/oa_engine.py` (`list_tasks`, `build_progress_items`, `return_task` 注释)
+- Modify: `backend/tests/test_oa_engine.py`
+
+- [ ] **Step 1:** `list_tasks` 的 `kind=="done"` 改为 `status.in_(("approved", "rejected", "returned"))`
+
+- [ ] **Step 2:** `build_progress_items`:删除对 `returns_by_round` / `kind=return` 的追加;在终态分支增加 `returned` → `_terminal_item("returned", "已打回", inst)`;轮次循环可保留字段但前端不再标「第 N 轮」(引擎仍可只投当前已有任务)
+
+- [ ] **Step 3:** 单测:
+  - `test_done_list_includes_returned`:任务 status=returned 出现在 done
+  - `test_progress_return_no_duplicate_return_kind`:task returned + return event 时 progress 无 `kind==return`,仅有 task.status=returned,且有 terminal returned
+  - 删除或改写 `test_resubmit_starts_new_round` 为 `test_resubmit_raises_deprecated`
+
+- [ ] **Step 4:** `pytest backend/tests/test_oa_engine.py -q` 通过后 commit
+
+### Task 2: 后端 — 废弃 resubmit;start 不再写关联;详情不回显关联
+
+**Files:**
+- Modify: `backend/app/services/oa_engine.py` (`start_instance`, `get_instance_detail`, `resubmit_instance`)
+- Modify: `backend/app/api/oa_approval.py`(resubmit 路由返回 410/业务错误或保留但引擎抛错)
+
+- [ ] **Step 1:** `resubmit_instance` 改为直接 `raise OaEngineError("同实例再次提交已废弃,请复制表单重新发起")`
+- [ ] **Step 2:** `start_instance` 不再将 `source_instance_id` 写入实例(参数可忽略)
+- [ ] **Step 3:** `get_instance_detail` 不再查/返回有意义的 `resubmittedInstanceId` 关联跳转(置空);`sourceInstanceId` 恒返回空字符串(兼容前端字段)
+- [ ] **Step 4:** 更新测试 + commit
+
+### Task 3: 前端 — 详情/列表/发起页
+
+**Files:**
+- Modify: `web-admin/src/views/oa-approval/instances/detail.vue`
+- Modify: `web-admin/src/views/oa-approval/_placeholder/RuntimeList.vue`
+- Modify: `web-admin/src/views/oa-approval/start/index.vue`
+- Modify: `web-admin/src/api/oaApproval.ts`(可选保留 fetchResubmit 不再使用)
+
+- [ ] **Step 1:** 详情:`returned` 文案「已打回」;三种终态显示「复制并重新发起」→ `start?appId=&copyFromInstanceId=`;去掉同单 resubmit、原单/重提单提示、轮次标题、`kind===return` 标签
+- [ ] **Step 2:** RuntimeList:mine 在 `returned|cancelled|rejected` 显示同一按钮;文案「已打回」;query 用 `copyFromInstanceId`
+- [ ] **Step 3:** start:读 `copyFromInstanceId` 预填 formData;submit **不传** `sourceInstanceId`
+- [ ] **Step 4:** commit
+
+### Task 4: 验收勾选 + 图谱
+
+- [ ] 勾选 spec §7 验收项(实现完成项)
+- [ ] `./scripts/update-graph.sh backend`(若改了 backend)
+- [ ] commit docs if needed
+
+---
+
+**Self-review:** Spec §3–§7 均有对应 Task;无 TBD;`copyFromInstanceId` 命名前后一致。

+ 6 - 6
docs/superpowers/specs/2026-07-15-oa-return-copy-new-instance-design.md

@@ -2,7 +2,7 @@
 
 | 项 | 内容 |
 |----|------|
-| 状态 | 已定稿(待实现) |
+| 状态 | 已定稿;实现已落地(见 `docs/superpowers/plans/2026-07-15-oa-return-copy-new-instance.md`) |
 | 日期 | 2026-07-15 |
 | 范围 | 打回语义、复制再发、审批进度去重、「已处理」列表、废弃同实例多轮与旧单关联 |
 | 权威对齐 | 钉钉:打回 / 撤销 / 拒绝均终结当前审批单;再办 = 复制表单开新实例 |
@@ -122,11 +122,11 @@
 
 ## 7. 验收要点
 
-- [ ] 打回后实例为终态「已打回」,**不能**同单再次提交。  
-- [ ] 打回后进度仅审批人节点显示已打回+意见,**无**独立「打回」节点、**无**「第 N 轮」。  
-- [ ] 审批人「已处理」可见该打回任务。  
-- [ ] 已打回 / 已撤销 / 已拒绝:发起人可「复制并重新发起」,得到新实例且表单已预填;新旧无关联跳转。  
-- [ ] 拒绝与打回按钮/结果文案互不混用。
+- [x] 打回后实例为终态「已打回」,**不能**同单再次提交。  
+- [x] 打回后进度仅审批人节点显示已打回+意见,**无**独立「打回」节点、**无**「第 N 轮」。  
+- [x] 审批人「已处理」可见该打回任务。  
+- [x] 已打回 / 已撤销 / 已拒绝:发起人可「复制并重新发起」,得到新实例且表单已预填;新旧无关联跳转。  
+- [x] 拒绝与打回按钮/结果文案互不混用。
 
 ---
 

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 657 - 425
web-admin/graphify-out/.graphify_analysis.json


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 625 - 296
web-admin/graphify-out/.graphify_extract.json


+ 133 - 138
web-admin/graphify-out/GRAPH_REPORT.md

@@ -1,11 +1,11 @@
-# Graph Report - src  (2026-07-13)
+# Graph Report - src  (2026-07-15)
 
 ## Corpus Check
-- Large corpus: 857 files · ~567,252 words. Semantic extraction will be expensive (many Claude tokens). Consider running on a subfolder, or use --no-semantic to run AST-only.
+- Large corpus: 879 files · ~582,028 words. Semantic extraction will be expensive (many Claude tokens). Consider running on a subfolder, or use --no-semantic to run AST-only.
 
 ## Summary
-- 2879 nodes · 4028 edges · 62 communities detected
-- Extraction: 78% EXTRACTED · 22% INFERRED · 0% AMBIGUOUS · INFERRED: 903 edges (avg confidence: 0.8)
+- 2988 nodes · 4183 edges · 61 communities detected
+- Extraction: 78% EXTRACTED · 22% INFERRED · 0% AMBIGUOUS · INFERRED: 939 edges (avg confidence: 0.8)
 - Token cost: 0 input · 0 output
 
 ## Community Hubs (Navigation)
@@ -47,36 +47,35 @@
 - [[_COMMUNITY_Community 35|Community 35]]
 - [[_COMMUNITY_Community 36|Community 36]]
 - [[_COMMUNITY_Community 37|Community 37]]
-- [[_COMMUNITY_Community 38|Community 38]]
 - [[_COMMUNITY_Community 39|Community 39]]
+- [[_COMMUNITY_Community 40|Community 40]]
 - [[_COMMUNITY_Community 41|Community 41]]
-- [[_COMMUNITY_Community 42|Community 42]]
+- [[_COMMUNITY_Community 43|Community 43]]
 - [[_COMMUNITY_Community 44|Community 44]]
-- [[_COMMUNITY_Community 46|Community 46]]
+- [[_COMMUNITY_Community 47|Community 47]]
 - [[_COMMUNITY_Community 48|Community 48]]
-- [[_COMMUNITY_Community 49|Community 49]]
+- [[_COMMUNITY_Community 50|Community 50]]
 - [[_COMMUNITY_Community 51|Community 51]]
 - [[_COMMUNITY_Community 52|Community 52]]
 - [[_COMMUNITY_Community 53|Community 53]]
 - [[_COMMUNITY_Community 54|Community 54]]
 - [[_COMMUNITY_Community 55|Community 55]]
 - [[_COMMUNITY_Community 56|Community 56]]
-- [[_COMMUNITY_Community 57|Community 57]]
+- [[_COMMUNITY_Community 58|Community 58]]
 - [[_COMMUNITY_Community 59|Community 59]]
-- [[_COMMUNITY_Community 60|Community 60]]
-- [[_COMMUNITY_Community 62|Community 62]]
-- [[_COMMUNITY_Community 67|Community 67]]
+- [[_COMMUNITY_Community 61|Community 61]]
+- [[_COMMUNITY_Community 66|Community 66]]
+- [[_COMMUNITY_Community 68|Community 68]]
 - [[_COMMUNITY_Community 69|Community 69]]
-- [[_COMMUNITY_Community 70|Community 70]]
 - [[_COMMUNITY_Community 78|Community 78]]
 - [[_COMMUNITY_Community 80|Community 80]]
 - [[_COMMUNITY_Community 81|Community 81]]
 
 ## God Nodes (most connected - your core abstractions)
-1. `get()` - 282 edges
-2. `push()` - 78 edges
-3. `WebSocketClient` - 26 edges
-4. `emit()` - 25 edges
+1. `get()` - 292 edges
+2. `push()` - 84 edges
+3. `emit()` - 27 edges
+4. `WebSocketClient` - 26 edges
 5. `set()` - 20 edges
 6. `handleDynamicRoutes()` - 18 edges
 7. `parseProtocolStandardImportText()` - 17 edges
@@ -85,8 +84,6 @@
 10. `TableCache` - 14 edges
 
 ## Surprising Connections (you probably didn't know these)
-- `handleBatchDelete()` --calls--> `withFullscreenLoading()`  [INFERRED]
-  views/basic-info/customer/index.vue → utils/fullscreen-loading.ts
 - `dash()` --calls--> `formatDisplayOrDash()`  [INFERRED]
   components/business/infusion-schedule-outbound-chain-view/index.vue → utils/datetime-display.ts
 - `dash()` --calls--> `formatDisplayOrDash()`  [INFERRED]
@@ -95,242 +92,240 @@
   components/business/clinical-schedule-payment-detail/index.vue → utils/money-format.ts
 - `defaultInstallmentRatios()` --calls--> `push()`  [INFERRED]
   utils/protocol-payment-installment.ts → views/operations/storage-facility/index.vue
+- `calcUnpaidAmountsByRatios()` --calls--> `push()`  [INFERRED]
+  utils/protocol-payment-installment.ts → views/operations/storage-facility/index.vue
 
 ## Communities
 
 ### Community 0 - "Community 0"
 Cohesion: 0.01
-Nodes (151): fetchAccessLogList(), fetchActiveRegions(), fetchCategoryList(), fetchCategoryParameters(), fetchCellProductPriceList(), fetchCellProductSpecList(), fetchCellProductTypeList(), fetchChannelAccount() (+143 more)
+Nodes (171): fetchAccessLogList(), fetchActiveRegions(), fetchCategoryList(), fetchCategoryParameters(), fetchCellProductPriceList(), fetchCellProductSpecList(), fetchCellProductTypeList(), fetchChannelAccount() (+163 more)
 
 ### Community 1 - "Community 1"
-Cohesion: 0.02
-Nodes (107): fetchUploadAttachment(), fetchMyQcTaskList(), fetchQcTaskDetail(), fetchQcTaskList(), FireworkSystem, handleReportUpload(), handleReportUpload(), walk() (+99 more)
+Cohesion: 0.01
+Nodes (129): fetchUploadAttachment(), fetchMyProductionTasks(), fetchMyQcTaskList(), fetchQcTaskDetail(), fetchQcTaskList(), FireworkSystem, handleReportUpload(), handleReportUpload() (+121 more)
 
 ### Community 2 - "Community 2"
 Cohesion: 0.03
-Nodes (86): batchSavePilotCheckup(), deletePilotCheckupActualItem(), fetchCheckupInstitutionList(), fetchCheckupInstitutionPackageDetail(), fetchCheckupInstitutionPackages(), fetchPilotCheckupActualItems(), fetchPilotCheckupDetail(), fetchPilotCheckupList() (+78 more)
+Nodes (83): batchSavePilotCheckup(), deletePilotCheckupActualItem(), fetchCheckupInstitutionList(), fetchCheckupInstitutionPackageDetail(), fetchCheckupInstitutionPackages(), fetchPilotCheckupDetail(), fetchPilotCheckupList(), markPilotCheckupChecked() (+75 more)
 
 ### Community 3 - "Community 3"
 Cohesion: 0.03
-Nodes (61): fetchRoleOptions(), collectIds(), buildInboundBasicSection(), buildInboundCellStorageViewSections(), buildInboundResearchDonationViewSections(), buildReceptionSection(), buildTransportSection(), resolveInboundProtocolStatus() (+53 more)
+Nodes (33): fetchGetMenuList(), ComponentLoader, IframeRouteManager, MenuProcessor, RouteRegistry, RouteTransformer, useAppMode(), useAuth() (+25 more)
 
 ### Community 4 - "Community 4"
-Cohesion: 0.03
-Nodes (63): fetchFullmoonTodoList(), fetchUpdateFullmoonTodoInsurance(), fetchCollectionProtocolAuditList(), fetchCollectionProtocolDetail(), fetchCollectionProtocolList(), fetchCreateProtocolInvoiceRequest(), fetchInvoiceEligiblePayments(), fetchPaymentDetailList() (+55 more)
+Cohesion: 0.04
+Nodes (58): buildInboundBasicSection(), buildInboundCellStorageViewSections(), buildInboundResearchDonationViewSections(), buildReceptionSection(), buildTransportSection(), resolveInboundProtocolStatus(), buildBaseFields(), buildInboundBasicSection() (+50 more)
 
 ### Community 5 - "Community 5"
-Cohesion: 0.03
-Nodes (57): fetchCheckupInstitutionInvoices(), fetchCheckupInstitutionProjects(), fetchCreateCheckupInstitution(), fetchCreateCheckupInstitutionInvoice(), fetchCreateCheckupInstitutionProject(), fetchUpdateCheckupInstitution(), fetchUpdateCheckupInstitutionInvoice(), fetchUpdateCheckupInstitutionProject() (+49 more)
+Cohesion: 0.04
+Nodes (69): formatNowDatetime(), formatTodayDate(), addPaymentDetail(), applyFqPaymentDefaults(), applyPaymentPresetForMode(), createEmptyTransport(), datetimeToYmd(), defaultInstallmentStartDateYmd() (+61 more)
 
 ### Community 6 - "Community 6"
-Cohesion: 0.03
-Nodes (33): fetchGetMenuList(), ComponentLoader, IframeRouteManager, MenuProcessor, RouteRegistry, RouteTransformer, useAppMode(), useAuth() (+25 more)
+Cohesion: 0.02
+Nodes (28): fetchAllConsumablePacks(), fetchAllConsumables(), fetchAllConsumableStockLogs(), fetchAllEquipments(), fetchAllOutputTypes(), fetchAllProcessCategories(), fetchAllProcesses(), fetchAllReagents() (+20 more)
 
 ### Community 7 - "Community 7"
-Cohesion: 0.04
-Nodes (69): formatNowDatetime(), formatTodayDate(), addPaymentDetail(), applyFqPaymentDefaults(), applyPaymentPresetForMode(), createEmptyTransport(), datetimeToYmd(), defaultInstallmentStartDateYmd() (+61 more)
+Cohesion: 0.03
+Nodes (51): fetchOaAppDraft(), fetchOaAppList(), fetchOaFlowPreview(), fetchOaGroupList(), fetchOaInstanceDetail(), fetchOaRoleList(), fetchOaRoleUsers(), fetchOaTasks() (+43 more)
 
 ### Community 8 - "Community 8"
-Cohesion: 0.02
-Nodes (28): fetchAllConsumablePacks(), fetchAllConsumables(), fetchAllConsumableStockLogs(), fetchAllEquipments(), fetchAllOutputTypes(), fetchAllProcessCategories(), fetchAllProcesses(), fetchAllReagents() (+20 more)
+Cohesion: 0.04
+Nodes (50): fetchCheckupInstitutionInvoices(), fetchCheckupInstitutionProjects(), fetchCreateCheckupInstitution(), fetchCreateCheckupInstitutionInvoice(), fetchCreateCheckupInstitutionProject(), fetchUpdateCheckupInstitution(), fetchUpdateCheckupInstitutionInvoice(), fetchUpdateCheckupInstitutionProject() (+42 more)
 
 ### Community 9 - "Community 9"
 Cohesion: 0.04
-Nodes (42): useSettingsHandlers(), useSettingsPanel(), useSettingsState(), RoutePermissionValidator, useCeremony(), useTheme(), if(), collectAllPostBindDeptIds() (+34 more)
+Nodes (49): fetchUserList(), fetchAddTaskStep(), fetchCopyTaskStep(), fetchDeleteTaskStep(), fetchDispatchProductionTaskSteps(), fetchForwardProductionTask(), fetchProductionTaskDetail(), fetchProductionTaskEditorInit() (+41 more)
 
 ### Community 10 - "Community 10"
 Cohesion: 0.04
-Nodes (46): fetchCreateCustomer(), fetchCustomerList(), fetchDeleteCustomer(), fetchUpdateCustomer(), updateInfusionScheduleStatus(), handleDialogClose(), handleAdd(), handleBatchDelete() (+38 more)
+Nodes (39): useSettingsHandlers(), useSettingsPanel(), useSettingsState(), RoutePermissionValidator, useCeremony(), useTheme(), if(), walk() (+31 more)
 
 ### Community 11 - "Community 11"
-Cohesion: 0.05
-Nodes (34): fetchClinicalPaymentDetail(), fetchClinicalPayments(), fetchClinicalReceiptConfirmed(), fetchClinicalReceiptPending(), fetchClinicalRefundConfirmed(), fetchClinicalRefundPending(), fetchOrderAdjusts(), fetchOrderDetail() (+26 more)
+Cohesion: 0.04
+Nodes (44): fetchFullmoonTodoList(), fetchUpdateFullmoonTodoInsurance(), fetchCollectionProtocolAuditList(), fetchCollectionProtocolDetail(), fetchCollectionProtocolList(), fetchCreateProtocolInvoiceRequest(), fetchInvoiceEligiblePayments(), fetchPaymentDetailList() (+36 more)
 
 ### Community 12 - "Community 12"
-Cohesion: 0.06
-Nodes (38): fetchUserList(), fetchAddTaskStep(), fetchCopyTaskStep(), fetchDeleteTaskStep(), fetchDispatchProductionTaskSteps(), fetchForwardProductionTask(), fetchProductionTaskDetail(), fetchProductionTaskEditorInit() (+30 more)
+Cohesion: 0.05
+Nodes (48): fetchEthnicList(), applyDonationBundleToForm(), createEmptyTransport(), ensureEthnicOptionInList(), handleOpenForAdd(), if(), loadEthnicOptions(), normalizeSampleRow() (+40 more)
 
 ### Community 13 - "Community 13"
-Cohesion: 0.08
-Nodes (37): formatDatetimeToMinute(), handleChineseDatetimePaste(), parseChineseDatetimeText(), parseBirthOrder(), parseChineseNumeral(), addSampleHint(), earliestCollectTime(), isMaternalBloodEmpty() (+29 more)
+Cohesion: 0.04
+Nodes (37): fetchCreateMenu(), fetchDeleteMenu(), fetchMenuTree(), fetchUpdateMenu(), fetchCreateEnvDetectItem(), fetchDeleteEnvDetectItem(), fetchEnvDetectItemDetail(), fetchEnvDetectItemList() (+29 more)
 
 ### Community 14 - "Community 14"
-Cohesion: 0.06
-Nodes (22): fetchQcMaterialBatchDetail(), fetchQcMaterialBatchList(), fetchQcMaterialBatchOptions(), fetchQcMaterialList(), fetchQcMaterialOptions(), fetchUpdateQcMaterialBatch(), fetchMarkQcMaterialUsageFullyUsed(), financeAttachmentsToUrlString() (+14 more)
+Cohesion: 0.05
+Nodes (34): fetchClinicalPaymentDetail(), fetchClinicalPayments(), fetchClinicalReceiptConfirmed(), fetchClinicalReceiptPending(), fetchClinicalRefundConfirmed(), fetchClinicalRefundPending(), fetchOrderAdjusts(), fetchOrderDetail() (+26 more)
 
 ### Community 15 - "Community 15"
-Cohesion: 0.06
-Nodes (13): fetchProductionWorkOrderQcInfo(), dash(), fmtMoney(), auditorDisplay(), dash(), ensureUnitsInOptions(), expressName(), formatYm() (+5 more)
+Cohesion: 0.05
+Nodes (33): qcAttachmentFullUrl(), qcDownloadAttachment(), qcPreviewAttachment(), formatHandoverUserLabel(), formatNowDatetime(), fullFileUrl(), handleDownloadAttachment(), handlePreviewAttachment() (+25 more)
 
 ### Community 16 - "Community 16"
-Cohesion: 0.1
-Nodes (2): WebSocketClient, TableCache
+Cohesion: 0.06
+Nodes (22): fetchQcMaterialBatchDetail(), fetchQcMaterialBatchList(), fetchQcMaterialBatchOptions(), fetchQcMaterialList(), fetchQcMaterialOptions(), fetchUpdateQcMaterialBatch(), fetchMarkQcMaterialUsageFullyUsed(), financeAttachmentsToUrlString() (+14 more)
 
 ### Community 17 - "Community 17"
-Cohesion: 0.08
-Nodes (32): toLogin(), base64ToBytes(), bytesToBase64(), decryptJson(), deriveKey(), encryptJson(), fromBase64Url(), hexToBytes() (+24 more)
+Cohesion: 0.1
+Nodes (2): WebSocketClient, TableCache
 
 ### Community 18 - "Community 18"
-Cohesion: 0.09
-Nodes (8): getDefaultLanguage(), checkStorageCompatibility(), StorageConfig, getSystemStorage(), getSysVersion(), StorageKeyManager, StorageCompatibilityManager, validateStorageData()
+Cohesion: 0.08
+Nodes (33): fetchRefreshToken(), toLogin(), base64ToBytes(), bytesToBase64(), decryptJson(), deriveKey(), encryptJson(), fromBase64Url() (+25 more)
 
 ### Community 19 - "Community 19"
-Cohesion: 0.08
-Nodes (20): createEmptySnapshots(), normalizeConfiguredReagents(), normalizeConsumables(), normalizeDataCollections(), normalizeReagents(), normalizeStepOutputs(), serializeAttachments(), serializeEquipmentIds() (+12 more)
+Cohesion: 0.06
+Nodes (11): dash(), fmtMoney(), auditorDisplay(), dash(), ensureUnitsInOptions(), expressName(), formatYm(), formatYmd() (+3 more)
 
 ### Community 20 - "Community 20"
-Cohesion: 0.08
-Nodes (18): fetchProductionReceptionBySampleCode(), fetchProductionReceptionSubmit(), fetchProductionReceptionUpdate(), onUserSelectVisible(), remoteSearchUsers(), buildPayload(), ensureDefaultHandler(), initDialog() (+10 more)
+Cohesion: 0.07
+Nodes (24): fetchMineProductionWorkOrderTabStepCounts(), fetchMineProductionWorkOrderTabStepCountsDeduped(), fetchProductionWorkOrderCellProductOptions(), fetchProductionWorkOrderDetail(), fetchProductionWorkOrderList(), fetchProductionWorkOrderQcDispatchOptions(), fetchProductionWorkOrderQcInfo(), fetchProductionWorkOrderTabStepCounts() (+16 more)
 
 ### Community 21 - "Community 21"
-Cohesion: 0.07
-Nodes (13): handleBlur(), handleFocus(), handleInput(), formatAmount(), formatAmount(), formatProtocolAmount(), formatInvoiceAmount(), fmtMoney() (+5 more)
+Cohesion: 0.09
+Nodes (8): getDefaultLanguage(), checkStorageCompatibility(), StorageConfig, getSystemStorage(), getSysVersion(), StorageKeyManager, StorageCompatibilityManager, validateStorageData()
 
 ### Community 22 - "Community 22"
 Cohesion: 0.07
-Nodes (19): fetchDeleteMaterialBatch(), fetchMaterialBatchList(), fetchMaterialBatchOptions(), fetchMaterialList(), fetchMaterialOptions(), fetchUpdateMaterialBatch(), fetchMaterialUsageList(), fetchMyMaterialUsageList() (+11 more)
+Nodes (14): handleBlur(), handleFocus(), handleInput(), formatAmount(), formatAmount(), formatProtocolAmount(), buildFeeSection(), formatInvoiceAmount() (+6 more)
 
 ### Community 23 - "Community 23"
-Cohesion: 0.09
-Nodes (22): fetchMineProductionWorkOrderTabStepCounts(), fetchMineProductionWorkOrderTabStepCountsDeduped(), fetchProductionWorkOrderCellProductOptions(), fetchProductionWorkOrderDetail(), fetchProductionWorkOrderList(), fetchProductionWorkOrderQcDispatchOptions(), fetchProductionWorkOrderTabStepCounts(), fetchProductionWorkOrderTabStepCountsDeduped() (+14 more)
+Cohesion: 0.08
+Nodes (20): createEmptySnapshots(), normalizeConfiguredReagents(), normalizeConsumables(), normalizeDataCollections(), normalizeReagents(), normalizeStepOutputs(), serializeAttachments(), serializeEquipmentIds() (+12 more)
 
 ### Community 24 - "Community 24"
-Cohesion: 0.09
-Nodes (27): completePilotApplication(), deletePilotApplication(), fetchPilotApplicationList(), startPilotApplication(), voidPilotApplication(), handleBatchComplete(), handleBatchStart(), handleBatchVoid() (+19 more)
+Cohesion: 0.08
+Nodes (18): fetchProductionReceptionBySampleCode(), fetchProductionReceptionSubmit(), fetchProductionReceptionUpdate(), onUserSelectVisible(), remoteSearchUsers(), buildPayload(), ensureDefaultHandler(), initDialog() (+10 more)
 
 ### Community 25 - "Community 25"
-Cohesion: 0.09
-Nodes (21): fetchMyProductionTasks(), buildMineTableRows(), buildPresetTasksMap(), buildWorkOrderFromTasks(), fetchAllMineProductionTasks(), fetchMineTasksByScope(), groupMineTasksByWorkOrder(), keywordMatchesWorkOrder() (+13 more)
+Cohesion: 0.1
+Nodes (28): fetchCreateCustomer(), fetchCustomerList(), fetchDeleteCustomer(), fetchUpdateCustomer(), updateInfusionScheduleStatus(), handleAdd(), handleDelete(), handleDropdownCommand() (+20 more)
 
 ### Community 26 - "Community 26"
-Cohesion: 0.11
-Nodes (21): fetchGetMenuCodes(), fetchGetUserInfo(), fetchLogin(), fetchRefreshToken(), fetchUpdateProfile(), fetchUploadProfileAvatar(), fetchUserInfo(), buildWebEncryptedLoginBody() (+13 more)
+Cohesion: 0.07
+Nodes (19): fetchDeleteMaterialBatch(), fetchMaterialBatchList(), fetchMaterialBatchOptions(), fetchMaterialList(), fetchMaterialOptions(), fetchUpdateMaterialBatch(), fetchMaterialUsageList(), fetchMyMaterialUsageList() (+11 more)
 
 ### Community 27 - "Community 27"
-Cohesion: 0.07
-Nodes (14): fetchSampleSmsNotificationList(), fetchStorageEntrySmsList(), fetchApproveTask(), fetchBusinessAllTasks(), fetchCompletedTasks(), fetchDesignerData(), fetchInstanceDetail(), fetchMyInstances() (+6 more)
+Cohesion: 0.09
+Nodes (27): completePilotApplication(), deletePilotApplication(), fetchPilotApplicationList(), startPilotApplication(), voidPilotApplication(), handleBatchComplete(), handleBatchStart(), handleBatchVoid() (+19 more)
 
 ### Community 28 - "Community 28"
-Cohesion: 0.09
-Nodes (12): fetchMineQcWorkOrderTabUnfinishedCounts(), fetchOutboundQcDetail(), fetchQcWorkOrderDetail(), fetchQcWorkOrderList(), fetchQcWorkOrdersBySample(), fetchQcWorkOrderTabUnfinishedCounts(), reload(), reloadTabCounts() (+4 more)
+Cohesion: 0.12
+Nodes (20): fetchGetMenuCodes(), fetchGetUserInfo(), fetchLogin(), fetchUpdateProfile(), fetchUploadProfileAvatar(), fetchUserInfo(), buildWebEncryptedLoginBody(), defaultAvatarPathByRole() (+12 more)
 
 ### Community 29 - "Community 29"
-Cohesion: 0.18
-Nodes (22): buildPaymentFlowSteps(), dash(), formatAmount(), hasFinanceReceipt(), hasFinanceRefund(), hasReceiptSubmit(), hasRefundSubmit(), receiptSubmitTime() (+14 more)
+Cohesion: 0.09
+Nodes (12): fetchMineQcWorkOrderTabUnfinishedCounts(), fetchOutboundQcDetail(), fetchQcWorkOrderDetail(), fetchQcWorkOrderList(), fetchQcWorkOrdersBySample(), fetchQcWorkOrderTabUnfinishedCounts(), reload(), reloadTabCounts() (+4 more)
 
 ### Community 30 - "Community 30"
-Cohesion: 0.13
-Nodes (19): fetchCreateMenu(), fetchDeleteMenu(), fetchMenuTree(), fetchUpdateMenu(), postorder(), preorder(), applyTreeExpand(), handleAdd() (+11 more)
-
-### Community 31 - "Community 31"
 Cohesion: 0.12
 Nodes (15): addCopyButton(), highlightCode(), insertLineNumbers(), isBlockProcessed(), markBlockAsProcessed(), processBlock(), setupHighlightDirective(), setupRippleDirective() (+7 more)
 
-### Community 32 - "Community 32"
+### Community 31 - "Community 31"
 Cohesion: 0.11
 Nodes (11): fetchOutboundReleaseMaterial(), fetchOutboundReleaseReviewDetail(), fetchOutboundReleaseReviewList(), fetchReleaseReviewList(), handleReset(), handleSearch(), handleToggleSelect(), loadData() (+3 more)
 
-### Community 33 - "Community 33"
+### Community 32 - "Community 32"
 Cohesion: 0.13
 Nodes (18): fetchCellSampleTypeList(), fetchCreateCellSampleType(), fetchDeleteCellSampleType(), fetchUpdateCellSampleType(), handleAdd(), handleDelete(), handleDropdownCommand(), handleEdit() (+10 more)
 
-### Community 34 - "Community 34"
+### Community 33 - "Community 33"
 Cohesion: 0.19
 Nodes (15): fetchAttachmentDownloadUrl(), attachmentFullUrl(), ensureUniqueZipEntryName(), fetchAttachmentBlob(), getAttachmentExtension(), resolveAttachmentFileName(), sanitizeZipPathSegment(), applyInboundLabStorageCodePrefix() (+7 more)
 
-### Community 35 - "Community 35"
-Cohesion: 0.16
-Nodes (14): fetchCreateEnvDetectItem(), fetchDeleteEnvDetectItem(), fetchEnvDetectItemDetail(), fetchEnvDetectItemList(), fetchEnvDetectItemsActive(), fetchUpdateEnvDetectItem(), handleAdd(), handleBatchDelete() (+6 more)
-
-### Community 36 - "Community 36"
-Cohesion: 0.13
-Nodes (11): fetchEthnicList(), applyDonationBundleToForm(), createEmptyTransport(), ensureEthnicOptionInList(), handleOpenForAdd(), if(), loadEthnicOptions(), normalizeSampleRow() (+3 more)
-
-### Community 37 - "Community 37"
+### Community 34 - "Community 34"
 Cohesion: 0.16
 Nodes (10): useTable(), useTableImpl(), getColumnChecks(), useTableColumns(), createErrorHandler(), createSmartDebounce(), defaultResponseAdapter(), extractPagination() (+2 more)
 
-### Community 38 - "Community 38"
+### Community 35 - "Community 35"
 Cohesion: 0.27
 Nodes (14): useChart(), useChartComponent(), useChartOps(), colourBlend(), getCssVar(), getDarkColor(), getLightColor(), handleElementThemeColor() (+6 more)
 
-### Community 39 - "Community 39"
+### Community 36 - "Community 36"
+Cohesion: 0.33
+Nodes (13): buildProtocolPaymentFlowSteps(), dash(), financeReceiptTime(), formatAmount(), hasFinanceReceipt(), hasFinanceRefund(), hasReceiptSubmit(), hasRefundSubmit() (+5 more)
+
+### Community 37 - "Community 37"
 Cohesion: 0.19
 Nodes (6): fetchServiceOrderTxnList(), handleReset(), handleSearch(), handleTabChange(), loadData(), switchTab()
 
-### Community 41 - "Community 41"
+### Community 39 - "Community 39"
+Cohesion: 0.42
+Nodes (9): buildPaymentFlowSteps(), dash(), formatAmount(), hasFinanceReceipt(), hasFinanceRefund(), hasReceiptSubmit(), hasRefundSubmit(), receiptSubmitTime() (+1 more)
+
+### Community 40 - "Community 40"
 Cohesion: 0.24
 Nodes (4): addMaterialRow(), nextMaterialRowKey(), onRequisitionSelect(), removeMaterialRow()
 
-### Community 42 - "Community 42"
+### Community 41 - "Community 41"
 Cohesion: 0.25
 Nodes (2): handleTouchEnd(), setTransition()
 
-### Community 44 - "Community 44"
+### Community 43 - "Community 43"
 Cohesion: 0.31
 Nodes (4): annotateForkEdges(), chainApiToElements(), walkAncestorBranch(), walkAncestorParents()
 
-### Community 46 - "Community 46"
+### Community 44 - "Community 44"
 Cohesion: 0.28
 Nodes (4): fetchMyProductionMaterialConsumptions(), handleReset(), handleSearch(), loadData()
 
-### Community 48 - "Community 48"
+### Community 47 - "Community 47"
 Cohesion: 0.39
 Nodes (6): isIgnorableScriptError(), normalizeErrorMessage(), registerPromiseErrorHandler(), registerResourceErrorHandler(), scriptErrorHandler(), setupErrorHandle()
 
-### Community 49 - "Community 49"
+### Community 48 - "Community 48"
 Cohesion: 0.36
 Nodes (1): TableHeightCalculator
 
-### Community 51 - "Community 51"
+### Community 50 - "Community 50"
 Cohesion: 0.33
 Nodes (2): logApiCryptoBootInfo(), maskSecret()
 
-### Community 52 - "Community 52"
+### Community 51 - "Community 51"
 Cohesion: 0.38
 Nodes (4): handleFocus(), handleInput(), parseDecimalToNumber(), sanitizeDecimalInput()
 
-### Community 53 - "Community 53"
+### Community 52 - "Community 52"
 Cohesion: 0.29
 Nodes (2): fetchLeaveDetail(), fetchLeaveList()
 
-### Community 54 - "Community 54"
+### Community 53 - "Community 53"
 Cohesion: 0.4
 Nodes (2): isUnfinishedQcWorkOrder(), resolveQcWorkOrderUnfinishedBadgeCount()
 
-### Community 55 - "Community 55"
+### Community 54 - "Community 54"
 Cohesion: 0.47
 Nodes (3): isPaymentDueWithinWarnWindow(), parsePaymentDueYmd(), startOfLocalDay()
 
-### Community 56 - "Community 56"
+### Community 55 - "Community 55"
 Cohesion: 0.5
 Nodes (2): formatProtocolDocDeleteConfirm(), formatProtocolDocSubject()
 
-### Community 57 - "Community 57"
+### Community 56 - "Community 56"
 Cohesion: 0.5
 Nodes (2): parseEquipmentIds(), syncEquipmentNamesFromOptions()
 
-### Community 59 - "Community 59"
+### Community 58 - "Community 58"
 Cohesion: 0.5
 Nodes (2): focusInput(), handleKeydown()
 
-### Community 60 - "Community 60"
-Cohesion: 0.4
-Nodes (1): fetchQcMaterialAmountAuthUsers()
+### Community 59 - "Community 59"
+Cohesion: 0.5
+Nodes (2): installOaFormComponents(), registerOaFormCreateComponents()
 
-### Community 62 - "Community 62"
+### Community 61 - "Community 61"
 Cohesion: 0.67
 Nodes (2): if(), logSidebarMenu()
 
-### Community 67 - "Community 67"
+### Community 66 - "Community 66"
 Cohesion: 1.0
 Nodes (2): getSettingDefaults(), resetToDefaults()
 
-### Community 69 - "Community 69"
+### Community 68 - "Community 68"
 Cohesion: 1.0
 Nodes (2): copyTextToClipboard(), copyTextWithFallback()
 
-### Community 70 - "Community 70"
+### Community 69 - "Community 69"
 Cohesion: 1.0
 Nodes (2): getSourceProtocolAttachment(), normalizeAttachmentFiles()
 
@@ -347,33 +342,33 @@ Cohesion: 1.0
 Nodes (2): emptyTabCounts(), useQcWorkOrderTabUnfinishedCounts()
 
 ## Knowledge Gaps
-- **Thin community `Community 16`** (42 nodes): `WebSocketClient`, `.calculateReconnectDelay()`, `.clearAllTimers()`, `.clearConnectionTimers()`, `.clearTimer()`, `.close()`, `.closeCurrentSocketForReconnect()`, `.connect()`, `.connectionStatusText()`, `.constructor()`, `.destroyInstance()`, `.flushMessageQueue()`, `.getInstance()`, `.getReadyStateText()`, `.handleClose()`, `.handleConnectionTimeout()`, `.handleError()`, `.handleMessage()`, `.handleOpen()`, `.init()`, `.isWebSocketConnected()`, `.reconnect()`, `.resetHeartbeat()`, `.send()`, `.startHeartbeat()`, `.startPing()`, `TableCache`, `.cleanupExpired()`, `.clear()`, `.clearByTags()`, `.clearCurrentSearch()`, `.clearPagination()`, `.constructor()`, `.evictLRU()`, `.generateKey()`, `.generateTags()`, `.get()`, `.getStats()`, `.log()`, `.set()`, `index.ts`, `tableCache.ts`
+- **Thin community `Community 17`** (42 nodes): `WebSocketClient`, `.calculateReconnectDelay()`, `.clearAllTimers()`, `.clearConnectionTimers()`, `.clearTimer()`, `.close()`, `.closeCurrentSocketForReconnect()`, `.connect()`, `.connectionStatusText()`, `.constructor()`, `.destroyInstance()`, `.flushMessageQueue()`, `.getInstance()`, `.getReadyStateText()`, `.handleClose()`, `.handleConnectionTimeout()`, `.handleError()`, `.handleMessage()`, `.handleOpen()`, `.init()`, `.isWebSocketConnected()`, `.reconnect()`, `.resetHeartbeat()`, `.send()`, `.startHeartbeat()`, `.startPing()`, `TableCache`, `.cleanupExpired()`, `.clear()`, `.clearByTags()`, `.clearCurrentSearch()`, `.clearPagination()`, `.constructor()`, `.evictLRU()`, `.generateKey()`, `.generateTags()`, `.get()`, `.getStats()`, `.log()`, `.set()`, `index.ts`, `tableCache.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 42`** (9 nodes): `cleanupEventListeners()`, `handleTouchEnd()`, `handleTouchMove()`, `handleTouchStart()`, `handleWheelScroll()`, `if()`, `setTransition()`, `setupEventListeners()`, `index.vue`
+- **Thin community `Community 41`** (9 nodes): `cleanupEventListeners()`, `handleTouchEnd()`, `handleTouchMove()`, `handleTouchStart()`, `handleWheelScroll()`, `if()`, `setTransition()`, `setupEventListeners()`, `index.vue`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 49`** (8 nodes): `TableHeightCalculator`, `.calculate()`, `.calculateOffset()`, `.calculatePaginationOffset()`, `.constructor()`, `.getHeaderHeight()`, `useTableHeight()`, `useTableHeight.ts`
+- **Thin community `Community 48`** (8 nodes): `TableHeightCalculator`, `.calculate()`, `.calculateOffset()`, `.calculatePaginationOffset()`, `.constructor()`, `.getHeaderHeight()`, `useTableHeight()`, `useTableHeight.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 51`** (7 nodes): `App.vue`, `main.ts`, `refreshButtonAutoIcons()`, `refreshPanelTitleIcons()`, `logApiCryptoBootInfo()`, `maskSecret()`, `console.ts`
+- **Thin community `Community 50`** (7 nodes): `App.vue`, `main.ts`, `refreshButtonAutoIcons()`, `refreshPanelTitleIcons()`, `logApiCryptoBootInfo()`, `maskSecret()`, `console.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 53`** (7 nodes): `fetchCreateLeave()`, `fetchDeleteLeave()`, `fetchLeaveDetail()`, `fetchLeaveList()`, `fetchSubmitLeave()`, `fetchUpdateLeave()`, `leave.ts`
+- **Thin community `Community 52`** (7 nodes): `fetchCreateLeave()`, `fetchDeleteLeave()`, `fetchLeaveDetail()`, `fetchLeaveList()`, `fetchSubmitLeave()`, `fetchUpdateLeave()`, `leave.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 54`** (6 nodes): `formatQcWorkOrderUnfinishedBadgeCount()`, `isUnfinishedQcWorkOrder()`, `qcWorkOrderUnfinishedBadgeTitle()`, `resolveQcWorkOrderUnfinishedBadgeCount()`, `sumQcWorkOrderGroupUnfinishedBadgeCount()`, `qc-work-order-unfinished-badge.ts`
+- **Thin community `Community 53`** (6 nodes): `formatQcWorkOrderUnfinishedBadgeCount()`, `isUnfinishedQcWorkOrder()`, `qcWorkOrderUnfinishedBadgeTitle()`, `resolveQcWorkOrderUnfinishedBadgeCount()`, `sumQcWorkOrderGroupUnfinishedBadgeCount()`, `qc-work-order-unfinished-badge.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 56`** (5 nodes): `formatProtocolDocBatchDeleteConfirm()`, `formatProtocolDocDeleteConfirm()`, `formatProtocolDocSubject()`, `getProtocolDocTypeLabel()`, `protocol-doc-label.ts`
+- **Thin community `Community 55`** (5 nodes): `formatProtocolDocBatchDeleteConfirm()`, `formatProtocolDocDeleteConfirm()`, `formatProtocolDocSubject()`, `getProtocolDocTypeLabel()`, `protocol-doc-label.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 57`** (5 nodes): `equipmentOptionLabel()`, `joinEquipmentIds()`, `parseEquipmentIds()`, `syncEquipmentNamesFromOptions()`, `equipment-select.ts`
+- **Thin community `Community 56`** (5 nodes): `equipmentOptionLabel()`, `joinEquipmentIds()`, `parseEquipmentIds()`, `syncEquipmentNamesFromOptions()`, `equipment-select.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 59`** (5 nodes): `focusInput()`, `handleKeydown()`, `if()`, `search()`, `index.vue`
+- **Thin community `Community 58`** (5 nodes): `focusInput()`, `handleKeydown()`, `if()`, `search()`, `index.vue`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 60`** (5 nodes): `fetchBatchRevokeQcMaterialAmountAuth()`, `fetchGrantQcMaterialAmountAuth()`, `fetchQcMaterialAmountAuthUsers()`, `fetchRevokeQcMaterialAmountAuth()`, `qc-material-amount-auth.ts`
+- **Thin community `Community 59`** (5 nodes): `oa-form-components.ts`, `OaAttachmentField.vue`, `installOaFormComponents()`, `registerOaDesignerAttachment()`, `registerOaFormCreateComponents()`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 62`** (4 nodes): `if()`, `logSidebarMenu()`, `index.vue`, `SidebarSubmenu.vue`
+- **Thin community `Community 61`** (4 nodes): `if()`, `logSidebarMenu()`, `index.vue`, `SidebarSubmenu.vue`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 67`** (3 nodes): `getSettingDefaults()`, `resetToDefaults()`, `setting.ts`
+- **Thin community `Community 66`** (3 nodes): `getSettingDefaults()`, `resetToDefaults()`, `setting.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 69`** (3 nodes): `copyTextToClipboard()`, `copyTextWithFallback()`, `copy-text.ts`
+- **Thin community `Community 68`** (3 nodes): `copyTextToClipboard()`, `copyTextWithFallback()`, `copy-text.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
-- **Thin community `Community 70`** (3 nodes): `getSourceProtocolAttachment()`, `normalizeAttachmentFiles()`, `protocol-source-attachment.ts`
+- **Thin community `Community 69`** (3 nodes): `getSourceProtocolAttachment()`, `normalizeAttachmentFiles()`, `protocol-source-attachment.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
 - **Thin community `Community 78`** (3 nodes): `emptyTabCounts()`, `useProductionWorkOrderTabStepCounts()`, `useProductionWorkOrderTabStepCounts.ts`
   Too small to be a meaningful cluster - may be noise or needs more connections extracted.
@@ -385,17 +380,17 @@ Nodes (2): emptyTabCounts(), useQcWorkOrderTabUnfinishedCounts()
 ## Suggested Questions
 _Questions this graph is uniquely positioned to answer:_
 
-- **Why does `get()` connect `Community 0` to `Community 1`, `Community 2`, `Community 3`, `Community 4`, `Community 5`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 14`, `Community 15`, `Community 20`, `Community 22`, `Community 23`, `Community 24`, `Community 25`, `Community 26`, `Community 27`, `Community 28`, `Community 30`, `Community 32`, `Community 33`, `Community 35`, `Community 36`, `Community 39`, `Community 44`, `Community 46`, `Community 53`, `Community 60`?**
-  _High betweenness centrality (0.267) - this node is a cross-community bridge._
-- **Why does `push()` connect `Community 1` to `Community 0`, `Community 2`, `Community 3`, `Community 4`, `Community 5`, `Community 7`, `Community 9`, `Community 12`, `Community 13`, `Community 15`, `Community 16`, `Community 17`, `Community 19`, `Community 23`, `Community 24`, `Community 25`, `Community 28`, `Community 34`, `Community 41`?**
-  _High betweenness centrality (0.259) - this node is a cross-community bridge._
-- **Why does `fetchNotDeletedRegions()` connect `Community 0` to `Community 1`?**
-  _High betweenness centrality (0.038) - this node is a cross-community bridge._
-- **Are the 281 inferred relationships involving `get()` (e.g. with `buildNodeCodePathFromFlat()` and `collectLeafFacilityNodesInTreeOrder()`) actually correct?**
-  _`get()` has 281 INFERRED edges - model-reasoned connections that need verification._
-- **Are the 77 inferred relationships involving `push()` (e.g. with `refreshQcMenuBadges()` and `collectLeafFacilityNodesInTreeOrder()`) actually correct?**
-  _`push()` has 77 INFERRED edges - model-reasoned connections that need verification._
-- **Are the 24 inferred relationships involving `emit()` (e.g. with `handleSubmit()` and `handleDialogClose()`) actually correct?**
-  _`emit()` has 24 INFERRED edges - model-reasoned connections that need verification._
+- **Why does `get()` connect `Community 0` to `Community 1`, `Community 2`, `Community 5`, `Community 6`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 14`, `Community 16`, `Community 20`, `Community 24`, `Community 25`, `Community 26`, `Community 27`, `Community 28`, `Community 29`, `Community 31`, `Community 32`, `Community 37`, `Community 43`, `Community 44`, `Community 52`?**
+  _High betweenness centrality (0.290) - this node is a cross-community bridge._
+- **Why does `push()` connect `Community 1` to `Community 0`, `Community 2`, `Community 4`, `Community 5`, `Community 7`, `Community 8`, `Community 9`, `Community 10`, `Community 11`, `Community 12`, `Community 13`, `Community 15`, `Community 17`, `Community 18`, `Community 19`, `Community 20`, `Community 23`, `Community 27`, `Community 29`, `Community 33`, `Community 40`?**
+  _High betweenness centrality (0.246) - this node is a cross-community bridge._
+- **Why does `handleDynamicRoutes()` connect `Community 3` to `Community 20`, `Community 10`, `Community 28`, `Community 29`?**
+  _High betweenness centrality (0.042) - this node is a cross-community bridge._
+- **Are the 291 inferred relationships involving `get()` (e.g. with `buildNodeCodePathFromFlat()` and `collectLeafFacilityNodesInTreeOrder()`) actually correct?**
+  _`get()` has 291 INFERRED edges - model-reasoned connections that need verification._
+- **Are the 83 inferred relationships involving `push()` (e.g. with `refreshQcMenuBadges()` and `collectLeafFacilityNodesInTreeOrder()`) actually correct?**
+  _`push()` has 83 INFERRED edges - model-reasoned connections that need verification._
+- **Are the 26 inferred relationships involving `emit()` (e.g. with `handleSubmit()` and `handleDialogClose()`) actually correct?**
+  _`emit()` has 26 INFERRED edges - model-reasoned connections that need verification._
 - **Are the 19 inferred relationships involving `set()` (e.g. with `buildNodeCodePathFromFlat()` and `collectLeafFacilityNodesInTreeOrder()`) actually correct?**
   _`set()` has 19 INFERRED edges - model-reasoned connections that need verification._

تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 1 - 1
web-admin/graphify-out/graph.html


تفاوت فایلی نمایش داده نمی شود زیرا این فایل بسیار بزرگ است
+ 112 - 112
web-admin/graphify-out/graph.json


+ 31 - 9
web-admin/graphify-out/manifest.json

@@ -1,6 +1,6 @@
 {
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/App.vue": 1782893851.4905877,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts": 1782442850.965947,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/main.ts": 1784084159.095237,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/env.d.ts": 1781272556.3788364,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/shims-loose.d.ts": 1781272556.417826,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/directives/index.ts": 1781272556.3521712,
@@ -8,7 +8,7 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/directives/core/auth.ts": 1781272556.3503833,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/directives/business/ripple.ts": 1781272556.3509357,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/directives/business/highlight.ts": 1781272556.3516848,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/api.d.ts": 1782181894.0762684,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/api.d.ts": 1784018211.585673,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/index.ts": 1781272556.36091,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/config/index.ts": 1781272556.3566036,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/component/chart.ts": 1781272556.3575494,
@@ -17,8 +17,8 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/common/index.ts": 1781272556.3597305,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/directive/directive.d.ts": 1781272556.3601494,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/api/api.d.ts": 1781272556.3606477,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts": 1783923617.6177902,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/auto-imports.d.ts": 1783922785.1197648,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/components.d.ts": 1784099343.4467716,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/import/auto-imports.d.ts": 1784098578.9870985,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/store/index.ts": 1781272556.364766,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/types/router/index.ts": 1782394569.8806834,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/composables/useAttachmentActions.ts": 1783921717.4015942,
@@ -70,6 +70,7 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/datetime-display.ts": 1782806208.3904786,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/sample-reception-lab-storage-code.ts": 1782378453.1031013,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/outbound-qc-pilot-view-sections.ts": 1781566346.7618802,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/oa-app-icons.ts": 1784078693.2662315,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/qc-work-order-groups.ts": 1782400129.6394563,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/qc-inspection-batch.ts": 1782569790.8550596,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/equipment-select.ts": 1781524048.96866,
@@ -143,6 +144,8 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/http/error.ts": 1781272556.4091117,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/socket/index.ts": 1781272556.4146817,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/utils/router/sidebar-menu-filter.ts": 1781272556.4163456,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/App.vue": 1784081935.9416952,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/oa-fc-host/main.ts": 1784023947.2903028,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/core/tables/art-table/index.vue": 1782893852.037499,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/core/tables/art-table-header/index.vue": 1782893852.0053234,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/core/forms/art-search-bar/index.vue": 1782893851.915658,
@@ -256,6 +259,13 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/common/list-datetime-column.vue": 1782893851.4989195,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/common/amount-input/index.vue": 1782893851.5061834,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/common/decimal-input/index.vue": 1782893851.5090024,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaFlowPreview.vue": 1784095413.414618,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaAttachmentField.vue": 1784019519.9416633,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/OaFormDesignerEmbed.vue": 1784078542.527908,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/oa-form-components.ts": 1784019519.941486,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowBranch.vue": 1784078975.1328,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/FlowDesigner.vue": 1784093497.747014,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/components/oa-approval/flow-tree/types.ts": 1784019519.9422653,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/hooks/index.ts": 1781272556.653748,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/hooks/core/useFastEnter.ts": 1781272556.6454022,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/hooks/core/useTableColumns.ts": 1781272556.6461287,
@@ -292,13 +302,14 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/chinaRegion.ts": 1781272556.6606348,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/storage-entry-sms-notification.ts": 1781272556.660898,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/business.ts": 1781750847.0646322,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts": 1782600949.367371,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/admin.ts": 1784018232.710263,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/inbound-sample.ts": 1782889889.452178,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/ethnic.ts": 1781272556.6658764,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/research-donation-sample-collection.ts": 1781272556.6660974,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-lab-test-item.ts": 1781272556.666375,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/cell-product.ts": 1782710852.6608956,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/sample-sms-notification.ts": 1781272556.666838,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/oaApproval.ts": 1784099926.4069564,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/material-stock-check.ts": 1781427280.4992144,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/research-donation.ts": 1782893816.502791,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/api/qc-task.ts": 1783327864.9737554,
@@ -366,7 +377,7 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/post/index.vue": 1783326448.9210706,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/category/index.vue": 1783326448.9218316,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/express/index.vue": 1783326448.9225786,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/user/index.vue": 1783326448.9230077,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/user/index.vue": 1784018187.7348652,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/user/detail.vue": 1782893853.853974,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/user/modules/user-dialog.vue": 1782893853.9540384,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/user/modules/user-search.vue": 1782893853.8827589,
@@ -380,9 +391,20 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/workflow/process/index.vue": 1783326448.9286532,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/menu/index.vue": 1783326448.9295316,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/site/index.vue": 1783326448.9302733,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/dept/index.vue": 1783326448.9311762,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/dept/index.vue": 1784018212.022131,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/dict/index.vue": 1783326448.9326534,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/system/leave/index.vue": 1783326448.934463,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/start/index.vue": 1784099881.4392262,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/roles/index.vue": 1784018992.582203,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/form-designer-spike/index.vue": 1784018202.8769164,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/_placeholder/RuntimeList.vue": 1784099874.722828,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/done/index.vue": 1784019048.9316015,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/mine/index.vue": 1784019049.3976674,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/designer/index.vue": 1784098244.5513089,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/instances/detail.vue": 1784099866.9437537,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/cc/index.vue": 1784019049.786957,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/apps/index.vue": 1784022023.6119828,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/oa-approval/pending/index.vue": 1784019048.7343092,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/output-type/index.vue": 1782893852.8585393,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/cell-product/index.vue": 1783326448.9373286,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/production/cell-product/SourceChainGraph.vue": 1782893852.699336,
@@ -514,7 +536,7 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material/QcMaterialBatchAttachmentDialog.vue": 1782893853.076457,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/qc-material-amount-auth/index.vue": 1783919123.1912484,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/pre-transit-sample/index.vue": 1783326448.9852715,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/pre-transit-sample/PreTransitProtocolCardList.vue": 1783925902.3931653,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/pre-transit-sample/PreTransitProtocolCardList.vue": 1783925976.6947525,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/sample-reception/index.vue": 1783389101.2287407,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/sample-reception/SampleReceptionCardList.vue": 1783924089.846302,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/views/quality-inspection/my-qc-task/index.vue": 1783325990.456282,
@@ -602,7 +624,7 @@
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/RoutePermissionValidator.ts": 1781272559.4235668,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/index.ts": 1781272559.424284,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/core/IframeRouteManager.ts": 1781272559.425215,
-  "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts": 1783917044.1127987,
+  "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/sqxp.ts": 1784019090.2131488,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/index.ts": 1781272559.5419338,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/modules/exception.ts": 1781272559.549901,
   "/Users/wuzilong/work/00code/zkxw/web-admin/src/router/routes/staticRoutes.ts": 1781272559.596198,

+ 0 - 12
web-admin/src/api/oaApproval.ts

@@ -210,7 +210,6 @@ export function fetchStartOaInstance(data: {
   initiatorDeptId?: string
   initiatorSelectUserIds?: string[]
   relatedInstanceIds?: string[]
-  sourceInstanceId?: string
 }) {
   return request.post({
     url: `${BASE}/instances`,
@@ -269,17 +268,6 @@ export function fetchReturnOaTask(taskId: string, comment: string) {
   })
 }
 
-export function fetchResubmitOaInstance(
-  id: string,
-  data: { formData?: Record<string, any>; initiatorSelectUserIds?: string[] }
-) {
-  return request.post({
-    url: `${BASE}/instances/${id}/resubmit`,
-    data,
-    showSuccessMessage: true
-  })
-}
-
 export function fetchAddSignOaTask(
   taskId: string,
   data: { userIds: string[]; comment?: string }

+ 12 - 8
web-admin/src/views/oa-approval/_placeholder/RuntimeList.vue

@@ -45,12 +45,16 @@
                 查看
               </el-button>
               <el-button
-                v-if="kind === 'mine' && row.status === 'cancelled' && row.appId"
+                v-if="
+                  kind === 'mine' &&
+                  row.appId &&
+                  ['returned', 'cancelled', 'rejected'].includes(row.status)
+                "
                 class="btn-op-item"
-                @click="openResubmitFromCancelled(row)"
+                @click="openCopyRestart(row)"
               >
                 <el-icon><RefreshRight /></el-icon>
-                修改并重新提交
+                复制并重新发起
               </el-button>
             </template>
           </el-table-column>
@@ -76,9 +80,9 @@
   const rows = ref<any[]>([])
 
   function statusType(s: string) {
-    if (s === 'pending' || s === 'running' || s === 'returned') return 'warning'
+    if (s === 'pending' || s === 'running') return 'warning'
     if (s === 'approved' || s === 'completed' || s === 'done') return 'success'
-    if (s === 'rejected' || s === 'cancelled') return 'danger'
+    if (s === 'rejected' || s === 'cancelled' || s === 'returned') return 'danger'
     return 'info'
   }
 
@@ -92,7 +96,7 @@
       completed: '已完成',
       cancelled: '已撤销',
       done: '已结束',
-      returned: '待修改'
+      returned: '已打回'
     }
     return map[s] || s
   }
@@ -103,11 +107,11 @@
     router.push({ path: `/system-manage/oa-approval/instances/${id}` })
   }
 
-  function openResubmitFromCancelled(row: any) {
+  function openCopyRestart(row: any) {
     if (!row?.appId || !row?.id) return
     router.push({
       path: '/system-manage/oa-approval/start',
-      query: { appId: row.appId, sourceInstanceId: row.id }
+      query: { appId: row.appId, copyFromInstanceId: row.id }
     })
   }
 

+ 33 - 58
web-admin/src/views/oa-approval/instances/detail.vue

@@ -47,14 +47,13 @@
             加签
           </el-button>
           <el-button
-            v-if="detail?.status === 'returned' && isInitiator"
+            v-if="canCopyRestart"
             class="btn-main"
             type="primary"
-            :loading="acting"
-            @click="openResubmit"
+            @click="goCopyRestart"
           >
-            <el-icon><Check /></el-icon>
-            修改并再次提交
+            <el-icon><RefreshRight /></el-icon>
+            复制并重新发起
           </el-button>
           <el-button
             v-if="detail?.status === 'running' && isInitiator"
@@ -69,16 +68,6 @@
       </div>
 
       <div v-loading="loading" class="oa-detail__body">
-        <p v-if="detail?.sourceInstanceId" class="oa-detail__link-tip">
-          本单由已撤销审批重提,
-          <el-button link type="primary" @click="goInstance(detail.sourceInstanceId)">查看原单</el-button>
-        </p>
-        <p v-if="detail?.resubmittedInstanceId" class="oa-detail__link-tip">
-          已有重提单,
-          <el-button link type="primary" @click="goInstance(detail.resubmittedInstanceId)">
-            查看重提单
-          </el-button>
-        </p>
         <section class="oa-detail__section">
           <h3>表单内容</h3>
           <div class="oa-detail__form-wrap">
@@ -96,18 +85,13 @@
           <h3>审批进度</h3>
           <div class="oa-detail__timeline-wrap">
             <el-timeline v-if="timelineItems.length">
-              <template v-for="(item, idx) in timelineItems" :key="item.key">
-                <div
-                  v-if="idx === 0 || item.roundNo !== timelineItems[idx - 1].roundNo"
-                  class="oa-tl__round"
-                >
-                  第 {{ item.roundNo }} 轮
-                </div>
-                <el-timeline-item
-                  :type="timelineType(item.status)"
-                  :timestamp="item.timestamp"
-                  placement="top"
-                >
+              <el-timeline-item
+                v-for="item in timelineItems"
+                :key="item.key"
+                :type="timelineType(item.status)"
+                :timestamp="item.timestamp"
+                placement="top"
+              >
                 <div class="oa-tl">
                   <div class="oa-tl__title">
                     {{ item.title }}
@@ -115,7 +99,6 @@
                       {{ statusText(item.status) }}
                     </el-tag>
                     <el-tag v-if="item.taskType === 'cc'" size="small" type="info">抄送</el-tag>
-                    <el-tag v-if="item.kind === 'return'" size="small" type="warning">打回</el-tag>
                   </div>
                   <div
                     v-if="item.assignee && item.kind !== 'pending_node' && item.kind !== 'terminal'"
@@ -128,8 +111,7 @@
                   </div>
                   <div v-if="item.commentText" class="oa-tl__comment">意见:{{ item.commentText }}</div>
                 </div>
-                </el-timeline-item>
-              </template>
+              </el-timeline-item>
             </el-timeline>
             <p v-else class="oa-detail__empty">暂无任务记录</p>
           </div>
@@ -190,14 +172,13 @@
   import { computed, onMounted, ref } from 'vue'
   import { useRoute, useRouter } from 'vue-router'
   import { ElMessage, ElMessageBox } from 'element-plus'
-  import { ArrowLeft, Check, Close, RefreshLeft, Plus } from '@element-plus/icons-vue'
+  import { ArrowLeft, Check, Close, Plus, RefreshLeft, RefreshRight } from '@element-plus/icons-vue'
   import { fetchUserList } from '@/api/admin'
   import {
     fetchAddSignOaTask,
     fetchApproveOaTask,
     fetchOaInstanceDetail,
     fetchRejectOaTask,
-    fetchResubmitOaInstance,
     fetchReturnOaTask,
     fetchWithdrawOaInstance
   } from '@/api/oaApproval'
@@ -264,10 +245,15 @@
 
   const canApprove = computed(() => !!myPendingTask.value)
 
+  const canCopyRestart = computed(() => {
+    if (!isInitiator.value || !detail.value) return false
+    return ['returned', 'cancelled', 'rejected'].includes(String(detail.value.status || ''))
+  })
+
   function statusType(s: string) {
-    if (s === 'pending' || s === 'running' || s === 'returned') return 'warning'
+    if (s === 'pending' || s === 'running') return 'warning'
     if (s === 'approved' || s === 'completed' || s === 'done' || s === 'submitted') return 'success'
-    if (s === 'rejected' || s === 'cancelled') return 'danger'
+    if (s === 'rejected' || s === 'cancelled' || s === 'returned') return 'danger'
     if (s === 'not_reached') return 'info'
     return 'info'
   }
@@ -283,17 +269,15 @@
       done: '已结束',
       submitted: '已提交',
       not_reached: '未到达',
-      returned: '待修改'
+      returned: '已打回'
     }
-    // 任务被打回后取消:展示「已取消」
-    if (s === 'cancelled') return '已撤销'
     return map[s] || s
   }
 
   function timelineType(s: string) {
     if (s === 'approved' || s === 'completed' || s === 'done' || s === 'submitted') return 'success'
-    if (s === 'rejected' || s === 'cancelled') return 'danger'
-    if (s === 'pending' || s === 'returned') return 'warning'
+    if (s === 'rejected' || s === 'cancelled' || s === 'returned') return 'danger'
+    if (s === 'pending') return 'warning'
     if (s === 'not_reached') return 'info'
     return 'primary'
   }
@@ -395,26 +379,17 @@
     }
   }
 
-  async function openResubmit() {
-    await ElMessageBox.confirm(
-      '将使用当前表单内容再次提交并重新走审批。若需改字段,请先在下方确认表单后确定。',
-      '再次提交',
-      { type: 'warning' }
-    )
-    acting.value = true
-    try {
-      await fetchResubmitOaInstance(String(route.params.id || ''), {
-        formData: { ...(viewFormData.value || detail.value?.formDataJson || {}) }
-      })
-      await load()
-    } finally {
-      acting.value = false
+  function goCopyRestart() {
+    const appId = String(detail.value?.appId || '').trim()
+    const id = String(route.params.id || '').trim()
+    if (!appId || !id) {
+      ElMessage.warning('无法复制:缺少应用或实例信息')
+      return
     }
-  }
-
-  function goInstance(id: string) {
-    if (!id) return
-    router.push({ path: `/system-manage/oa-approval/instances/${id}` })
+    router.push({
+      path: '/system-manage/oa-approval/start',
+      query: { appId, copyFromInstanceId: id }
+    })
   }
 
   async function loadUsers() {

+ 4 - 8
web-admin/src/views/oa-approval/start/index.vue

@@ -184,7 +184,6 @@
   const formOption = ref<Record<string, any>>({ submitBtn: false, resetBtn: false })
   const fapi = ref<any>(null)
   const submitting = ref(false)
-  const sourceInstanceId = ref('')
   const needInitiatorSelect = ref(false)
   const initiatorSelectUserIds = ref<string[]>([])
   const userLoading = ref(false)
@@ -350,11 +349,9 @@
         formData: { ...formData.value },
         initiatorSelectUserIds: needInitiatorSelect.value
           ? [...initiatorSelectUserIds.value]
-          : undefined,
-        sourceInstanceId: sourceInstanceId.value || undefined
+          : undefined
       })
       dlgVisible.value = false
-      sourceInstanceId.value = ''
       if (data?.id) {
         router.push({ path: `/system-manage/oa-approval/instances/${data.id}` })
       }
@@ -370,15 +367,14 @@
       templates.value = tpl?.list || []
       groupOptions.value = groupsRes?.list || []
       const qAppId = String(route.query.appId || '').trim()
-      const qSource = String(route.query.sourceInstanceId || '').trim()
+      const qCopyFrom = String(route.query.copyFromInstanceId || '').trim()
       if (qAppId) {
         const row = templates.value.find((t: any) => t.id === qAppId)
         if (row) {
-          sourceInstanceId.value = qSource
           await onPick(row)
-          if (qSource) {
+          if (qCopyFrom) {
             try {
-              const old = await fetchOaInstanceDetail(qSource)
+              const old = await fetchOaInstanceDetail(qCopyFrom)
               formData.value = { ...(old?.formDataJson || {}) }
             } catch {
               /* 预填失败仍可手工填 */

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است