From f431d61d85ded959db0ac607dafce5addca2e966 Mon Sep 17 00:00:00 2001 From: Xie Qiming Date: Wed, 22 Apr 2026 15:21:15 +0800 Subject: [PATCH] Fix neware test dispatch and manual_confirm CSV archival - neware_driver: default backup filetype="1" so Neware BTS produces Excel backups out of the box (matches submit_*_export_excel semantics). - submit_auto_export_excel: pass filetype=1 to align with function name and the newly default Excel backup. - manual_confirm: prefix Channel_Name with a single quote when writing the integrated CSV so Excel keeps it as text (e.g. "6-10-2") instead of auto-coercing to a date (e.g. "2006/10/2"). The on-disk value is archival only and submit_auto_export_excel never reads it, so the live workflow is unaffected either way. - neware yaml: declare explicit item properties for manual_confirm's formulations and assembly_data arrays so the orchestrator schema projection keeps the 7/9 upstream fields intact. Made-with: Cursor --- .../neware_battery_test_system.py | 4 +-- .../neware_driver.py | 2 +- .../devices/neware_battery_test_system.yaml | 36 +++++++++++++++++++ 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/unilabos/devices/neware_battery_test_system/neware_battery_test_system.py b/unilabos/devices/neware_battery_test_system/neware_battery_test_system.py index fea3d027..7dc48f4c 100644 --- a/unilabos/devices/neware_battery_test_system/neware_battery_test_system.py +++ b/unilabos/devices/neware_battery_test_system/neware_battery_test_system.py @@ -2093,7 +2093,7 @@ class NewareBatteryTestSystem: safe_get(active_material, i, ""), safe_get(capacity, i, ""), safe_get(battery_system, i, ""), - ch_name or "", + (f"'{ch_name}" if ch_name else ""), ]) f.flush() @@ -2292,7 +2292,7 @@ class NewareBatteryTestSystem: CoinID=coin_id, recipe_path=recipe_path, backup_dir=backup_dir, - filetype=0, + filetype=1, ) submitted += 1 results.append({ diff --git a/unilabos/devices/neware_battery_test_system/neware_driver.py b/unilabos/devices/neware_battery_test_system/neware_driver.py index 5393892b..f7038e20 100644 --- a/unilabos/devices/neware_battery_test_system/neware_driver.py +++ b/unilabos/devices/neware_battery_test_system/neware_driver.py @@ -12,7 +12,7 @@ def build_start_command(devid, subdevid, chlid, CoinID, ' start', ' ', f' {recipe_path}', - f' ', + f' ', ' ', '', ] diff --git a/unilabos/registry/devices/neware_battery_test_system.yaml b/unilabos/registry/devices/neware_battery_test_system.yaml index 0ef0b0a3..6fbbc8aa 100644 --- a/unilabos/registry/devices/neware_battery_test_system.yaml +++ b/unilabos/registry/devices/neware_battery_test_system.yaml @@ -579,11 +579,47 @@ neware_battery_test_system: description: 配方信息列表(来自 bioyond create_orders_formulation 的 mass_ratios 输出) items: type: object + additionalProperties: false + properties: + orderCode: + type: string + orderName: + type: string + real_mass_ratio: + type: object + target_mass_ratio: + type: object + prep_bottle_barcode: + type: string + vial_bottle_barcodes: + type: string + error: + type: string assembly_data: type: array description: 扣电组装数据列表(每颗电池一个对象,含 Time/open_circuit_voltage/pole_weight 等 9 字段) items: type: object + additionalProperties: false + properties: + Time: + type: string + open_circuit_voltage: + type: number + pole_weight: + type: number + assembly_time: + type: number + assembly_pressure: + type: number + electrolyte_volume: + type: number + data_coin_type: + type: integer + electrolyte_code: + type: string + coin_cell_code: + type: string csv_export_dir: type: string default: 'D:\2604Agentic_test'