feat: 更新工龄计算逻辑以包含学龄信息

- 修改工龄计算公式,增加学龄字段的影响,确保计算结果更准确
- 调整相关单元格的值设置,提升数据的完整性和准确性
This commit is contained in:
Miu Li 2025-06-03 22:18:34 +08:00
parent 4b72174a32
commit 36f6fd949c

View File

@ -326,9 +326,9 @@ for index, row in BaseData.iterrows(): # 汇总
ws.cell(row=6+index, column=4, value=format_time(row["出生年月"], "出生年月")) ws.cell(row=6+index, column=4, value=format_time(row["出生年月"], "出生年月"))
ws.cell(row=6+index, column=5, value=format_time(row["参加工作时间"], "参加工作时间")) ws.cell(row=6+index, column=5, value=format_time(row["参加工作时间"], "参加工作时间"))
ws.cell(row=6+index, column=6, value=row["学历"]) ws.cell(row=6+index, column=6, value=row["学历"])
ws.cell(row=6+index, column=7, value=nowtime.year-row["参加工作时间"].year+row["工龄调增"]-row["工龄调减"]+1) ws.cell(row=6+index, column=7, value=nowtime.year-row["参加工作时间"].year+row["工龄调增"]-row["工龄调减"]+1+row["学龄"])
ws.cell(row=6+index, column=8, value=nowtime.year-row["参加工作时间"].year) ws.cell(row=6+index, column=8, value=nowtime.year-row["参加工作时间"].year+row["工龄调增"]-row["工龄调减"]+1)
ws.cell(row=6+index, column=9, value=row["工龄调增"]) ws.cell(row=6+index, column=9, value=row["学龄"])
ws.cell(row=6+index, column=10, value=row["工龄调减"]) ws.cell(row=6+index, column=10, value=row["工龄调减"])
ws.cell(row=6+index, column=11, value=row["Latest_Role"]) ws.cell(row=6+index, column=11, value=row["Latest_Role"])
ws.cell(row=6+index, column=12, value=format_time(row["Latest_Prom"], "Latest_Prom")) ws.cell(row=6+index, column=12, value=format_time(row["Latest_Prom"], "Latest_Prom"))