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

72 lines
2.6 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 shutil
from datetime import datetime
def update_energy_interview_status_with_labels():
"""更新能源产业面试状态数据,包含流程标签和完整时间"""
# 备份原有数据
backup_file = f"src/data/interviewStatus.json.backup_{datetime.now().strftime('%Y%m%d_%H%M%S')}"
shutil.copy('src/data/interviewStatus.json', backup_file)
print(f"已创建备份文件: {backup_file}")
# 读取能源面试状态数据
with open('网页未导入数据/能源产业/能源岗位面试状态.json', 'r', encoding='utf-8') as f:
energy_status = json.load(f)
# 转换数据格式
converted_status = []
for item in energy_status:
# 构建阶段日期字段 - 包含流程标签和完整时间
stage = item['岗位内推流程']
flow_label = item.get('流程标签', '')
flow_time = item['流程时间'] # 保留完整时间 "2025/7/2 0:00"
# 映射流程阶段名称
stage_map = {
'HR评估': 'HR评估',
'面试': '面试',
'面试结果': '面试结果',
'Offer': 'Offer'
}
stage_name = stage_map.get(stage, stage)
# 构建显示格式:流程标签 | 阶段:时间
if flow_label:
stage_date_str = f"{flow_label} | {stage_name}{flow_time}"
else:
stage_date_str = f"{stage_name}{flow_time}"
# 创建转换后的记录
converted_item = {
"查询岗位名称": item['查询岗位名称'],
"阶段日期": stage_date_str,
"面试状态": item['内容'],
"流程标签": flow_label, # 保留流程标签字段
"流程时间": flow_time # 保留完整时间字段
}
converted_status.append(converted_item)
# 写入转换后的数据
with open('src/data/interviewStatus.json', 'w', encoding='utf-8') as f:
json.dump(converted_status, f, ensure_ascii=False, indent=2)
print(f"已成功更新面试状态数据:")
print(f"- 能源产业面试状态记录数: {len(converted_status)}")
print(f"- 备份文件: {backup_file}")
# 显示前5条记录
print("\n已更新的面试状态示例:")
for i, item in enumerate(converted_status[:5], 1):
print(f"{i}. {item['查询岗位名称']}:")
print(f" 阶段日期: {item['阶段日期']}")
print(f" 面试状态: {item['面试状态']}")
if __name__ == "__main__":
update_energy_interview_status_with_labels()