Commit 96102c18 authored by 邱阿朋's avatar 邱阿朋

fix(vc): 优化报关单导入异常处理

- 增加对文件格式错误的异常捕获和日志记录
- 返回 None 以避免报关单导入后数据为空的情况
parent 3e0dafdb
......@@ -103,7 +103,9 @@ class Spa(AutoInterface):
excel.save_xls(data, file_name, sheet_name)
return pd.read_excel(file_name, sheet_name=None)
except ValueError as e:
pass
self.logger.warning(f"{invoice_id} 文件格式错误: {e}")
return None
def __process_large_items(self, item_list, relation_data, coop, va_tax):
"""处理大数据列表 (item_list 长度 >= 10)"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment