diff --git a/backend/app/services/pl_plan_archive_zip_export.py b/backend/app/services/pl_plan_archive_zip_export.py index bc70b326b..60e6859d6 100644 --- a/backend/app/services/pl_plan_archive_zip_export.py +++ b/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 diff --git a/backend/tests/test_pl_plan_archive_export.py b/backend/tests/test_pl_plan_archive_export.py index e3a184703..2215e99ba 100644 --- a/backend/tests/test_pl_plan_archive_export.py +++ b/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"] == "已安排" diff --git a/backend/tests/test_pl_plan_archive_zip_export.py b/backend/tests/test_pl_plan_archive_zip_export.py index 100affd49..8df05cac9 100644 --- a/backend/tests/test_pl_plan_archive_zip_export.py +++ b/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,