This commit is contained in:
2025-09-10 13:20:52 +08:00
parent f788335ba2
commit 20e3a294ea
2 changed files with 66438 additions and 5 deletions

66432
Data/SchoolArea.json Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -136,7 +136,8 @@ try:
area_code = 'unknown' area_code = 'unknown'
name_conversion_errors.append(f"{row_num}: '{raw_name}'") name_conversion_errors.append(f"{row_num}: '{raw_name}'")
area_data = { # 循环中创建区域数据字典(重命名变量)
current_area_data = {
'area_name': area_name, 'area_name': area_name,
'area_code': area_code, 'area_code': area_code,
'raw_name': raw_name 'raw_name': raw_name
@@ -231,10 +232,10 @@ try:
year_data['teaching_total'] = 0 year_data['teaching_total'] = 0
stage_data[str(year)] = year_data stage_data[str(year)] = year_data
area_data[stage] = stage_data # 修复:将阶段数据添加到当前区域字典,而非区域列表
current_area_data[stage] = stage_data
# 修复:将字典变量重命名并添加到列表 # 将当前区域数据添加到列表
current_area_data = area_data
area_data.append(current_area_data) area_data.append(current_area_data)
workbook.close() workbook.close()