在前后端开发联调前 的提交20260223

This commit is contained in:
Neo
2026-02-23 23:02:20 +08:00
parent 254ccb1e77
commit fafc95e64c
1142 changed files with 10366960 additions and 36957 deletions

View File

@@ -244,7 +244,10 @@ def main():
conn.close()
# ── 输出 JSON 报告 ──
report_json = os.path.join("docs", "reports", "api_ods_comparison.json")
_report_root = os.environ.get("ETL_REPORT_ROOT")
if not _report_root:
raise KeyError("环境变量 ETL_REPORT_ROOT 未定义。请在根 .env 中配置。")
report_json = os.path.join(_report_root, "api_ods_comparison.json")
os.makedirs(os.path.dirname(report_json), exist_ok=True)
# 序列化时把 tuple 转 list
json_results = []
@@ -261,7 +264,7 @@ def main():
json.dump(json_results, f, ensure_ascii=False, indent=2)
# ── 输出 Markdown 报告 ──
report_md = os.path.join("docs", "reports", "api_ods_comparison.md")
report_md = os.path.join(_report_root, "api_ods_comparison.md")
with open(report_md, "w", encoding="utf-8") as f:
f.write("# API JSON 字段 vs ODS 表列 对比报告\n\n")
f.write("> 自动生成于 2026-02-13 | 数据来源:数据库实际表结构 + API 参考文档\n")