diff --git a/main.py b/main.py index a172d43..36a8624 100644 --- a/main.py +++ b/main.py @@ -380,6 +380,8 @@ def main(): for rule in Rule_Level: if row["入职时间"] < rule["start"]: History_pd.loc[len(History_pd),["变动后时间","变动原因"]] = [rule["start"], "工资调标"] + History_pd["身份证号码"] = row["身份证号码"] + History_pd["姓名"] = row["姓名"] History_pd["工龄"] = History_pd.apply(lambda x: calculate_seniority(row, x["变动后时间"]), axis=1) History_pd = History_pd.sort_values(by="时间").reset_index(drop=True) @@ -444,8 +446,6 @@ def main(): fill_history_info(ws, History_pd)# 填充历史记录 # 将当前人员的历史记录添加到总表中 - History_pd["身份证号码"] = row["身份证号码"] - History_pd["姓名"] = row["姓名"] all_history = pd.concat([all_history, History_pd], ignore_index=True) wb.save(f"个人台账/{row['身份证号码']}_{row['姓名']}.xlsx")