11.7 资格审查货物标修改

This commit is contained in:
zy123 2024-11-07 17:32:45 +08:00
parent 4c00af7c3e
commit 3be755df51
3 changed files with 10 additions and 6 deletions

View File

@ -112,7 +112,7 @@ def get_technical_requirements(file_id,invalid_path):
} }
""" """
res = qianwen_long(file_id, user_query1) res = qianwen_long(file_id, user_query1)
# print(res) print(res)
cleaned_res = clean_json_string(res) #转字典 cleaned_res = clean_json_string(res) #转字典
keys_list,good_list,no_keys_added= generate_key_paths(cleaned_res['采购需求']) # 提取需要采购的货物清单 keys_list,good_list,no_keys_added= generate_key_paths(cleaned_res['采购需求']) # 提取需要采购的货物清单
if '采购需求' in cleaned_res: if '采购需求' in cleaned_res:
@ -122,7 +122,7 @@ def get_technical_requirements(file_id,invalid_path):
else: else:
# user_query_template = "请你根据该货物标中采购要求部分的内容,请你给出\"{}\"的技术参数或采购要求请以json格式返回结果外层键名为\"{}\", 键值对中的键是你对该要求的总结,而值需要完全与原文保持一致,不可擅自总结删减。" # user_query_template = "请你根据该货物标中采购要求部分的内容,请你给出\"{}\"的技术参数或采购要求请以json格式返回结果外层键名为\"{}\", 键值对中的键是你对该要求的总结,而值需要完全与原文保持一致,不可擅自总结删减。"
user_query_template = """ user_query_template = """
请你根据该货物标中采购要求部分的内容请你给出\"{}\"的技术参数或采购要求请以json格式返回结果键名为\"{}\", 键值为一个列表,列表中包含若干描述\"{}\"的技术参数(或采购要求)的字符串。示例输出格式如下: 请你根据该货物标中采购要求部分的内容请你给出\"{}\"的技术参数或采购要求请以json格式返回结果键名为\"{}\", 键值为一个列表,列表中包含若干描述\"{}\"的技术参数(或采购要求)的字符串,如果该货物没有相关要求,键值为空列表。示例输出格式如下:
{{ {{
"摄像机控制键盘": [ "摄像机控制键盘": [
"支持串行 RS232/RS422 和 IP 混合控制,允许在一个控制器上使用 RS232/RS422/IP 控制单个系统中的摄像机;", "支持串行 RS232/RS422 和 IP 混合控制,允许在一个控制器上使用 RS232/RS422/IP 控制单个系统中的摄像机;",

View File

@ -51,6 +51,8 @@ def fetch_procurement_reqs(procurement_path,procurement_docpath,invalid_path):
if __name__ == "__main__": if __name__ == "__main__":
output_folder = "C:\\Users\\Administrator\\Desktop\\货物标\\货物标output" output_folder = "C:\\Users\\Administrator\\Desktop\\货物标\\货物标output"
# file_path="C:\\Users\\Administrator\\Desktop\\货物标\\output1\\2-招标文件2020年广水市中小学教师办公电脑系统及多媒体“班班通”设备采购安装项目_procurement.pdf" # file_path="C:\\Users\\Administrator\\Desktop\\货物标\\output1\\2-招标文件2020年广水市中小学教师办公电脑系统及多媒体“班班通”设备采购安装项目_procurement.pdf"
file_path="D:\\flask_project\\flask_app\\static\\output\\output1\\bf225a5e-16d0-45c8-8c19-54a1a94cf3e2\\ztbfile_procurement.docx" procurement_path = "C:\\Users\\Administrator\\Desktop\\fsdownload\\a6168046-ad8c-43cb-8913-071ce7b248a1\\ztbfile_procurement.docx"
res=fetch_procurement_reqs(file_path) procurement_docpath="C:\\Users\\Administrator\\Desktop\\fsdownload\\a6168046-ad8c-43cb-8913-071ce7b248a1\\ztbfile_procurement.docx"
invalid_path="C:\\Users\\Administrator\\Desktop\\fsdownload\\a6168046-ad8c-43cb-8913-071ce7b248a1\\ztbfile.pdf"
res=fetch_procurement_reqs(procurement_path,procurement_docpath,invalid_path)
print(json.dumps(res, ensure_ascii=False, indent=4)) print(json.dumps(res, ensure_ascii=False, indent=4))

View File

@ -88,6 +88,8 @@ def fetch_project_basic_info(invalid_path,invalid_docpath, merged_baseinfo_path,
start_time = time.time() start_time = time.time()
if not merged_baseinfo_path: if not merged_baseinfo_path:
merged_baseinfo_path = invalid_path merged_baseinfo_path = invalid_path
if not procurement_path:
procurement_path=invalid_path
if not procurement_docpath: if not procurement_docpath:
procurement_docpath=invalid_docpath procurement_docpath=invalid_docpath
basic_res = combine_basic_info(merged_baseinfo_path, procurement_path,procurement_docpath, clause_path,invalid_path) basic_res = combine_basic_info(merged_baseinfo_path, procurement_path,procurement_docpath, clause_path,invalid_path)
@ -241,9 +243,9 @@ def goods_bid_main(output_folder, file_path, file_type, unique_id):
yield json.dumps({'good_list': transform_json_values(collected_good_list)}, ensure_ascii=False) yield json.dumps({'good_list': transform_json_values(collected_good_list)}, ensure_ascii=False)
#广水市 2022 年义务教育学校多媒体补充采购项目 资格审查有问题 #广水市 2022 年义务教育学校多媒体补充采购项目 资格审查有问题
#TODO: 目前跳转可能有个问题,资格审查那边:既有原来的内容又有跳转后的内容;符合本采购文件第一章第二款要求,并提供合格有效的证明材料<br>1、满足《中华人民共和国政府采购法》第二十二条规定<br>1具有独立承担
#TODO:技术要求提取更全面一点 fsdownload\a110ed59-00e8-47ec-873a-bd4579a6e628 #TODO:技术要求提取更全面一点 fsdownload\a110ed59-00e8-47ec-873a-bd4579a6e628 技术要求!
#TODO:工程标的资格审查也增加第一章的内容。
#good_list 金额 截取上下文 #good_list 金额 截取上下文
if __name__ == "__main__": if __name__ == "__main__":
# 配置日志器 # 配置日志器