|
|
@@ -1023,10 +1023,17 @@ JSON输出:"""
|
|
|
# ── 一致性审查:目录有列但正文无内容 ─────────────────────────────
|
|
|
if outline_result:
|
|
|
for e in outline_result.get("empty_sections", []):
|
|
|
+ f_code = e.get("first_code", "")
|
|
|
f_name = e.get("first_name", "")
|
|
|
+ sec_code = e.get("secondary_code", "")
|
|
|
sec_title = e.get("outline_title") or e.get("secondary_name", "")
|
|
|
location = f"{f_name} > {sec_title}" if f_name else sec_title
|
|
|
|
|
|
+ # 从 secondary_specs 获取 seq
|
|
|
+ sec_item = self.secondary_specs.get((f_code, sec_code))
|
|
|
+ first_seq = sec_item.first_seq if sec_item else 0
|
|
|
+ second_seq = sec_item.second_seq if sec_item else 0
|
|
|
+
|
|
|
# issue_point 和 reason 使用简单拼接(一致性审查)
|
|
|
issue_point = f"【目录正文不一致】'{location}'目录已列但正文无内容"
|
|
|
reason = f"依据《桥梁公司危险性较大工程管理实施细则(2025版)》规定,目录应与正文保持一致。目录页列有'{sec_title}'章节,但正文中未发现对应内容"
|
|
|
@@ -1034,12 +1041,12 @@ JSON输出:"""
|
|
|
# 尝试使用LLM生成 suggestion
|
|
|
llm_result = await self._generate_recommendation_with_llm(
|
|
|
level="一致性",
|
|
|
- first_code="",
|
|
|
+ first_code=f_code,
|
|
|
first_name=f_name,
|
|
|
second_name=sec_title,
|
|
|
outline_title=sec_title,
|
|
|
- first_seq=0,
|
|
|
- second_seq=0
|
|
|
+ first_seq=first_seq,
|
|
|
+ second_seq=second_seq
|
|
|
)
|
|
|
|
|
|
if llm_result and llm_result.get("suggestion"):
|
|
|
@@ -1054,6 +1061,8 @@ JSON输出:"""
|
|
|
"location": location,
|
|
|
"suggestion": suggestion,
|
|
|
"reason": reason,
|
|
|
+ "first_seq": first_seq,
|
|
|
+ "second_seq": second_seq,
|
|
|
})
|
|
|
|
|
|
if not recommendations:
|