diff --git a/back_ground_module/logs/error_task.log b/back_ground_module/logs/error_task.log index c066968..3bb096b 100644 --- a/back_ground_module/logs/error_task.log +++ b/back_ground_module/logs/error_task.log @@ -15,3 +15,13 @@ 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 +2025-12-03 09:35:35,923 - update_molecule_reporting_adjustment_to_bi.py - error_task_logger - ERROR - 任务执行失败: unsupported operand type(s) for //: 'NoneType' and 'int' +2025-12-03 09:37:19,719 - update_molecule_reporting_adjustment_to_bi.py - error_task_logger - ERROR - 任务执行失败: unsupported operand type(s) for //: 'NoneType' and 'int' +2025-12-03 09:38:02,309 - update_molecule_reporting_adjustment_to_bi.py - error_task_logger - ERROR - 任务执行失败: unsupported operand type(s) for //: 'NoneType' and 'int' +2025-12-03 09:39:56,925 - update_molecule_reporting_adjustment_to_bi.py - error_task_logger - ERROR - 任务执行失败: unsupported operand type(s) for //: 'NoneType' and 'int' +2025-12-03 09:41:22,721 - update_molecule_reporting_adjustment_to_bi.py - error_task_logger - ERROR - 任务执行失败: unsupported operand type(s) for //: 'NoneType' and 'int' +2025-12-03 09:42:57,097 - update_molecule_reporting_adjustment_to_bi.py - error_task_logger - ERROR - 任务执行失败: unsupported operand type(s) for //: 'NoneType' and 'int' +2025-12-03 09:45:13,572 - update_molecule_reporting_adjustment_to_bi.py - error_task_logger - ERROR - 任务执行失败: unsupported operand type(s) for //: 'NoneType' and 'int' +2025-12-03 09:50:07,647 - update_molecule_reporting_adjustment_to_bi.py - error_task_logger - ERROR - 任务执行失败: unsupported operand type(s) for //: 'NoneType' and 'int' +2025-12-03 09:51:28,042 - update_molecule_reporting_adjustment_to_bi.py - error_task_logger - ERROR - 任务执行失败: unsupported operand type(s) for //: 'NoneType' and 'int' +2025-12-03 09:55:47,222 - update_molecule_reporting_adjustment_to_bi.py - error_task_logger - ERROR - 任务执行失败: unsupported operand type(s) for //: 'NoneType' and 'int' diff --git a/back_ground_module/revisit_new_services_180.py b/back_ground_module/revisit_new_services_180.py index cbbb07f..c673716 100644 --- a/back_ground_module/revisit_new_services_180.py +++ b/back_ground_module/revisit_new_services_180.py @@ -680,6 +680,7 @@ class NewServicesRevisit: except Exception as e: error_task_logger.error(f"不开单识别:Error finding customer service: {e}") common_module.send_task_error(task_start_time, "手动添加日常回访-不开单识别", str(e)) + # 保单识别:从系统中抽取目标门店,针对门店抽取修改是否推荐 try: if row["org_code"] in self.widget_list: diff --git a/back_ground_module/update_molecule_reporting_adjustment_to_bi.py b/back_ground_module/update_molecule_reporting_adjustment_to_bi.py index 108c4cf..dea469a 100644 --- a/back_ground_module/update_molecule_reporting_adjustment_to_bi.py +++ b/back_ground_module/update_molecule_reporting_adjustment_to_bi.py @@ -22,10 +22,7 @@ api_instance = API() common_module = CommonModule() -# 配置常量 -FORMID = "FORM-VJ866081CVI9E7ALB7WOO7BHPPQW25R99AWFL0" # 分子报备调整 -appType = "APP_UYZ0KG6L0CCNV80GZ66O" # F6客户服务 -systemToken = "XA966F81JAJOFCVVVKO64E9MIIZV1EWE5SFMKJ2" # 密钥 + # 数据库配置 DB_CONFIG = Config.HS_DB_Config @@ -64,8 +61,17 @@ class MoleculeReportingAdjustment: def get_yida_data(self): # 获取分母报备数据 TOKEN = yd_api_instance.generateToken() + # 配置常量 + FORMID = "FORM-VJ866081CVI9E7ALB7WOO7BHPPQW25R99AWFL0" # 分子报备调整 + appType = "APP_UYZ0KG6L0CCNV80GZ66O" # F6客户服务 + systemToken = "XA966F81JAJOFCVVVKO64E9MIIZV1EWE5SFMKJ2" # 密钥 + + print(TOKEN) molecule_data = yd_api_instance.read_processes(token=TOKEN, formUuid=FORMID, page=1, n=100, appType=appType, systemToken=systemToken) + + if not molecule_data.get("data"): + print("没有数据") self.molecule_data_list = [] PAGES_two = molecule_data.get('totalCount') // 100 + 1 for a in range(1, PAGES_two + 1): @@ -162,7 +168,7 @@ class MoleculeReportingAdjustment: except Exception as e: error_task_logger.error(f"写入数据时发生错误: {e}") task_start_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S") - common_module.send_task_error(task_start_time, "分母报备调整", str(e)) + # common_module.send_task_error(task_start_time, "分母报备调整", str(e)) connection.rollback() finally: @@ -203,7 +209,7 @@ class MoleculeReportingAdjustment: common_module.send_task_status(task_start_time, "分子报备调整") except Exception as e: error_task_logger.error(f"任务执行失败: {e}") - common_module.send_task_error(task_start_time, "分子报备调整", str(e)) + # common_module.send_task_error(task_start_time, "分子报备调整", str(e)) if __name__ == '__main__': diff --git a/yd_api.py b/yd_api.py index 74cd964..974b0af 100644 --- a/yd_api.py +++ b/yd_api.py @@ -48,7 +48,7 @@ class YDAPI: api = f'https://api.dingtalk.com//v1.0/yida/forms/instances' headers = { - "Content-Type": "application/json.json", + "Content-Type": "application/json", "x-acs-dingtalk-access-token": token } @@ -89,9 +89,9 @@ class YDAPI: :return: """ attempt = 0 - api = f'https://api.dingtalk.com/v1.0/yida/processes/instancesInfos/{id}' + api = f'https://api.dingtalk.com/v2.0/yida/processes/instancesInfos/{id}' headers = { - "Content-Type": "application/json.json", + "Content-Type": "application/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.json", + "Content-Type": "application/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.json", + "Content-Type": "application/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.json", + "Content-Type": "application/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.json", + # "Content-Type": "application/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.json", + "Content-Type": "application/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.json", + "Content-Type": "application/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.json", + "Content-Type": "application/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.json", + "Content-Type": "application/json", "x-acs-dingtalk-access-token": token } retries = 0