|
|
@@ -229,8 +229,7 @@ class BasisReviewService:
|
|
|
match_data = json.loads(match_result)
|
|
|
# 提取items字段(match_reference_files返回{items: [...]}格式)
|
|
|
items = match_data.get('items', match_data) if isinstance(match_data, dict) else match_data
|
|
|
- filtered_data = [item for item in items if not (item.get('same_name_current') == "" and item.get('exact_match_info') == "")]
|
|
|
-
|
|
|
+ filtered_data = [item for item in items if item.get('exact_match_info') != ""]
|
|
|
# 如果没有过滤出数据,直接返回空结果
|
|
|
if not filtered_data:
|
|
|
logger.info(f"过滤后没有符合条件的编制依据,跳过后续检查")
|
|
|
@@ -471,11 +470,7 @@ async def review_all_basis_async(basis_items: BasisItems, max_concurrent: int =
|
|
|
if __name__ == "__main__":
|
|
|
# 直接构造 BasisItems 测试 review_all
|
|
|
test_basis_items = BasisItems(items=[
|
|
|
- BasisItem(title="坠落防护水平生命线装置", suffix="GB 38454", raw="《预应力混凝土用钢绞线》(GB/T5224-2023);"),
|
|
|
- BasisItem(title="电力高处作业防坠器", suffix="DL/T 1147", raw="《电力高处作业防坠器》DL/T 1147"),
|
|
|
- BasisItem(title="坠落防护挂点装置", suffix="GB 30862", raw="《坠落防护挂点装置》GB 30862"),
|
|
|
- BasisItem(title="混凝土结构设计规范", suffix="GB 50010-2010", raw="《混凝土结构设计规范》GB 50010-2010"),
|
|
|
- BasisItem(title="建筑施工组织设计规范", suffix="GB/T 50502-2015", raw="《建筑施工组织设计规范》GB/T 50502-2015"),
|
|
|
+ BasisItem(title="坠落防护水平生命线装置", suffix="GB 38454", raw="8)《建设工程质量管理条例》2019 年4 月23 日修订")
|
|
|
])
|
|
|
|
|
|
print(f"测试 {len(test_basis_items.items)} 项编制依据:")
|