39 lines
1.3 KiB
Python
39 lines
1.3 KiB
Python
# -*- coding: utf-8 -*-
|
|
"""临时验证:技师岗/黄泥磅 是否在考勤方案列表中存在。验证后删除。"""
|
|
import os
|
|
import sys
|
|
|
|
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
|
|
from seal_data_export import (
|
|
HR_BASE_URL, build_hr_session, hr_request_json, fetch_cur_user_info, _clean,
|
|
)
|
|
|
|
TEAM_LIST_URL = f"{HR_BASE_URL}/RedseaPlatform/redmagicapi/rf_p_kq_team_ajax_list/redApiExec.mc"
|
|
BASE = {
|
|
"struTreeCode": "cq37du",
|
|
"struId": "596bae33-50e9-11ec-b526-822ff8ed5b28",
|
|
"rule_name": "", "dk_num_type": "", "type": "", "containLower": "",
|
|
"team_name": "", "work_date_name": "", "paiban_type": "",
|
|
"IN_USE": "1", "start": "0", "sortType": "desc",
|
|
"sortName": "t.operate_time", "pageNo": "1", "pageSize": "50",
|
|
}
|
|
|
|
|
|
def probe(label, **overrides):
|
|
params = dict(BASE)
|
|
params.update(overrides)
|
|
d = hr_request_json(session, "POST", TEAM_LIST_URL, params, "考勤方案列表")
|
|
data = d.get("data") or {}
|
|
lst = data.get("list") or []
|
|
print(f"--- {label}: total={data.get('total')}")
|
|
for x in lst:
|
|
print(" ", _clean(x.get("teamName")))
|
|
|
|
|
|
session = build_hr_session()
|
|
fetch_cur_user_info(session)
|
|
|
|
probe("team_name=技师岗", team_name="技师岗")
|
|
probe("team_name=黄泥磅", team_name="黄泥磅")
|
|
probe("team_name=技师", team_name="技师")
|