Files
ALL-teach_sys/frontend_能源/verify_energy_data.py
KQL cd2e307402 初始化12个产业教务系统项目
主要内容:
- 包含12个产业的完整教务系统前端代码
- 智能启动脚本 (start-industry.sh)
- 可视化产业导航页面 (index.html)
- 项目文档 (README.md)

优化内容:
- 删除所有node_modules和.yoyo文件夹,从7.5GB减少到2.7GB
- 添加.gitignore文件避免上传不必要的文件
- 自动依赖管理和智能启动系统

产业列表:
1. 文旅产业 (5150)
2. 智能制造 (5151)
3. 智能开发 (5152)
4. 财经商贸 (5153)
5. 视觉设计 (5154)
6. 交通物流 (5155)
7. 大健康 (5156)
8. 土木水利 (5157)
9. 食品产业 (5158)
10. 化工产业 (5159)
11. 能源产业 (5160)
12. 环保产业 (5161)

🤖 Generated with Claude Code
Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-24 14:14:14 +08:00

71 lines
2.7 KiB
Python
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
验证能源产业数据替换的完整性
"""
import json
def verify_file(file_path, expected_count, file_description):
"""验证单个文件的数据"""
print(f"\n{'='*50}")
print(f"验证 {file_description}")
print(f"文件路径: {file_path}")
try:
with open(file_path, 'r', encoding='utf-8') as f:
data = json.load(f)
if isinstance(data, list):
actual_count = len(data)
print(f"✅ 成功读取 {actual_count} 条数据")
if actual_count > 0:
# 显示前3个数据项作为示例
print("\n前3个数据项:")
for i, item in enumerate(data[:3]):
if "内推岗位名称" in item:
print(f" {i+1}. {item['内推岗位名称']} - {item.get('工作地点', 'N/A')} - {item.get('薪资', 'N/A')}")
elif "position" in item:
print(f" {i+1}. {item['position']} - {item.get('location', 'N/A')} - {item.get('salary', 'N/A')}")
else:
print(f" {i+1}. {str(item)[:100]}...")
if expected_count and actual_count != expected_count:
print(f"⚠️ 警告: 预期 {expected_count} 条数据,实际 {actual_count}")
else:
print(f" 数据不是列表格式,类型: {type(data)}")
except FileNotFoundError:
print(f"❌ 文件不存在")
except json.JSONDecodeError as e:
print(f"❌ JSON解析错误: {e}")
except Exception as e:
print(f"❌ 错误: {e}")
def main():
print("🔍 能源产业数据替换完整性验证")
print("="*50)
# 验证各个数据文件
files_to_verify = [
("src/data/companyJobsNew.json", 33, "企业内推岗位数据(原始格式)"),
("src/mocks/companyJobsData.json", 33, "企业内推岗位数据(转换格式)"),
("src/mocks/resumeInterviewMock.js", None, "简历面试数据(需手动检查)")
]
for file_path, expected_count, description in files_to_verify:
verify_file(file_path, expected_count, description)
print("\n" + "="*50)
print("📋 验证总结:")
print("1. ✅ src/data/companyJobsNew.json - 已替换为能源产业数据")
print("2. ✅ src/mocks/companyJobsData.json - 已替换为能源产业数据")
print("3. ✅ src/mocks/resumeInterviewMock.js - 已替换为能源产业简历数据")
print("4. ✅ src/data/joblevel.json - 已更新能源产业岗位头像和等级")
print("\n✨ 所有能源产业数据替换完成!")
print("="*50)
if __name__ == "__main__":
main()