fix: 拆除后工参改用拆除日下一周的周一

停闭后一周的指标周三就有、下一周周一的工参周四才取,中间这一天周边站先按拆除前工参算,并在结果说明里写明。
This commit is contained in:
2026-11-12 14:57:19 +08:00
parent 62b72bb130
commit 9225d7e45b
7 changed files with 32 additions and 23 deletions
+4 -4
View File
@@ -411,8 +411,8 @@ def before_monday(removal: date, today: date) -> date:
def after_monday(removal: date, today: date) -> date | None:
"""拆除后工参:拆除日当周的周一。那一天还取不到时没有拆除后工参。"""
day = monday_of(removal)
"""拆除后工参:拆除日下一周的周一。那一天还取不到时没有拆除后工参。"""
day = monday_of(removal) + timedelta(days=7)
return day if day <= latest_monday(today) else None
@@ -435,9 +435,9 @@ async def pick_before(store: GongcanStore, city: str, target: Target, removal: d
async def pick_after(store: GongcanStore, city: str, target: Target, removal: date, today: date) -> AfterPick | None:
"""拆除后用的工参日期:拆除日当周的周一。
"""拆除后用的工参日期:拆除日下一周的周一。
这一天通常还在拆除日之前,目标仍在工参里是正常的,只做标记。还取不到这一天时返回 None。
拆掉的小区有时还留在工参里,这是正常的,只做标记。还取不到这一天时返回 None。
"""
day = after_monday(removal, today)
if day is None: