[Build 1.1.4] fix: 修复个人档案表格中出生年月和工作时间格式问题

调整了表格中出生年月和参加工作时间的格式处理,将格式转换函数应用到正确的单元格位置。同时优化了列顺序,确保职务2和晋升日期显示在正确的位置。
This commit is contained in:
Miu Li 2025-05-27 19:34:04 +08:00
parent a2c5a7179e
commit 286a4dc352
2 changed files with 3 additions and 3 deletions

View File

@ -291,16 +291,16 @@ for index, row in BaseData.iterrows(): # 汇总
ws.cell(row=6+index, column=1, value=index+1) ws.cell(row=6+index, column=1, value=index+1)
ws.cell(row=6+index, column=2, value=row["姓名"]) ws.cell(row=6+index, column=2, value=row["姓名"])
ws.cell(row=6+index, column=3, value=row["性别"]) ws.cell(row=6+index, column=3, value=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=6, value=row["学历"]) ws.cell(row=6+index, column=6, value=row["学历"])
ws.cell(row=6+index, column=7, value=relativedelta(nowtime, row["入职时间"]).years+row["工龄调增"]-row["工龄调减"]+1) ws.cell(row=6+index, column=7, value=relativedelta(nowtime, row["入职时间"]).years+row["工龄调增"]-row["工龄调减"]+1)
ws.cell(row=6+index, column=8, value=relativedelta(nowtime, row["入职时间"]).years) ws.cell(row=6+index, column=8, value=relativedelta(nowtime, row["入职时间"]).years)
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=13, value=row["职务2"])
ws.cell(row=6, column=8, value=format_time(row["出生年月"]))
ws.cell(row=6, column=10, value=format_time(row["参加工作时间"]))
ws.cell(row=6+index, column=12, value=format_time(row["Latest_Prom"])) ws.cell(row=6+index, column=12, value=format_time(row["Latest_Prom"]))
ws.cell(row=6+index, column=13, value=row["职务2"])
ws.cell(row=6+index, column=14, value=format_time(row["日期2"])) ws.cell(row=6+index, column=14, value=format_time(row["日期2"]))
except Exception as e: except Exception as e:
logging.error(f"{row['身份证号码']}:{e}") logging.error(f"{row['身份证号码']}:{e}")

0
个人台账/.gitkeep Normal file
View File