2.18 空的docx无法被识别为非招标文件
This commit is contained in:
parent
ca816f46de
commit
d4a9d4edae
@ -263,7 +263,7 @@ def goods_bid_main(output_folder, file_path, file_type, unique_id):
|
||||
processed_data['qualification_path'],
|
||||
processed_data['notice_path'],logger),
|
||||
}
|
||||
|
||||
collected_good_list = []
|
||||
# 提前处理这些不依赖的任务,按完成顺序返回
|
||||
for future in as_completed(futures.values()): #as_completed:哪个先运行结束就先返回
|
||||
key = next(k for k, v in futures.items() if v == future)
|
||||
@ -271,7 +271,7 @@ def goods_bid_main(output_folder, file_path, file_type, unique_id):
|
||||
result = future.result()
|
||||
if key == 'base_info':
|
||||
base_info, good_list = result
|
||||
collected_good_list = good_list # Store good_list for later use
|
||||
collected_good_list = good_list or [] # Store good_list for later use
|
||||
yield json.dumps({'base_info': transform_json_values(base_info)}, ensure_ascii=False)
|
||||
# 如果是 evaluation_standards,拆分技术标和商务标
|
||||
elif key == 'evaluation_standards':
|
||||
@ -293,8 +293,8 @@ def goods_bid_main(output_folder, file_path, file_type, unique_id):
|
||||
}
|
||||
yield json.dumps(default_evaluation, ensure_ascii=False)
|
||||
# yield json.dumps({'error': f'Error processing {key}: {str(exc)}'}, ensure_ascii=False)
|
||||
if collected_good_list is not None:
|
||||
yield json.dumps({'good_list': transform_json_values(collected_good_list)}, ensure_ascii=False)
|
||||
# 无论如何,都返回 good_list 信息,哪怕是空列表
|
||||
yield json.dumps({'good_list': transform_json_values(collected_good_list)}, ensure_ascii=False)
|
||||
|
||||
#TODO:小解析考虑提速:1:直接pdf转文本,再切分。后期考虑。
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user