异常待办派发逻辑更改

This commit is contained in:
z66
2025-11-25 17:42:04 +08:00
parent a6808e6bcb
commit 6c316e6c61
7 changed files with 93 additions and 27 deletions
+6 -4
View File
@@ -174,10 +174,10 @@ class NewExceptionTask:
self.NGV_data_list = api_instance.entry_data_list(payload).get("data", [])
# print("NGV获取后的类型:", type(self.NGV_data_list))
# 获取异常服务待办
payload = {"api_key": "675b900991ad2491c69389ca", "entry_id": "68340de79f116c0b66b6b0cc"}
# 获取异常服务待办(添加过滤进行中的订单)
payload = {"api_key": "675b900991ad2491c69389ca", "entry_id": "68340de79f116c0b66b6b0cc","filter":{"rel":"and","cond":[{ "field": "flowState", "type":"flowstate", "method":"eq","value":[0] }]}}
self.exception_service_todo = api_instance.entry_data_list(payload).get("data", [])
print(self.exception_service_todo)
# print(self.exception_service_todo)
@staticmethod
def build_index(json_list):
@@ -258,9 +258,11 @@ class NewExceptionTask:
is_pass = False
for exception_service in self.exception_service_todo :
if exception_service['_widget_1748241895842'] == row['org_code'] and exception_service['_widget_1748512176655'] in ['未处理', '处理中']:
# 通过查询筛选进行中的逻辑
if exception_service['_widget_1748241895842'] == row['org_code']:
is_pass = True
break
if is_pass:
logger.info(f"已存在待办,跳过该条记录: {row}")
continue
+2 -1
View File
@@ -17,6 +17,7 @@ api_instance = API()
class GDMatchPhoneNumber:
"""高德匹配手机号"""
def __init__(self):
self.loader_company_data = None
self.fild_mapping = {
@@ -199,7 +200,7 @@ class GDMatchPhoneNumber:
self.upload_df(result_df)
logger.info(f"数据上传完成。")
except Exception as e:
# common_module.send_task_error(task_start_time, "高德匹配手机号", str(e))
common_module.send_task_error(task_start_time, "高德匹配手机号", str(e))
error_task_logger.error(f"任务高德匹配手机号执行失败。")
raise