fix(plugin): XQ0004 1.2.1 延时加班推送只展示加班时段,不展示加班天数

- 延时加班按小时计,推送里去掉「加班天数」,改展示加班起止时段;
  休息日/法定假日仍按天计,展示逻辑不变
- 插件版(report/overtime_report.py)与影刀版(overtime_approval.py)同步
This commit is contained in:
2026-11-16 11:27:52 +08:00
parent 206f3ea226
commit 640d41adbe
4 changed files with 16 additions and 3 deletions
@@ -785,12 +785,16 @@ def _format_overtime_block(r):
end = info.get("加班结束时间")
if start or end:
lines.append(f"> 加班时段:{start or ''} ~ {end or ''}")
# 延时加班不展示加班天数,改展示加班时段(休息日/法定假日仍按天计)
is_delayed = "延时加班" in (info.get("加班类型") or "")
for key, label in [("加班时长(小时)", "加班时长"), ("加班天数(天)", "加班天数"),
("系统判定加班时间", "系统判定时间"),
("计算加班时长(小时)", "计算时长"),
("有效加班时长(小时)", "有效时长"),
("弹性扣减(小时)", "弹性扣减"),
("申报天数(天)", "申报天数")]:
if key == "加班天数(天)" and is_delayed:
continue
val = info.get(key)
if val is not None and val != "" and val != "无":
lines.append(f"> {label}:{val}")