瀏覽代碼

style:格式调整

WangXuMing 3 周之前
父節點
當前提交
9cd78696b6

+ 1 - 1
core/construction_review/component/doc_worker/config/StandardCategoryTable.csv

@@ -1,4 +1,4 @@
-first_contents_code,first_contents,second_contents_code,second_contents,second_focus,third_contents_code,third_contents,third_focus
+first_code,first_zh_code,second_code,second_zh_code,second_focus,third_code,third_zh_code,third_focus
 basis,编制依据,LawsAndRegulations,法律法规,NULL,NationalLawsAndRegulations,国家政府发布的法律法规与规章制度,[国家级、非省级]、法律、法规、规章、强制力、普遍适用、基础框架、顶层设计、行业准则、合规性、统一标准、权威性、强制性条文、基本要求,注意项:[]中的要求为必须满足,如果不满足此条件,则不能将相关内容分入当前类。
 basis,编制依据,LawsAndRegulations,法律法规,NULL,ProvincialLawsAndRegulationsOfProjectLocation,工程所在地省级政府发布的法律法规与规章制度,[地方性、区域性、非国家级]、细化补充、因地制宜、执行细则、地方特色、适应性要求、属地管理、动态调整、配套政策、本地化实施。
 basis,编制依据,StandardsAndSpecifications,标准规范,NULL,IndustryStandards,行业标准,需符合国家/行业强制或推荐性标准(如GB/T、JTG等)、时效性强(需跟踪最新版)、覆盖全生命周期(设计→施工→运维)、是定义工程项目的最低技术要求、质量验收准则、安全红线。

File diff suppressed because it is too large
+ 0 - 45
core/construction_review/component/doc_worker/config/construction_plan_standards.csv


+ 44 - 0
core/construction_review/component/doc_worker/config/remove_prefix.py

@@ -0,0 +1,44 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+"""
+去除 construction_plan_standards.csv 中 first_zh_code 列前的序号
+"""
+
+import csv
+import re
+from pathlib import Path
+
+# 文件路径
+CSV_PATH = Path(__file__).parent / "construction_plan_standards.csv"
+
+def remove_chinese_number_prefix(text):
+    """去除中文数字序号前缀,如 '一、'、'二、' 等"""
+    # 匹配中文数字+顿号的模式
+    pattern = r'^[一二三四五六七八九十]+、'
+    return re.sub(pattern, '', text)
+
+def main():
+    # 读取CSV文件
+    rows = []
+    with open(CSV_PATH, 'r', encoding='utf-8-sig') as f:
+        reader = csv.DictReader(f)
+        fieldnames = reader.fieldnames
+        print(f"列名: {fieldnames}")
+        for row in reader:
+            old_value = row.get('first_zh_code', '')
+            new_value = remove_chinese_number_prefix(old_value)
+            if old_value != new_value:
+                print(f"修改: '{old_value}' -> '{new_value}'")
+            row['first_zh_code'] = new_value
+            rows.append(row)
+
+    # 写回CSV文件(不带BOM)
+    with open(CSV_PATH, 'w', encoding='utf-8', newline='') as f:
+        writer = csv.DictWriter(f, fieldnames=fieldnames)
+        writer.writeheader()
+        writer.writerows(rows)
+
+    print(f"已处理 {len(rows)} 行数据,序号已去除。")
+
+if __name__ == "__main__":
+    main()

File diff suppressed because it is too large
+ 45 - 0
core/construction_review/component/doc_worker/config/第四章_专项施工方案内容要求_完整版(1).csv


Some files were not shown because too many files changed in this diff