[Build 1.3.2] fix: 修正晋级逻辑以处理边界条件

- 更新“五年晋级”处理逻辑,增加对级别和角色限制的检查
- 确保在晋级时,级别档次的计算符合新的业务规则
This commit is contained in:
Miu Li 2025-06-09 17:57:34 +08:00
parent 4def3c7dc6
commit f00cd31e46

View File

@ -280,6 +280,9 @@ for index, row in BaseData.iterrows():
if hrow["变动原因"] == "两年晋档":
History_pd.at[index, "级别档次"] = f"{jb}-{dc+1}"
elif hrow["变动原因"] == "五年晋级":
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}"