From 9c894d2904c1647e9be57c78fd9fb3ac8e517dda Mon Sep 17 00:00:00 2001 From: shijing Date: Fri, 20 Mar 2026 10:12:50 +0800 Subject: [PATCH] =?UTF-8?q?fix:excel=E5=AF=BC=E5=85=A5=E7=9A=84=E6=95=B0?= =?UTF-8?q?=E6=8D=AE=E7=8A=B6=E6=80=81=E7=9B=B4=E6=8E=A5=E4=B8=BA=E5=B7=B2?= =?UTF-8?q?=E5=AE=A1=E6=A0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/apps/material/importers.py | 1 + .../material/management/commands/import_materials_from_excel.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/apps/material/importers.py b/backend/apps/material/importers.py index bb1315a..bba15ef 100644 --- a/backend/apps/material/importers.py +++ b/backend/apps/material/importers.py @@ -157,6 +157,7 @@ def import_materials_plan_excel(file_obj) -> Dict[str, int]: "handler": _single_line(get(row, "经办人")) or None, "remark": _single_line(get(row, "备注")) or None, "factory": factory, + "status": "approved", } material, created_flag = Material.objects.update_or_create( diff --git a/backend/apps/material/management/commands/import_materials_from_excel.py b/backend/apps/material/management/commands/import_materials_from_excel.py index 8d71276..49b14d0 100644 --- a/backend/apps/material/management/commands/import_materials_from_excel.py +++ b/backend/apps/material/management/commands/import_materials_from_excel.py @@ -281,7 +281,7 @@ class Command(BaseCommand): "construction_method": _single_line(get(row, "施工工艺")) or None, "limit_condition": _cell(get(row, "限制条件")) or None, "factory": factory, - "status": "draft", + "status": "approved", } if dry_run: