Files
online_sys/frontend_财经商贸/update_interview_status.py
KQL a7242f0c69 Initial commit: 教务系统在线平台
- 包含4个产业方向的前端项目:智能开发、智能制造、大健康、财经商贸
- 已清理node_modules、.yoyo等大文件,项目大小从2.6GB优化至631MB
- 配置完善的.gitignore文件

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-12 18:16:55 +08:00

72 lines
2.9 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
# 读取智能制造岗位面试状态数据
with open('网页未导入数据/智能制造产业/智能制造岗位面试状态.json', 'r', encoding='utf-8') as f:
smart_data = json.load(f)
# 转换数据格式
converted_data = []
for item in smart_data:
# 构建阶段日期和面试状态字段
stage_date = ""
interview_status = ""
# 根据流程标签确定状态
if item['流程标签'] == '收到Offer':
# 有剩余时间的Offer状态
if item.get('剩余时间'):
stage_date = f"收到Offer{item['流程时间']}"
interview_status = f"{item['内容']}"
else:
stage_date = f"收到Offer{item['流程时间']}"
interview_status = "收到Offer等待答复"
elif item['流程标签'] == 'Offer已接受':
stage_date = f"Offer已接受{item['流程时间']}"
interview_status = "Offer已接受岗位内推结束"
elif item['流程标签'] == 'Offer已拒绝':
stage_date = f"Offer已拒绝{item['流程时间']}"
interview_status = "Offer已拒绝岗位内推结束"
elif item['流程标签'] == '面试未通过':
stage_date = f"面试未通过:{item['流程时间']}"
interview_status = "岗位内推结束"
elif item['流程标签'] == '简历未通过':
stage_date = f"简历未通过:{item['流程时间']}"
interview_status = "岗位内推结束"
elif item['流程标签'] == '面试中':
stage_date = f"面试中:{item['流程时间']}"
interview_status = item.get('内容', '面试进行中')
elif item['流程标签'] == '已投递':
stage_date = f"已投递:{item['流程时间']}"
interview_status = item.get('内容', '简历已投递,等待审核')
else:
# 其他状态
stage_date = f"{item['流程标签']}{item['流程时间']}"
interview_status = item.get('内容', item['流程标签'])
converted_item = {
"查询岗位名称": item['查询岗位名称'],
"阶段日期": stage_date,
"面试状态": interview_status
}
converted_data.append(converted_item)
# 备份原文件
import shutil
from datetime import datetime
backup_name = f"src/data/interviewStatus.json.backup_{datetime.now().strftime('%Y%m%d_%H%M%S')}"
shutil.copy('src/data/interviewStatus.json', backup_name)
print(f"✅ 已备份原文件到: {backup_name}")
# 写入新数据
with open('src/data/interviewStatus.json', 'w', encoding='utf-8') as f:
json.dump(converted_data, f, ensure_ascii=False, indent=2)
print(f"✅ 成功更新面试状态数据!")
print(f"- 转换了 {len(converted_data)} 条记录")
print(f"- 第一条记录: {converted_data[0]['查询岗位名称']}")
print(f"- 状态: {converted_data[0]['面试状态']}")