From f00cd31e46efa0877ed7db02f7b2120035975c2c Mon Sep 17 00:00:00 2001 From: mxr612 Date: Mon, 9 Jun 2025 17:57:34 +0800 Subject: [PATCH] =?UTF-8?q?[Build=201.3.2]=20fix:=20=E4=BF=AE=E6=AD=A3?= =?UTF-8?q?=E6=99=8B=E7=BA=A7=E9=80=BB=E8=BE=91=E4=BB=A5=E5=A4=84=E7=90=86?= =?UTF-8?q?=E8=BE=B9=E7=95=8C=E6=9D=A1=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 更新“五年晋级”处理逻辑,增加对级别和角色限制的检查 - 确保在晋级时,级别档次的计算符合新的业务规则 --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 3819fb9..5d4e263 100644 --- a/main.py +++ b/main.py @@ -280,7 +280,10 @@ for index, row in BaseData.iterrows(): if hrow["变动原因"] == "两年晋档": History_pd.at[index, "级别档次"] = f"{jb}-{dc+1}" elif hrow["变动原因"] == "五年晋级": - History_pd.at[index, "级别档次"] = f"{jb-1}-{dc-1}" + if jb-1 < 1 or jb-1 < role_limit(History_pd.iloc[index]["职务"]): + History_pd.at[index, "级别档次"] = f"{jb}-{dc+1}" + else: + History_pd.at[index, "级别档次"] = f"{jb-1}-{dc-1}" elif hrow["变动原因"] == "工资调标": History_pd.at[index, "级别档次"] = f"{jb}-{dc}" elif hrow["变动原因"] == "晋升":