履约表日期调整
This commit is contained in:
@@ -137,7 +137,7 @@ class GDMatchPhoneNumber:
|
||||
if count > 150:
|
||||
params.update({"key": "f61b09d406ac49f8a034bf585e60c442"})
|
||||
res = requests.get(url=url, params=params)
|
||||
# print(res.json())
|
||||
# print(res.json.json())
|
||||
return res.json().get("pois", [])
|
||||
|
||||
# 初始搜索关键词
|
||||
|
||||
@@ -218,7 +218,7 @@ class CommonModule:
|
||||
|
||||
def get_jcb_details(self, ):
|
||||
"""
|
||||
从固定的数据库中获取前几天的NGV明细。
|
||||
从固定的数据库中获取前几天的借车宝。
|
||||
参数 `days_back` 表示相对于今天的天数偏移量,默认为1(即前一天)。
|
||||
返回包含NGV明细的pandas DataFrame。
|
||||
"""
|
||||
|
||||
@@ -122,7 +122,7 @@ class APIClient:
|
||||
def __init__(self):
|
||||
self.headers = {
|
||||
'Authorization': Config.JIANDAOYUN_API_TOKEN,
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json.json'
|
||||
}
|
||||
|
||||
def request(self, url, payload, method='POST'):
|
||||
|
||||
@@ -100,28 +100,12 @@ class ImportPerformanceData:
|
||||
time_columns = ['saas开户时间', '服务期起始时间', '下单支付成功时间', '操作时间',
|
||||
"下单支付成功日期", "服务期结束时间"]
|
||||
|
||||
for col in tqdm(time_columns):
|
||||
if col in tqdm(new_df.columns): # 安全检查列是否存在
|
||||
try:
|
||||
# 1. 转换为datetime(自动推断格式,处理无效值为NaT)
|
||||
new_df[col] = pd.to_datetime(new_df[col], errors='coerce', utc=False)
|
||||
|
||||
# 2. 时区转换(仅对有效日期操作)
|
||||
mask = new_df[col].notna() # 只处理非空值
|
||||
if mask.any(): # 如果有有效日期才转换
|
||||
# 本地化为北京时间,然后转换为UTC
|
||||
new_df.loc[mask, col + '_utc'] = (
|
||||
new_df.loc[mask, col]
|
||||
.dt.tz_localize('Asia/Shanghai', ambiguous='infer', nonexistent='shift_forward')
|
||||
.dt.tz_convert('UTC')
|
||||
.dt.strftime('%Y-%m-%dT%H:%M:%SZ')
|
||||
)
|
||||
else:
|
||||
new_df[col + '_utc'] = pd.NA # 全部为空时保持一致性
|
||||
|
||||
except Exception as e:
|
||||
print(f"处理列 {col} 时出错: {str(e)}")
|
||||
new_df[col + '_utc'] = pd.NA # 出错时设为NA
|
||||
new_df[time_columns] = new_df[time_columns].apply(
|
||||
lambda col: pd.to_datetime(col, errors='coerce')
|
||||
.dt.tz_localize('Asia/Shanghai') # 假设原时间是北京时间
|
||||
.dt.tz_convert('UTC') # 转为 UTC
|
||||
.dt.strftime('%Y-%m-%d %H:%M:%S') # 格式化为字符串(无时区标记)
|
||||
)
|
||||
|
||||
return new_df
|
||||
|
||||
|
||||
@@ -13,3 +13,5 @@
|
||||
2025-11-18 09:16:52,668 - update_BI_CRM_info.py - error_task_logger - ERROR - 任务简道云海外项目CRM客户档案迁移BI执行失败。
|
||||
2025-11-18 09:17:05,585 - update_BI_CRM_info.py - error_task_logger - ERROR - 导入数据时发生错误: 1054 (42S22): Unknown column 'nan' in 'field list'
|
||||
2025-11-18 09:17:05,912 - update_BI_CRM_info.py - error_task_logger - ERROR - 任务简道云海外项目CRM客户档案迁移BI执行失败。
|
||||
2025-11-27 09:08:41,105 - common_module.py - error_task_logger - ERROR - 获取借车宝NGV明细时出错: Length mismatch: Expected axis has 0 elements, new values have 16 elements
|
||||
2025-11-27 09:08:41,278 - JCB_efficient_car_pickup.py - error_task_logger - ERROR - 接车宝日常派发执行出错:获取接车宝数据失败,返回None
|
||||
|
||||
@@ -39,7 +39,7 @@ class update_ID_form:
|
||||
def __init__(self):
|
||||
self.headers = {
|
||||
'Authorization': 'Bearer qygHulymo1fekJk4CIZyNKjyQAzG8CFN', # 曹伟应用api测试 app_key
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json.json'
|
||||
}
|
||||
self.url = "https://api.jiandaoyun.com/api/v5/corp/department/user/list"
|
||||
self.payload1 = {
|
||||
@@ -82,7 +82,7 @@ class update_ID_form:
|
||||
|
||||
headers = {
|
||||
'Authorization': 'Bearer qygHulymo1fekJk4CIZyNKjyQAzG8CFN', # 曹伟应用api测试 app_key
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json.json'
|
||||
}
|
||||
|
||||
"""
|
||||
@@ -130,7 +130,7 @@ class update_ID_form:
|
||||
|
||||
headers = {
|
||||
'Authorization': "Bearer qygHulymo1fekJk4CIZyNKjyQAzG8CFN", # 曹伟应用api测试 app_key
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json.json'
|
||||
}
|
||||
|
||||
payload = json.dumps({
|
||||
@@ -197,7 +197,7 @@ class update_ID_form:
|
||||
|
||||
headers = {
|
||||
'Authorization': 'Bearer qygHulymo1fekJk4CIZyNKjyQAzG8CFN', # 曹伟应用api测试 app_key
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json.json'
|
||||
}
|
||||
all_data_batches = [] # 用于存储每次请求返回的数据批次
|
||||
last_data_id = None
|
||||
@@ -308,7 +308,7 @@ class update_ID_form:
|
||||
|
||||
headers = {
|
||||
'Authorization': 'Bearer qygHulymo1fekJk4CIZyNKjyQAzG8CFN', # 曹伟应用api测试 appKey
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json.json'
|
||||
}
|
||||
|
||||
"""
|
||||
@@ -385,7 +385,7 @@ class update_ID_form:
|
||||
|
||||
headers = {
|
||||
'Authorization': 'Bearer qygHulymo1fekJk4CIZyNKjyQAzG8CFN', # 曹伟应用api测试 appKey
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json.json'
|
||||
}
|
||||
|
||||
# 获取data_list长度
|
||||
@@ -460,7 +460,7 @@ class update_ID_form:
|
||||
|
||||
headers = {
|
||||
'Authorization': 'Bearer qygHulymo1fekJk4CIZyNKjyQAzG8CFN',
|
||||
'Content-Type': 'application/json'
|
||||
'Content-Type': 'application/json.json'
|
||||
}
|
||||
|
||||
response = requests.post(url, headers=headers)
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
{
|
||||
'data': {
|
||||
'_id': '68d39a00bc54693f3c1e47d4',
|
||||
'creator': {
|
||||
'name': '王兴财',
|
||||
'username': '02480455276729107961',
|
||||
'status': 1,
|
||||
'type': 0,
|
||||
'departments': [
|
||||
177751223
|
||||
],
|
||||
'integrate_id': '02480455276729107961'
|
||||
},
|
||||
'updater': {
|
||||
'name': '王兴财',
|
||||
'username': '02480455276729107961',
|
||||
'status': 1,
|
||||
'type': 0,
|
||||
'departments': [
|
||||
177751223
|
||||
],
|
||||
'integrate_id': '02480455276729107961'
|
||||
},
|
||||
'deleter': None,
|
||||
'createTime': '2025-09-24T07:13:04.967Z',
|
||||
'updateTime': '2025-09-24T07:13:04.967Z',
|
||||
'deleteTime': None,
|
||||
'_widget_1734589432084': '67ebe4846c3e7153268e9004',
|
||||
'_widget_1735268263061': '续约后180天回访',
|
||||
'_widget_1735268263079': '检测单',
|
||||
'_widget_1735268263063': '是',
|
||||
'_widget_1735268263065': '否',
|
||||
'_widget_1735268263067': '',
|
||||
'_widget_1735527329557': '',
|
||||
'_widget_1736414617462': '是',
|
||||
'_widget_1735268263069': '',
|
||||
'_widget_1735268263070': '多次去电未接听,需区域协助联系',
|
||||
'_widget_1735268263071': '',
|
||||
'_widget_1735268263072': '',
|
||||
'_widget_1764293754939': '',
|
||||
'_widget_1735280720550': '10546443563957342000',
|
||||
'_widget_1735268263062': '2025-09-24T07:12:59.124Z',
|
||||
'_widget_1734589782134': {
|
||||
'name': '王兴财',
|
||||
'username': '02480455276729107961',
|
||||
'status': 1,
|
||||
'type': 0,
|
||||
'departments': [
|
||||
177751223
|
||||
],
|
||||
'integrate_id': '02480455276729107961'
|
||||
},
|
||||
'_widget_1743128977141': {
|
||||
'name': '吴间锐',
|
||||
'username': '283227523421943504',
|
||||
'status': 1,
|
||||
'type': 0,
|
||||
'departments': [
|
||||
122323520
|
||||
],
|
||||
'integrate_id': '283227523421943504'
|
||||
},
|
||||
'_widget_1743129332378': {
|
||||
'name': '熊斌',
|
||||
'username': '2530511650927042',
|
||||
'status': 1,
|
||||
'type': 0,
|
||||
'departments': [
|
||||
122323520
|
||||
],
|
||||
'integrate_id': '2530511650927042'
|
||||
},
|
||||
'_widget_1745207582477': '其他',
|
||||
'_widget_1745207582479': '',
|
||||
'_widget_1745207582481': '',
|
||||
'appId': '675b900991ad2491c69389ca',
|
||||
'entryId': '6763bbf657bd8fb76fcb41b2'
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@
|
||||
"import requests\n",
|
||||
"\n",
|
||||
"headers = {\n",
|
||||
" 'content-type': 'application/json',\n",
|
||||
" 'content-type': 'application/json.json',\n",
|
||||
"}\n",
|
||||
"\n",
|
||||
"json_data = {\n",
|
||||
|
||||
@@ -76,7 +76,7 @@ def read_instances(token, formUuid, page, n):
|
||||
api = f'https://api.dingtalk.com//v1.0/yida/forms/instances/search'
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ def read_delete(token, formInstanceId):
|
||||
api = f'https://api.dingtalk.com//v1.0/yida/forms/instances'
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ def read_new(FORMID,formData):
|
||||
api = f'https://api.dingtalk.com/v1.0/yida/forms/instances'
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": TOKEN
|
||||
}
|
||||
payload = {
|
||||
@@ -141,13 +141,13 @@ def component(FORMID,TOKEN):
|
||||
api = f'https://api.dingtalk.com//v1.0/yida/forms/formFields'
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": TOKEN
|
||||
}
|
||||
payload = {
|
||||
"formUuid" : FORMID,
|
||||
"appType" : "APP_UYZ0KG6L0CCNV80GZ66O",
|
||||
# "formDataJson" : json.dumps(formData, cls=NpEncoder),
|
||||
# "formDataJson" : json.json.dumps(formData, cls=NpEncoder),
|
||||
"systemToken" : "XA966F81JAJOFCVVVKO64E9MIIZV1EWE5SFMKJ2",
|
||||
# "language" : "zh_CN",
|
||||
"userId" : "yida_pub_account"
|
||||
@@ -161,7 +161,7 @@ def initiate_process(TOKEN,formData):
|
||||
api = f'https://api.dingtalk.com//v1.0/yida/processes/instances/start'
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": TOKEN
|
||||
}
|
||||
payload = {
|
||||
@@ -182,7 +182,7 @@ def delete_in_batches(FORMID,TOKEN,ALL_DATA_instance):
|
||||
api = f'https://api.dingtalk.com//v1.0/yida/forms/instances/batchRemove'
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": TOKEN
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ def delete_in(TOKEN,formInstanceIdList):
|
||||
api = f'https://api.dingtalk.com//v1.0/yida/forms/instances?appType=APP_UYZ0KG6L0CCNV80GZ66O&systemToken=XA966F81JAJOFCVVVKO64E9MIIZV1EWE5SFMKJ2&userId=yida_pub_account&language=zh_CN&formInstanceId={formInstanceIdList}'
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": TOKEN
|
||||
}
|
||||
res = requests.delete(api, headers=headers)
|
||||
@@ -216,7 +216,7 @@ def read_instances_ngv(token, formUuid, page, n,searchField):
|
||||
api = f'https://api.dingtalk.com//v1.0/yida/forms/instances/search'
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
|
||||
@@ -437,7 +437,7 @@ try:
|
||||
yida_api = "https://api.dingtalk.com/v1.0/yida/processes/instances/start"
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
|
||||
@@ -479,7 +479,7 @@ try:
|
||||
yida_api = "https://api.dingtalk.com/v1.0/yida/processes/instances/start"
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
|
||||
@@ -522,7 +522,7 @@ except:
|
||||
yida_api = "https://api.dingtalk.com/v1.0/yida/processes/instances/start"
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ try:
|
||||
yida_api = "https://api.dingtalk.com/v1.0/yida/processes/instances/start"
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
{
|
||||
"cells": [
|
||||
{
|
||||
"metadata": {},
|
||||
"cell_type": "markdown",
|
||||
"source": "# 功能使用情况数据id导出",
|
||||
"id": "6f83c58449d34b7e"
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"id": "initial_id",
|
||||
"metadata": {
|
||||
"collapsed": true,
|
||||
"ExecuteTime": {
|
||||
"end_time": "2025-11-28T02:48:44.131617Z",
|
||||
"start_time": "2025-11-28T02:48:43.777253Z"
|
||||
}
|
||||
},
|
||||
"source": [
|
||||
"from api import API\n",
|
||||
"import pandas as pd\n",
|
||||
"from tqdm.notebook import tqdm\n",
|
||||
"\n",
|
||||
"api_instance = API()\n",
|
||||
"\n",
|
||||
"df = pd.read_excel(fr\"C:\\Users\\zy187\\Desktop\\钉钉文件\\功能使用情况_20251128102519.xlsx\",sheet_name=\"功能使用情况\")\n",
|
||||
"\n",
|
||||
"all_data = []\n",
|
||||
"for index,row in tqdm(df.iterrows()):\n",
|
||||
" print(row[\"data_id\"])\n",
|
||||
" payload = {\n",
|
||||
" \"data_id\": row[\"data_id\"]\n",
|
||||
" , \"api_key\": \"675b900991ad2491c69389ca\"\n",
|
||||
" , \"entry_id\": \"6763bbf657bd8fb76fcb41b2\"\n",
|
||||
" }\n",
|
||||
" print( payload)\n",
|
||||
" res = api_instance.entry_data_get(payload)\n",
|
||||
"\n",
|
||||
" org_name = res.get(\"data\").get(\"_widget_1734589432084\")\n",
|
||||
" all_data.append([row[\"data_id\"],org_name])\n",
|
||||
"\n",
|
||||
"df1 = pd.DataFrame(all_data)\n",
|
||||
"df1.to_excel(fr\"C:\\Users\\zy187\\Desktop\\钉钉文件\\功能使用情况_20251128102519_data_id.xlsx\",index=False)\n"
|
||||
],
|
||||
"outputs": [
|
||||
{
|
||||
"ename": "RuntimeError",
|
||||
"evalue": "CPU dispatcher tracer already initlized",
|
||||
"output_type": "error",
|
||||
"traceback": [
|
||||
"\u001B[31m---------------------------------------------------------------------------\u001B[39m",
|
||||
"\u001B[31mRuntimeError\u001B[39m Traceback (most recent call last)",
|
||||
"\u001B[36mCell\u001B[39m\u001B[36m \u001B[39m\u001B[32mIn[4]\u001B[39m\u001B[32m, line 1\u001B[39m\n\u001B[32m----> \u001B[39m\u001B[32m1\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mapi\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m API\n\u001B[32m 2\u001B[39m \u001B[38;5;28;01mimport\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mpandas\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mas\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mpd\u001B[39;00m\n\u001B[32m 3\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mtqdm\u001B[39;00m\u001B[34;01m.\u001B[39;00m\u001B[34;01mnotebook\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m tqdm\n",
|
||||
"\u001B[36mFile \u001B[39m\u001B[32mD:\\Idea Project\\SaaS_V1.7\\api.py:10\u001B[39m\n\u001B[32m 8\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mdecimal\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m Decimal\n\u001B[32m 9\u001B[39m \u001B[38;5;28;01mimport\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mtime\u001B[39;00m\n\u001B[32m---> \u001B[39m\u001B[32m10\u001B[39m \u001B[38;5;28;01mimport\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mnumpy\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mas\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mnp\u001B[39;00m\n\u001B[32m 11\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mlog_config\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m configure_task_logger, configure_error_task_logger\n\u001B[32m 12\u001B[39m \u001B[38;5;28;01mimport\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mjson\u001B[39;00m\n",
|
||||
"\u001B[36mFile \u001B[39m\u001B[32mD:\\ProgramTools\\anaconda3\\envs\\saas\\Lib\\site-packages\\numpy\\__init__.py:125\u001B[39m\n\u001B[32m 122\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01m.\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m _distributor_init\n\u001B[32m 124\u001B[39m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[32m--> \u001B[39m\u001B[32m125\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mnumpy\u001B[39;00m\u001B[34;01m.\u001B[39;00m\u001B[34;01m__config__\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m show_config\n\u001B[32m 126\u001B[39m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mImportError\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m e:\n\u001B[32m 127\u001B[39m msg = \u001B[33m\"\"\"\u001B[39m\u001B[33mError importing numpy: you should not try to import numpy from\u001B[39m\n\u001B[32m 128\u001B[39m \u001B[33m its source directory; please exit the numpy source tree, and relaunch\u001B[39m\n\u001B[32m 129\u001B[39m \u001B[33m your python interpreter from there.\u001B[39m\u001B[33m\"\"\"\u001B[39m\n",
|
||||
"\u001B[36mFile \u001B[39m\u001B[32mD:\\ProgramTools\\anaconda3\\envs\\saas\\Lib\\site-packages\\numpy\\__config__.py:4\u001B[39m\n\u001B[32m 1\u001B[39m \u001B[38;5;66;03m# This file is generated by numpy's build process\u001B[39;00m\n\u001B[32m 2\u001B[39m \u001B[38;5;66;03m# It contains system_info results at the time of building this package.\u001B[39;00m\n\u001B[32m 3\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01menum\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m Enum\n\u001B[32m----> \u001B[39m\u001B[32m4\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mnumpy\u001B[39;00m\u001B[34;01m.\u001B[39;00m\u001B[34;01m_core\u001B[39;00m\u001B[34;01m.\u001B[39;00m\u001B[34;01m_multiarray_umath\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m (\n\u001B[32m 5\u001B[39m __cpu_features__,\n\u001B[32m 6\u001B[39m __cpu_baseline__,\n\u001B[32m 7\u001B[39m __cpu_dispatch__,\n\u001B[32m 8\u001B[39m )\n\u001B[32m 10\u001B[39m __all__ = [\u001B[33m\"\u001B[39m\u001B[33mshow_config\u001B[39m\u001B[33m\"\u001B[39m]\n\u001B[32m 11\u001B[39m _built_with_meson = \u001B[38;5;28;01mTrue\u001B[39;00m\n",
|
||||
"\u001B[36mFile \u001B[39m\u001B[32mD:\\ProgramTools\\anaconda3\\envs\\saas\\Lib\\site-packages\\numpy\\_core\\__init__.py:22\u001B[39m\n\u001B[32m 19\u001B[39m env_added.append(envkey)\n\u001B[32m 21\u001B[39m \u001B[38;5;28;01mtry\u001B[39;00m:\n\u001B[32m---> \u001B[39m\u001B[32m22\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01m.\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m multiarray\n\u001B[32m 23\u001B[39m \u001B[38;5;28;01mexcept\u001B[39;00m \u001B[38;5;167;01mImportError\u001B[39;00m \u001B[38;5;28;01mas\u001B[39;00m exc:\n\u001B[32m 24\u001B[39m \u001B[38;5;28;01mimport\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01msys\u001B[39;00m\n",
|
||||
"\u001B[36mFile \u001B[39m\u001B[32mD:\\ProgramTools\\anaconda3\\envs\\saas\\Lib\\site-packages\\numpy\\_core\\multiarray.py:11\u001B[39m\n\u001B[32m 1\u001B[39m \u001B[33;03m\"\"\"\u001B[39;00m\n\u001B[32m 2\u001B[39m \u001B[33;03mCreate the numpy._core.multiarray namespace for backward compatibility.\u001B[39;00m\n\u001B[32m 3\u001B[39m \u001B[33;03mIn v1.16 the multiarray and umath c-extension modules were merged into\u001B[39;00m\n\u001B[32m (...)\u001B[39m\u001B[32m 6\u001B[39m \n\u001B[32m 7\u001B[39m \u001B[33;03m\"\"\"\u001B[39;00m\n\u001B[32m 9\u001B[39m \u001B[38;5;28;01mimport\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01mfunctools\u001B[39;00m\n\u001B[32m---> \u001B[39m\u001B[32m11\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01m.\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m _multiarray_umath, overrides\n\u001B[32m 12\u001B[39m \u001B[38;5;28;01mfrom\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[34;01m.\u001B[39;00m\u001B[34;01m_multiarray_umath\u001B[39;00m\u001B[38;5;250m \u001B[39m\u001B[38;5;28;01mimport\u001B[39;00m * \u001B[38;5;66;03m# noqa: F403\u001B[39;00m\n\u001B[32m 14\u001B[39m \u001B[38;5;66;03m# These imports are needed for backward compatibility,\u001B[39;00m\n\u001B[32m 15\u001B[39m \u001B[38;5;66;03m# do not change them. issue gh-15518\u001B[39;00m\n\u001B[32m 16\u001B[39m \u001B[38;5;66;03m# _get_ndarray_c_version is semi-public, on purpose not added to __all__\u001B[39;00m\n",
|
||||
"\u001B[31mRuntimeError\u001B[39m: CPU dispatcher tracer already initlized"
|
||||
]
|
||||
}
|
||||
],
|
||||
"execution_count": 4
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 2
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython2",
|
||||
"version": "2.7.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
from api import API
|
||||
import pandas as pd
|
||||
from tqdm import tqdm
|
||||
|
||||
api_instance = API()
|
||||
|
||||
df = pd.read_excel(fr"C:\Users\zy187\Desktop\钉钉文件\功能使用情况_20251128102519.xlsx",sheet_name="功能使用情况")
|
||||
|
||||
all_data = []
|
||||
for index,row in tqdm(df.iterrows(),total=len(df)):
|
||||
# print(row["data_id"])
|
||||
payload = {
|
||||
"data_id": row["data_id"]
|
||||
, "api_key": "675b900991ad2491c69389ca"
|
||||
, "entry_id": "6763bbf657bd8fb76fcb41b2"
|
||||
}
|
||||
res = api_instance.entry_data_get(payload)
|
||||
|
||||
|
||||
org_name = res.get("data").get("_widget_1734589432084")
|
||||
all_data.append([row["data_id"],org_name])
|
||||
|
||||
df1 = pd.DataFrame(all_data)
|
||||
df1.to_excel(fr"C:\Users\zy187\Desktop\钉钉文件\功能使用情况_20251128102519_data_id.xlsx",index=False)
|
||||
@@ -48,7 +48,7 @@ class YDAPI:
|
||||
api = f'https://api.dingtalk.com//v1.0/yida/forms/instances'
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ class YDAPI:
|
||||
attempt = 0
|
||||
api = f'https://api.dingtalk.com/v1.0/yida/processes/instancesInfos/{id}'
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
formData = {
|
||||
@@ -131,7 +131,7 @@ class YDAPI:
|
||||
|
||||
api = 'https://api.dingtalk.com/v1.0/yida/forms/instances/search'
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
formData = {
|
||||
@@ -188,7 +188,7 @@ class YDAPI:
|
||||
attempt = 0
|
||||
api = f'https://api.dingtalk.com/v1.0/yida/processes/instances?pageNumber={page}&pageSize={n}'
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
formData = {
|
||||
@@ -237,7 +237,7 @@ class YDAPI:
|
||||
userId = "yida_pub_account"
|
||||
api = f'https://api.dingtalk.com/v1.0/yida/processes/operationRecords?appType={appType}&systemToken={systemToken}&userId={userId}&language=zh_CN&processInstanceId={processInstanceId}'
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ class YDAPI:
|
||||
userId = "yida_pub_account"
|
||||
api = f'https://api.dingtalk.com/v1.0/yida/processes/{processID}definitions/designs?systemToken={systemToken}&userId={userId}&appType={appType}"x-acs-dingtalk-access-token": token'
|
||||
headers = {
|
||||
# "Content-Type": "application/json",
|
||||
# "Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
|
||||
}
|
||||
@@ -327,7 +327,7 @@ class YDAPI:
|
||||
"""
|
||||
api = 'https://api.dingtalk.com/v1.0/yida/tasks/execute'
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
payload = {
|
||||
@@ -362,7 +362,7 @@ class YDAPI:
|
||||
api = f'https://api.dingtalk.com//v1.0/yida/tasks/redirect'
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
payload = {
|
||||
@@ -393,7 +393,7 @@ class YDAPI:
|
||||
api = f'https://api.dingtalk.com///v1.0/yida/forms/instances?appType=APP_UYZ0KG6L0CCNV80GZ66O&systemToken=XA966F81JAJOFCVVVKO64E9MIIZV1EWE5SFMKJ2&userId=2268275546837446&language=zh_CN&formInstanceId=' + id
|
||||
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
|
||||
@@ -420,7 +420,7 @@ class YDAPI:
|
||||
|
||||
api = f'https://api.dingtalk.com/v1.0/yida/forms/formFields'
|
||||
headers = {
|
||||
"Content-Type": "application/json",
|
||||
"Content-Type": "application/json.json",
|
||||
"x-acs-dingtalk-access-token": token
|
||||
}
|
||||
retries = 0
|
||||
|
||||
Reference in New Issue
Block a user