1.新增gitignore文件

2.新启动脚本制作
This commit is contained in:
2026-01-30 11:41:05 +08:00
parent 838453b88f
commit f0fcea03bb
4 changed files with 245 additions and 14 deletions
+10 -12
View File
@@ -81,7 +81,7 @@ def batch_disable_projects(data: Dict[str, Any], cookies: Dict[str, str], df: pd
cookies=cookies,
json=json_data,
)
time.sleep(3.5)
time.sleep(1)
response.raise_for_status()
all_project_list = []
total_pages = response.json().get("data", {}).get("totalPages", 0)
@@ -101,7 +101,7 @@ def batch_disable_projects(data: Dict[str, Any], cookies: Dict[str, str], df: pd
cookies=cookies,
json=json_data,
)
time.sleep(3.5)
time.sleep(1)
response.raise_for_status()
project_list = response.json().get("data", {}).get("records", [])
all_project_list.extend(project_list)
@@ -159,7 +159,7 @@ def batch_disable_projects(data: Dict[str, Any], cookies: Dict[str, str], df: pd
cookies=cookies,
json=json_data,
)
time.sleep(3.5)
time.sleep(2)
response.raise_for_status() # 抛出HTTP错误
# 检查业务响应码
resp_data = response.json()
@@ -287,7 +287,6 @@ def batch_modify_materials(data: Dict[str, Any], cookies: Dict[str, str], df: pd
cookies=cookies,
json=json_data,
)
time.sleep(3.5)
response.raise_for_status()
total_pages = response.json().get("data", {}).get("totalPages", 0)
logger.info(f"材料列表页数: {total_pages}")
@@ -302,7 +301,7 @@ def batch_modify_materials(data: Dict[str, Any], cookies: Dict[str, str], df: pd
cookies=cookies,
json=json_data,
)
time.sleep(3.5)
time.sleep(1)
resp.raise_for_status()
records = resp.json().get("data", {}).get("records", [])
all_materials_list.extend(records)
@@ -369,7 +368,7 @@ def batch_modify_materials(data: Dict[str, Any], cookies: Dict[str, str], df: pd
params=params,
cookies=cookies,
)
time.sleep(3.5)
time.sleep(1)
if materials_response.status_code != 200:
error_msg = f'获取明细失败: {materials_response.status_code}'
results.append({'材料编码': custom_code, '状态': error_msg})
@@ -423,7 +422,7 @@ def batch_modify_materials(data: Dict[str, Any], cookies: Dict[str, str], df: pd
cookies=cookies,
json=detail
)
time.sleep(3.5)
time.sleep(2)
if update_resp.status_code == 200 and update_resp.json().get("code") == 200:
results.append({'材料编码': custom_code, '状态': '修改成功'})
@@ -572,7 +571,7 @@ def batch_modify_projects(data: Dict[str, Any], cookies: Dict[str, str], df: pd.
cookies=cookies,
data={'idOwnOrg': org_id}
)
time.sleep(3.5)
time.sleep(1)
init_add_resp.raise_for_status()
service_category_list = init_add_resp.json().get("data", {}).get("serviceCategory", [])
category_name_to_pk = {item["name"]: item["pkId"] for item in service_category_list}
@@ -600,7 +599,6 @@ def batch_modify_projects(data: Dict[str, Any], cookies: Dict[str, str], df: pd.
cookies=cookies,
json=json_data,
)
time.sleep(3.5)
response.raise_for_status()
total_pages = response.json().get("data", {}).get("totalPages", 0)
logger.info(f"项目列表总页数: {total_pages}")
@@ -615,7 +613,7 @@ def batch_modify_projects(data: Dict[str, Any], cookies: Dict[str, str], df: pd.
cookies=cookies,
json=json_data,
)
time.sleep(3.5)
time.sleep(1)
resp.raise_for_status()
records = resp.json().get("data", {}).get("records", [])
all_project_list.extend(records)
@@ -742,7 +740,7 @@ def batch_modify_projects(data: Dict[str, Any], cookies: Dict[str, str], df: pd.
params=params,
cookies=cookies,
)
time.sleep(3.5)
time.sleep(1)
if detail_resp.status_code != 200:
error_msg = f'获取明细失败: {detail_resp.status_code}'
results.append({'项目编码': custom_code, '状态': error_msg})
@@ -816,7 +814,7 @@ def batch_modify_projects(data: Dict[str, Any], cookies: Dict[str, str], df: pd.
cookies=cookies,
json=detail
)
time.sleep(3.5)
time.sleep(2)
if update_resp.status_code == 200 and update_resp.json().get("code") == 200:
results.append({'项目编码': custom_code, '状态': '修改成功'})