|
|
@@ -613,7 +613,7 @@ class InterTool:
|
|
|
"chapter_code": chapter_code,
|
|
|
"check_item_code": check_item_code,
|
|
|
"check_result": response,
|
|
|
- "exist_issue": True,
|
|
|
+ "exist_issue": False,
|
|
|
"risk_info": {"risk_level": "low"}
|
|
|
})
|
|
|
|
|
|
@@ -711,6 +711,18 @@ class InterTool:
|
|
|
# 只有当内容不为空,且风险等级不是"无风险"类时,才认为存在问题
|
|
|
exist_issue = not is_empty and original_risk_level not in ["无风险", "无", "通过", "符合要求"]
|
|
|
|
|
|
+ # 额外验证:dict 类型的 issue_data 必须至少包含一个有意义字段
|
|
|
+ # 防止空壳 dict(如 {"risk_level": "中风险"})通过过滤
|
|
|
+ if exist_issue and isinstance(issue_data, dict):
|
|
|
+ meaningful_fields = ["issue_point", "location", "suggestion"]
|
|
|
+ has_meaningful_content = any(
|
|
|
+ bool(issue_data.get(field, "").strip() if isinstance(issue_data.get(field), str) else issue_data.get(field))
|
|
|
+ for field in meaningful_fields
|
|
|
+ )
|
|
|
+ if not has_meaningful_content:
|
|
|
+ exist_issue = False
|
|
|
+ logger.debug(f"检查项 {check_name} 的 issue_data 缺少有意义字段 (issue_point/location/suggestion),设置 exist_issue=False")
|
|
|
+
|
|
|
# 记录调试信息
|
|
|
if is_empty:
|
|
|
logger.debug(f"检查项 {check_name} 的 issue_data 为空,设置 exist_issue=False")
|