ソースを参照

fix(pl): fix FakePlan id for planId export field.

Co-authored-by: Cursor <cursoragent@cursor.com>
wuzilong 1 ヶ月 前
親
コミット
d68a0ef0bd

+ 1 - 1
backend/app/services/pl_plan_archive_zip_export.py

@@ -2,7 +2,7 @@ from __future__ import annotations
 
 import hashlib
 import re
-from typing import Any, Mapping, Optional, Sequence
+from typing import Any, Mapping, Sequence
 from urllib.parse import unquote, urlparse
 
 ARCHIVE_ZIP_ATTACH_COL_MAX = 20

+ 2 - 0
backend/tests/test_pl_plan_archive_export.py

@@ -101,6 +101,7 @@ def test_append_stop_product_rows_delivery_external_outbound():
 
 
 class _FakePlan:
+    id = "p1"
     plan_no = "PL001"
     plan_date = "2026-08-27"
     archive_status = "archived"
@@ -115,6 +116,7 @@ class _FakePlan:
 
 def test_plan_common_export_fields():
     fields = _plan_common_export_fields(_FakePlan(), None)
+    assert fields["planId"] == "p1"
     assert fields["planNo"] == "PL001"
     assert fields["archiveStatus"] == "已归档"
     assert fields["followStatus"] == "已安排"

+ 0 - 1
backend/tests/test_pl_plan_archive_zip_export.py

@@ -1,6 +1,5 @@
 from app.services.pl_plan_archive_zip_export import (
     sanitize_zip_segment,
-    short_hash,
     build_attachment_filename,
     first_row_no_by_plan_id,
     build_hyperlink_formula,