From 4b72174a32cfa3bc7e86fb6a2e1b577a7b39de5b Mon Sep 17 00:00:00 2001 From: mxr612 Date: Tue, 3 Jun 2025 22:16:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=9B=B4=E6=96=B0=E6=99=8B=E6=A1=A3?= =?UTF-8?q?=E5=92=8C=E6=99=8B=E7=BA=A7=E8=AE=B0=E5=BD=95=E6=8F=8F=E8=BF=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改晋档和晋级记录的描述,分别更新为“两年晋档”和“五年晋级” - 确保在处理历史记录时,相关字段的值设置符合新的数据结构 --- main.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index cdf10ad..8034097 100644 --- a/main.py +++ b/main.py @@ -240,13 +240,13 @@ for index, row in BaseData.iterrows(): calctime += relativedelta(years=row["晋档间隔"]) if calctime > nowtime: break - History_pd.loc[len(History_pd)] = [calctime, "", "", "", "", "", "晋档"] + History_pd.loc[len(History_pd)] = [calctime, "", "", "", "", "", "两年晋档"] calctime=row["晋级起始"] while True: # 添加晋级记录 calctime += relativedelta(years=row["晋级间隔"]) if calctime > nowtime: break - History_pd.loc[len(History_pd)] = [calctime, "", "", "", "", "", "晋级"] + History_pd.loc[len(History_pd)] = [calctime, "", "", "", "", "", "五年晋级"] except: raise Exception(f"晋级、档起始时间格式错误:{row['晋档起始']}或{row['晋级起始']}") for rule in Rule_Level: # 工资调标 @@ -266,9 +266,9 @@ for index, row in BaseData.iterrows(): History_pd.at[index, "职务"] = rule["rule"][rule["rule"]["原名称"] == History_pd.iloc[index]["职务"]]["现名称"].values[0] if index > 0 and hrow["级别档次"] == "": jb, dc = split_level(History_pd.iloc[index-1]["级别档次"]) - if hrow["变动原因"] == "晋档": + if hrow["变动原因"] == "两年晋档": History_pd.at[index, "级别档次"] = f"{jb}-{dc+1}" - elif hrow["变动原因"] == "晋级": + elif hrow["变动原因"] == "五年晋级": History_pd.at[index, "级别档次"] = f"{jb-1}-{dc-1}" elif hrow["变动原因"] == "工资调标": History_pd.at[index, "级别档次"] = f"{jb}-{dc}"