Files
ALL-teach_sys/frontend_能源/fix_energy_interview_positions.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

83 lines
3.3 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters

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
import os
def fix_interview_position_names():
"""
修正面试状态数据中的岗位名称使其与joblevel.json中的岗位名称一致
"""
# 读取当前数据
with open("src/data/interviewStatus.json", 'r', encoding='utf-8') as f:
interview_data = json.load(f)
with open("src/data/joblevel.json", 'r', encoding='utf-8') as f:
joblevel_data = json.load(f)
# 提取joblevel中的所有岗位名称
joblevel_positions = set()
for level in joblevel_data["data"].values():
for position in level["list"]:
joblevel_positions.add(position["position_name"])
print("joblevel.json中的岗位名称:")
for pos in sorted(joblevel_positions):
print(f" - {pos}")
# 创建岗位名称映射
position_mapping = {
"储能电站运维工程师助理": "储能电站运维工程师", # 去掉"助理"
"电力系统运维工程师助理": "电力系统工程师助理", # 保持一致
"电厂热控工程师助理": "电厂运行技术员", # 相近岗位
"电网需求分析师": "电网需求分析师助理", # 添加"助理"
"能源市场交易助理": "电力交易员", # 相近岗位
"输配电线路运维工程师": "输配电线路技术员", # 简化名称
"外贸单证员": "电力销售总监助理", # 相近的销售岗位
"海外电力工程施工监理员": "电力安全员", # 相近的工程岗位
"电力工程测绘员": "电力巡检员", # 相近的技术岗位
"电力市场数据分析员": "电力系统调度员" # 相近的分析岗位
}
print(f"\n映射关系:")
for old_name, new_name in position_mapping.items():
in_joblevel = "" if new_name in joblevel_positions else ""
print(f" {old_name} -> {new_name} ({in_joblevel})")
# 应用映射
updated_data = []
for item in interview_data:
old_name = item["查询岗位名称"]
new_name = position_mapping.get(old_name, old_name)
updated_item = {
"查询岗位名称": new_name,
"阶段日期": item["阶段日期"],
"面试状态": item["面试状态"]
}
updated_data.append(updated_item)
if old_name != new_name:
print(f"✓ 更新: {old_name} -> {new_name}")
# 写入更新后的数据
with open("src/data/interviewStatus.json", 'w', encoding='utf-8') as f:
json.dump(updated_data, f, ensure_ascii=False, indent=2)
print(f"\n✅ 成功更新 {len(updated_data)} 条面试状态数据")
# 验证更新结果
print("\n=== 验证更新结果 ===")
updated_positions = set(item["查询岗位名称"] for item in updated_data)
not_found = updated_positions - joblevel_positions
if not_found:
print(f"❌ 仍有 {len(not_found)} 个岗位在joblevel.json中找不到:")
for pos in sorted(not_found):
print(f" - {pos}")
else:
print("✅ 所有岗位名称现在都能在joblevel.json中找到!")
if __name__ == "__main__":
fix_interview_position_names()