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
This commit is contained in:
Xie Qiming
2026-04-22 15:21:15 +08:00
parent 3af86a07f2
commit f431d61d85
3 changed files with 39 additions and 3 deletions

View File

@@ -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({

View File

@@ -12,7 +12,7 @@ def build_start_command(devid, subdevid, chlid, CoinID,
' <cmd>start</cmd>',
' <list count="1">',
f' <start ip="{ip_in_xml}" devtype="{devtype}" devid="{devid}" subdevid="{subdevid}" chlid="{chlid}" barcode="{CoinID}">{recipe_path}</start>',
f' <backup backupdir="{backup_dir}" remotedir="" filenametype="1" customfilename="" createdirbydate="0" filetype="0" backupontime="1" backupontimeinterval="1" backupfree="0" />',
f' <backup backupdir="{backup_dir}" remotedir="" filenametype="1" customfilename="" createdirbydate="0" filetype="1" backupontime="1" backupontimeinterval="1" backupfree="0" />',
' </list>',
'</bts>',
]

View File

@@ -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'