待补平差检查和上传逻辑

This commit is contained in:
2026-05-26 14:40:04 +08:00
parent 19afa3d19b
commit 10db652cbc
18 changed files with 217 additions and 29 deletions

View File

@@ -325,7 +325,8 @@ def get_work_conditions_by_linecode(linecode: str) -> Optional[Dict[str, Dict]]:
while retry_count < max_retries:
try:
# 准备请求参数
payload = {"linecode": linecode}
account_id = global_variable.GLOBAL_ACCOUNT_ID
payload = {"linecode": linecode, "account_id": account_id}
headers = {
'Content-Type': 'application/json',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36'
@@ -422,7 +423,8 @@ def get_user_max_variation(username: str) -> Optional[int]:
# 1. 准备请求参数与头部
# 接口要求的POST参数JSON格式
payload = {"username": username}
account_id = global_variable.GLOBAL_ACCOUNT_ID
payload = {"username": username, "account_id": account_id}
# 请求头部指定JSON格式模拟浏览器UA避免被接口拦截
headers = {
"Content-Type": "application/json",