异常回访新增过滤逻辑
This commit is contained in:
@@ -16,7 +16,8 @@ logger = configure_task_logger()
|
|||||||
|
|
||||||
# 获取已经配置好的错误任务日志记录器
|
# 获取已经配置好的错误任务日志记录器
|
||||||
error_task_logger = configure_error_task_logger()
|
error_task_logger = configure_error_task_logger()
|
||||||
|
output_dir = "output" # 设置输出目录
|
||||||
|
os.makedirs(output_dir, exist_ok=True)
|
||||||
|
|
||||||
class NewExceptionTask:
|
class NewExceptionTask:
|
||||||
"""
|
"""
|
||||||
@@ -24,6 +25,7 @@ class NewExceptionTask:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
|
self.exception_service_todo = None
|
||||||
self.get_feature_usage = None
|
self.get_feature_usage = None
|
||||||
self.saas_create_time = None
|
self.saas_create_time = None
|
||||||
self.index = None
|
self.index = None
|
||||||
@@ -44,6 +46,47 @@ class NewExceptionTask:
|
|||||||
self.different_industries = None
|
self.different_industries = None
|
||||||
self.different_industries_list = None
|
self.different_industries_list = None
|
||||||
self.groupnotification = None
|
self.groupnotification = None
|
||||||
|
self.fields_mapping = {
|
||||||
|
"门店名称": "_widget_1748241895830",
|
||||||
|
"联系人": "_widget_1748241895831",
|
||||||
|
"开户时间": "_widget_1748241895839",
|
||||||
|
"门店编码": "_widget_1748241895842",
|
||||||
|
"联系方式": "_widget_1748241895832",
|
||||||
|
"系统版本": "_widget_1748241895850",
|
||||||
|
"公司名称": "_widget_1748241895844",
|
||||||
|
"运营顾问": "_widget_1748246808679",
|
||||||
|
"区域经理": "_widget_1748246808682",
|
||||||
|
"公司等级": "_widget_1748241895846",
|
||||||
|
"运营专家": "_widget_1748246808681",
|
||||||
|
"操作模式E.L/E.S": "_widget_1748241895853",
|
||||||
|
"活跃健康状态变化": "_widget_1748241895829",
|
||||||
|
"初始日": "_widget_1748241895833",
|
||||||
|
"推进日": "_widget_1748241895834",
|
||||||
|
"异常跟进情况描述": "_widget_1748512176640",
|
||||||
|
"异常变化原因": "_widget_1748512176641",
|
||||||
|
"正常使用": "_widget_1748512176643",
|
||||||
|
"门店原因": "_widget_1748512176645",
|
||||||
|
"服务原因": "_widget_1748512176647",
|
||||||
|
"产品原因": "_widget_1748512176649",
|
||||||
|
"未正式切换": "_widget_1748512176651",
|
||||||
|
"跟进状态": "_widget_1748512176655",
|
||||||
|
"是否可激活": "_widget_1758615839701",
|
||||||
|
"是否有续约风险": "_widget_1758615839703",
|
||||||
|
"当前跟进人": "_widget_1748246808678",
|
||||||
|
"激活策略": "_widget_1758615839717",
|
||||||
|
"跟进时间": "_widget_1748512176654",
|
||||||
|
"是否跟进完成": "_widget_1751273412737",
|
||||||
|
"区域客服": "_widget_1748246808680",
|
||||||
|
"大区": "_widget_1748241895847",
|
||||||
|
"省": "_widget_1748241895848",
|
||||||
|
"城市": "_widget_1748241895855",
|
||||||
|
"门店类型": "_widget_1748241895849",
|
||||||
|
"saas客户类型": "_widget_1748241895851",
|
||||||
|
"门店阶段": "_widget_1748241895852",
|
||||||
|
"提交人": "creator",
|
||||||
|
"提交时间": "createTime",
|
||||||
|
"更新时间": "updateTime"
|
||||||
|
}
|
||||||
|
|
||||||
def calculate_date_one(self, start_offset=0):
|
def calculate_date_one(self, start_offset=0):
|
||||||
"""
|
"""
|
||||||
@@ -131,6 +174,11 @@ class NewExceptionTask:
|
|||||||
self.NGV_data_list = api_instance.entry_data_list(payload).get("data", [])
|
self.NGV_data_list = api_instance.entry_data_list(payload).get("data", [])
|
||||||
# print("NGV获取后的类型:", type(self.NGV_data_list))
|
# print("NGV获取后的类型:", type(self.NGV_data_list))
|
||||||
|
|
||||||
|
# 获取异常服务待办
|
||||||
|
payload = {"api_key": "675b900991ad2491c69389ca", "entry_id": "68340de79f116c0b66b6b0cc"}
|
||||||
|
self.exception_service_todo = api_instance.entry_data_list(payload).get("data", [])
|
||||||
|
print(self.exception_service_todo)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def build_index(json_list):
|
def build_index(json_list):
|
||||||
index = {}
|
index = {}
|
||||||
@@ -186,6 +234,7 @@ class NewExceptionTask:
|
|||||||
logger.info("开始运行SaaS异常回访")
|
logger.info("开始运行SaaS异常回访")
|
||||||
|
|
||||||
data_yichang = self.data_yichang_S.copy()
|
data_yichang = self.data_yichang_S.copy()
|
||||||
|
# data_yichang.to_csv(os.path.join(output_dir,"data_yichang.csv"), index=False)
|
||||||
|
|
||||||
def replace_values(series):
|
def replace_values(series):
|
||||||
# 使用条件判断来进行替换
|
# 使用条件判断来进行替换
|
||||||
@@ -196,6 +245,16 @@ class NewExceptionTask:
|
|||||||
|
|
||||||
for index_num, row in data_yichang.iterrows(): # 对过滤后的每一条进行派发
|
for index_num, row in data_yichang.iterrows(): # 对过滤后的每一条进行派发
|
||||||
try:
|
try:
|
||||||
|
|
||||||
|
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 ['未处理', '处理中']:
|
||||||
|
is_pass = True
|
||||||
|
break
|
||||||
|
if is_pass:
|
||||||
|
logger.info(f"已存在待办,跳过该条记录: {row}")
|
||||||
|
continue
|
||||||
|
|
||||||
payload_dict = {}
|
payload_dict = {}
|
||||||
|
|
||||||
distribution_date = datetime.datetime.now(datetime.timezone.utc)
|
distribution_date = datetime.datetime.now(datetime.timezone.utc)
|
||||||
@@ -225,6 +284,7 @@ class NewExceptionTask:
|
|||||||
UUid = time.strftime("%Y%m%d%H%M%S", time.localtime())
|
UUid = time.strftime("%Y%m%d%H%M%S", time.localtime())
|
||||||
|
|
||||||
NGV_data_id = None
|
NGV_data_id = None
|
||||||
|
reason = None
|
||||||
# 获取关联数据
|
# 获取关联数据
|
||||||
for NGV_Data in self.NGV_data_list:
|
for NGV_Data in self.NGV_data_list:
|
||||||
# NGV_Data = NGV_Data.get("data")
|
# NGV_Data = NGV_Data.get("data")
|
||||||
@@ -233,9 +293,15 @@ class NewExceptionTask:
|
|||||||
province_name = NGV_Data.get("_widget_1734062123090")
|
province_name = NGV_Data.get("_widget_1734062123090")
|
||||||
city_name = NGV_Data.get("_widget_1734062123092")
|
city_name = NGV_Data.get("_widget_1734062123092")
|
||||||
area_name = NGV_Data.get("_widget_1734062123094")
|
area_name = NGV_Data.get("_widget_1734062123094")
|
||||||
#
|
# 门店原因
|
||||||
|
reason = NGV_Data.get("_widget_1758617393828")
|
||||||
logger.info(f"获取关联数据成功:{NGV_data_id}, {province_name}, {city_name}, {area_name}")
|
logger.info(f"获取关联数据成功:{NGV_data_id}, {province_name}, {city_name}, {area_name}")
|
||||||
|
|
||||||
|
# 判断门店原因
|
||||||
|
if reason in ["门店倒闭", "门店转让", "加盟其他连锁","切换竞品","虚拟门店","重新开户","已退款","二套系统"]:
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
if not NGV_data_id:
|
if not NGV_data_id:
|
||||||
logger.warning(f"未找到关联数据,请检查门店编码: {row['org_code']}")
|
logger.warning(f"未找到关联数据,请检查门店编码: {row['org_code']}")
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -40,7 +40,7 @@ class PartnerSettlementToBI:
|
|||||||
"合伙人分类": "_widget_1753943042503",
|
"合伙人分类": "_widget_1753943042503",
|
||||||
"战区": "_widget_1754530653275",
|
"战区": "_widget_1754530653275",
|
||||||
"订单登记表": "_widget_1712803222905",
|
"订单登记表": "_widget_1712803222905",
|
||||||
"订单登记表.订单编号": "_widget_1712803222905._widget_1712803222907",
|
"订单登记表.订单编号": "_widget_1712803222905._widget_1756870421570",
|
||||||
"订单登记表.销售阶段": "_widget_1712803222905._widget_1712805391009",
|
"订单登记表.销售阶段": "_widget_1712803222905._widget_1712805391009",
|
||||||
"订单登记表.版本": "_widget_1712803222905._widget_1712803222908",
|
"订单登记表.版本": "_widget_1712803222905._widget_1712803222908",
|
||||||
"订单登记表.年限": "_widget_1712803222905._widget_1712815331264",
|
"订单登记表.年限": "_widget_1712803222905._widget_1712815331264",
|
||||||
@@ -58,7 +58,7 @@ class PartnerSettlementToBI:
|
|||||||
# 定义需要特殊处理的列表字段及其内部字段映射
|
# 定义需要特殊处理的列表字段及其内部字段映射
|
||||||
self.list_fields_config = {
|
self.list_fields_config = {
|
||||||
"订单登记表": {
|
"订单登记表": {
|
||||||
"_widget_1712803222907": "订单编号",
|
"_widget_1756870421570": "订单编号",
|
||||||
"_widget_1712805391009": "销售阶段",
|
"_widget_1712805391009": "销售阶段",
|
||||||
"_widget_1712803222908": "版本",
|
"_widget_1712803222908": "版本",
|
||||||
"_widget_1712815331264": "年限",
|
"_widget_1712815331264": "年限",
|
||||||
|
|||||||
+334
@@ -0,0 +1,334 @@
|
|||||||
|
import sys
|
||||||
|
import pandas as pd
|
||||||
|
from PyQt5.QtWidgets import (QApplication, QMainWindow, QWidget, QVBoxLayout,
|
||||||
|
QHBoxLayout, QPushButton, QLabel, QFileDialog,
|
||||||
|
QTableWidget, QTableWidgetItem, QComboBox, QProgressBar,
|
||||||
|
QStatusBar, QGroupBox, QFormLayout, QMessageBox)
|
||||||
|
from PyQt5.QtCore import Qt, QThread, pyqtSignal
|
||||||
|
from PyQt5.QtGui import QFont
|
||||||
|
from thefuzz import fuzz
|
||||||
|
|
||||||
|
# 确保中文正常显示
|
||||||
|
import matplotlib
|
||||||
|
|
||||||
|
matplotlib.rcParams["font.family"] = ["SimHei", "WenQuanYi Micro Hei", "Heiti TC"]
|
||||||
|
|
||||||
|
|
||||||
|
class CalculationThread(QThread):
|
||||||
|
"""计算线程,避免UI卡顿"""
|
||||||
|
progress_updated = pyqtSignal(int)
|
||||||
|
calculation_finished = pyqtSignal(pd.DataFrame)
|
||||||
|
error_occurred = pyqtSignal(str)
|
||||||
|
|
||||||
|
def __init__(self, df, source_name_col, source_loc_col, target_name_col, target_loc_col):
|
||||||
|
super().__init__()
|
||||||
|
self.df = df.copy()
|
||||||
|
self.source_name_col = source_name_col
|
||||||
|
self.source_loc_col = source_loc_col
|
||||||
|
self.target_name_col = target_name_col
|
||||||
|
self.target_loc_col = target_loc_col
|
||||||
|
|
||||||
|
def run(self):
|
||||||
|
try:
|
||||||
|
total_rows = len(self.df)
|
||||||
|
|
||||||
|
# 定义相似度计算函数
|
||||||
|
def calculate_similarity(row, index):
|
||||||
|
# 更新进度
|
||||||
|
progress = int((index / total_rows) * 100)
|
||||||
|
self.progress_updated.emit(progress)
|
||||||
|
|
||||||
|
# 获取当前行的四个值
|
||||||
|
name_src = str(row[self.source_name_col])
|
||||||
|
loc_src = str(row[self.source_loc_col])
|
||||||
|
name_tgt = str(row[self.target_name_col])
|
||||||
|
loc_tgt = str(row[self.target_loc_col])
|
||||||
|
|
||||||
|
# 计算相似度
|
||||||
|
name_similarity = fuzz.ratio(name_src, name_tgt)
|
||||||
|
loc_similarity = fuzz.ratio(loc_src, loc_tgt)
|
||||||
|
combined_similarity = (name_similarity + loc_similarity) / 2
|
||||||
|
|
||||||
|
return pd.Series([name_similarity, loc_similarity, combined_similarity])
|
||||||
|
|
||||||
|
# 应用计算函数
|
||||||
|
results = []
|
||||||
|
for idx, row in self.df.iterrows():
|
||||||
|
results.append(calculate_similarity(row, idx))
|
||||||
|
|
||||||
|
# 添加结果到DataFrame
|
||||||
|
results_df = pd.DataFrame(results, columns=['名称相似度', '地址相似度', '综合相似度'])
|
||||||
|
self.df = pd.concat([self.df, results_df], axis=1)
|
||||||
|
|
||||||
|
# 发送计算完成信号
|
||||||
|
self.calculation_finished.emit(self.df)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
self.error_occurred.emit(str(e))
|
||||||
|
|
||||||
|
|
||||||
|
class SimilarityCalculator(QMainWindow):
|
||||||
|
def __init__(self):
|
||||||
|
super().__init__()
|
||||||
|
self.df = None
|
||||||
|
self.init_ui()
|
||||||
|
|
||||||
|
def init_ui(self):
|
||||||
|
"""初始化用户界面"""
|
||||||
|
# 设置窗口标题和大小
|
||||||
|
self.setWindowTitle('地址名称模糊匹配相似度计算工具')
|
||||||
|
self.setGeometry(100, 100, 1200, 800)
|
||||||
|
|
||||||
|
# 创建中心部件和主布局
|
||||||
|
central_widget = QWidget()
|
||||||
|
self.setCentralWidget(central_widget)
|
||||||
|
main_layout = QVBoxLayout(central_widget)
|
||||||
|
|
||||||
|
# 添加文件选择区域
|
||||||
|
file_layout = QHBoxLayout()
|
||||||
|
self.file_path_label = QLabel('未选择文件')
|
||||||
|
self.file_path_label.setWordWrap(True)
|
||||||
|
self.select_file_btn = QPushButton('选择Excel文件')
|
||||||
|
self.select_file_btn.clicked.connect(self.select_file)
|
||||||
|
|
||||||
|
file_layout.addWidget(self.select_file_btn)
|
||||||
|
file_layout.addWidget(self.file_path_label, 1)
|
||||||
|
main_layout.addLayout(file_layout)
|
||||||
|
|
||||||
|
# 添加列配置区域
|
||||||
|
self.column_group = QGroupBox('列配置')
|
||||||
|
column_layout = QFormLayout()
|
||||||
|
|
||||||
|
self.source_name_combo = QComboBox()
|
||||||
|
self.source_loc_combo = QComboBox()
|
||||||
|
self.target_name_combo = QComboBox()
|
||||||
|
self.target_loc_combo = QComboBox()
|
||||||
|
|
||||||
|
column_layout.addRow('源名称列:', self.source_name_combo)
|
||||||
|
column_layout.addRow('源位置列:', self.source_loc_combo)
|
||||||
|
column_layout.addRow('目标名称列:', self.target_name_combo)
|
||||||
|
column_layout.addRow('目标位置列:', self.target_loc_combo)
|
||||||
|
|
||||||
|
self.column_group.setLayout(column_layout)
|
||||||
|
self.column_group.setEnabled(False) # 初始禁用,选择文件后启用
|
||||||
|
main_layout.addWidget(self.column_group)
|
||||||
|
|
||||||
|
# 添加操作按钮区域
|
||||||
|
btn_layout = QHBoxLayout()
|
||||||
|
self.calculate_btn = QPushButton('开始计算相似度')
|
||||||
|
self.calculate_btn.clicked.connect(self.start_calculation)
|
||||||
|
self.calculate_btn.setEnabled(False)
|
||||||
|
|
||||||
|
self.save_btn = QPushButton('保存结果')
|
||||||
|
self.save_btn.clicked.connect(self.save_results)
|
||||||
|
self.save_btn.setEnabled(False)
|
||||||
|
|
||||||
|
btn_layout.addWidget(self.calculate_btn)
|
||||||
|
btn_layout.addWidget(self.save_btn)
|
||||||
|
main_layout.addLayout(btn_layout)
|
||||||
|
|
||||||
|
# 添加进度条
|
||||||
|
self.progress_bar = QProgressBar()
|
||||||
|
self.progress_bar.setVisible(False)
|
||||||
|
main_layout.addWidget(self.progress_bar)
|
||||||
|
|
||||||
|
# 添加结果表格
|
||||||
|
self.result_table = QTableWidget()
|
||||||
|
self.result_table.horizontalHeader().setStretchLastSection(True)
|
||||||
|
main_layout.addWidget(self.result_table)
|
||||||
|
|
||||||
|
# 设置状态栏
|
||||||
|
self.setStatusBar(QStatusBar())
|
||||||
|
self.statusBar().showMessage('就绪')
|
||||||
|
|
||||||
|
def select_file(self):
|
||||||
|
"""选择Excel文件"""
|
||||||
|
file_path, _ = QFileDialog.getOpenFileName(
|
||||||
|
self, '选择Excel文件', '', 'Excel Files (*.xlsx *.xls)'
|
||||||
|
)
|
||||||
|
|
||||||
|
if file_path:
|
||||||
|
try:
|
||||||
|
self.df = pd.read_excel(file_path)
|
||||||
|
self.file_path_label.setText(file_path)
|
||||||
|
self.statusBar().showMessage(f'已加载文件,共 {len(self.df)} 行数据')
|
||||||
|
|
||||||
|
# 填充下拉框并设置默认列
|
||||||
|
self.populate_column_combos()
|
||||||
|
|
||||||
|
# 启用列配置和计算按钮
|
||||||
|
self.column_group.setEnabled(True)
|
||||||
|
self.calculate_btn.setEnabled(True)
|
||||||
|
|
||||||
|
# 显示数据
|
||||||
|
self.display_data(self.df)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
QMessageBox.critical(self, '错误', f'无法读取文件: {str(e)}')
|
||||||
|
self.statusBar().showMessage('文件读取失败')
|
||||||
|
|
||||||
|
def populate_column_combos(self):
|
||||||
|
"""填充列下拉框,并设置指定默认列"""
|
||||||
|
columns = self.df.columns.tolist()
|
||||||
|
|
||||||
|
# 清空现有选项
|
||||||
|
self.source_name_combo.clear()
|
||||||
|
self.source_loc_combo.clear()
|
||||||
|
self.target_name_combo.clear()
|
||||||
|
self.target_loc_combo.clear()
|
||||||
|
|
||||||
|
# 为所有下拉框添加所有列名
|
||||||
|
for col in columns:
|
||||||
|
self.source_name_combo.addItem(col)
|
||||||
|
self.source_loc_combo.addItem(col)
|
||||||
|
self.target_name_combo.addItem(col)
|
||||||
|
self.target_loc_combo.addItem(col)
|
||||||
|
|
||||||
|
# 明确设置默认列(存在则选中,不存在则保持下拉框默认状态)
|
||||||
|
default_cols = {
|
||||||
|
self.source_name_combo: "源文件门店店名",
|
||||||
|
self.source_loc_combo: "源文件地址",
|
||||||
|
self.target_name_combo: "name",
|
||||||
|
self.target_loc_combo: "address"
|
||||||
|
}
|
||||||
|
|
||||||
|
for combo, default_col in default_cols.items():
|
||||||
|
if default_col in columns:
|
||||||
|
combo.setCurrentText(default_col)
|
||||||
|
|
||||||
|
def display_data(self, df):
|
||||||
|
"""在表格中显示数据"""
|
||||||
|
# 限制显示的行数,避免过大的数据导致UI卡顿
|
||||||
|
display_df = df.head(1000) # 只显示前1000行
|
||||||
|
|
||||||
|
# 设置表格行数和列数
|
||||||
|
self.result_table.setRowCount(min(len(display_df), 1000))
|
||||||
|
self.result_table.setColumnCount(len(display_df.columns))
|
||||||
|
|
||||||
|
# 设置列名
|
||||||
|
self.result_table.setHorizontalHeaderLabels(display_df.columns)
|
||||||
|
|
||||||
|
# 填充数据
|
||||||
|
for row_idx, (_, row) in enumerate(display_df.iterrows()):
|
||||||
|
for col_idx, value in enumerate(row):
|
||||||
|
item = QTableWidgetItem(str(value))
|
||||||
|
item.setTextAlignment(Qt.AlignCenter)
|
||||||
|
# 如果是相似度列,根据值设置背景色
|
||||||
|
if display_df.columns[col_idx] in ['名称相似度', '地址相似度', '综合相似度']:
|
||||||
|
try:
|
||||||
|
val = float(value)
|
||||||
|
# 设置颜色从红色(0)到绿色(100)
|
||||||
|
r = 255 - int(val * 2.55)
|
||||||
|
g = int(val * 2.55)
|
||||||
|
b = 100
|
||||||
|
item.setBackground(f"rgb({r}, {g}, {b})")
|
||||||
|
item.setForeground(Qt.white if val < 50 else Qt.black)
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
self.result_table.setItem(row_idx, col_idx, item)
|
||||||
|
|
||||||
|
# 调整列宽
|
||||||
|
self.result_table.resizeColumnsToContents()
|
||||||
|
|
||||||
|
def start_calculation(self):
|
||||||
|
"""开始计算相似度"""
|
||||||
|
# 获取选中的列
|
||||||
|
source_name_col = self.source_name_combo.currentText()
|
||||||
|
source_loc_col = self.source_loc_combo.currentText()
|
||||||
|
target_name_col = self.target_name_combo.currentText()
|
||||||
|
target_loc_col = self.target_loc_combo.currentText()
|
||||||
|
|
||||||
|
# 检查列是否有效(下拉框保证选中的列一定存在,故可简化检查)
|
||||||
|
if not all([source_name_col, source_loc_col, target_name_col, target_loc_col]):
|
||||||
|
QMessageBox.warning(self, '警告', '请选择所有列')
|
||||||
|
return
|
||||||
|
|
||||||
|
# 禁用按钮
|
||||||
|
self.calculate_btn.setEnabled(False)
|
||||||
|
self.select_file_btn.setEnabled(False)
|
||||||
|
self.save_btn.setEnabled(False)
|
||||||
|
|
||||||
|
# 显示进度条
|
||||||
|
self.progress_bar.setVisible(True)
|
||||||
|
self.progress_bar.setValue(0)
|
||||||
|
self.statusBar().showMessage('正在计算相似度...')
|
||||||
|
|
||||||
|
# 创建并启动计算线程
|
||||||
|
self.calc_thread = CalculationThread(
|
||||||
|
self.df, source_name_col, source_loc_col, target_name_col, target_loc_col
|
||||||
|
)
|
||||||
|
self.calc_thread.progress_updated.connect(self.update_progress)
|
||||||
|
self.calc_thread.calculation_finished.connect(self.on_calculation_finished)
|
||||||
|
self.calc_thread.error_occurred.connect(self.on_calculation_error)
|
||||||
|
self.calc_thread.start()
|
||||||
|
|
||||||
|
def update_progress(self, value):
|
||||||
|
"""更新进度条"""
|
||||||
|
self.progress_bar.setValue(value)
|
||||||
|
self.statusBar().showMessage(f'正在计算相似度... {value}%')
|
||||||
|
|
||||||
|
def on_calculation_finished(self, result_df):
|
||||||
|
"""计算完成后的处理"""
|
||||||
|
self.df = result_df
|
||||||
|
self.display_data(self.df)
|
||||||
|
self.progress_bar.setValue(100)
|
||||||
|
self.statusBar().showMessage('相似度计算完成')
|
||||||
|
|
||||||
|
# 启用按钮
|
||||||
|
self.calculate_btn.setEnabled(True)
|
||||||
|
self.select_file_btn.setEnabled(True)
|
||||||
|
self.save_btn.setEnabled(True)
|
||||||
|
|
||||||
|
QMessageBox.information(self, '完成', '相似度计算已完成')
|
||||||
|
|
||||||
|
def on_calculation_error(self, error_msg):
|
||||||
|
"""处理计算错误"""
|
||||||
|
self.statusBar().showMessage('计算出错')
|
||||||
|
QMessageBox.critical(self, '计算错误', f'计算过程中发生错误: {error_msg}')
|
||||||
|
|
||||||
|
# 启用按钮
|
||||||
|
self.calculate_btn.setEnabled(True)
|
||||||
|
self.select_file_btn.setEnabled(True)
|
||||||
|
|
||||||
|
def save_results(self):
|
||||||
|
"""保存结果到Excel文件(增强错误处理)"""
|
||||||
|
if self.df is None:
|
||||||
|
QMessageBox.warning(self, '警告', '没有可保存的数据')
|
||||||
|
return
|
||||||
|
|
||||||
|
file_path, _ = QFileDialog.getSaveFileName(
|
||||||
|
self, '保存结果', '', 'Excel Files (*.xlsx)'
|
||||||
|
)
|
||||||
|
|
||||||
|
if file_path:
|
||||||
|
try:
|
||||||
|
# 确保文件扩展名正确
|
||||||
|
if not file_path.endswith('.xlsx'):
|
||||||
|
file_path += '.xlsx'
|
||||||
|
|
||||||
|
# 尝试保存(带详细错误捕获)
|
||||||
|
self.df.to_excel(file_path, index=False)
|
||||||
|
self.statusBar().showMessage(f'结果已保存到 {file_path}')
|
||||||
|
QMessageBox.information(self, '成功', f'结果已成功保存到 {file_path}')
|
||||||
|
except PermissionError:
|
||||||
|
QMessageBox.critical(self, '权限错误',
|
||||||
|
'保存失败:没有写入权限,请检查文件是否被占用,或选择其他路径/文件名。')
|
||||||
|
except FileNotFoundError:
|
||||||
|
QMessageBox.critical(self, '路径错误',
|
||||||
|
'保存失败:目标路径不存在,请选择有效的保存位置。')
|
||||||
|
except Exception as e:
|
||||||
|
QMessageBox.critical(self, '未知错误', f'保存文件失败: {str(e)}')
|
||||||
|
self.statusBar().showMessage('保存文件失败')
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
app = QApplication(sys.argv)
|
||||||
|
|
||||||
|
# 设置全局字体,确保中文正常显示
|
||||||
|
font = QFont()
|
||||||
|
font.setFamily("SimHei")
|
||||||
|
app.setFont(font)
|
||||||
|
|
||||||
|
window = SimilarityCalculator()
|
||||||
|
window.show()
|
||||||
|
sys.exit(app.exec_())
|
||||||
@@ -525,3 +525,464 @@
|
|||||||
2025-09-23 16:24:42,473 - api.py - task_logger - INFO - 多数据写入行数: 4188
|
2025-09-23 16:24:42,473 - api.py - task_logger - INFO - 多数据写入行数: 4188
|
||||||
2025-09-23 16:24:58,057 - 高德匹配手机号.py - task_logger - INFO - 数据上传完成。
|
2025-09-23 16:24:58,057 - 高德匹配手机号.py - task_logger - INFO - 数据上传完成。
|
||||||
2025-09-23 16:24:58,178 - common_module.py - task_logger - INFO - 任务状态发送成功: {'data': {'creator': {'name': 'F6汽车科技', 'username': '#admin', 'status': 1, 'type': 0}, 'updater': {'name': 'F6汽车科技', 'username': '#admin', 'status': 1, 'type': 0}, 'deleter': None, 'createTime': '2025-09-23T08:24:56.968Z', 'updateTime': '2025-09-23T08:24:56.968Z', 'deleteTime': None, '_widget_1744873387500': '2025-09-23T00:00:00.000Z', '_widget_1743644977694': '高德匹配手机号', '_widget_1744873387501': '2025-09-23T08:22:48.000Z', '_widget_1744873387502': '2025-09-23T08:24:58.000Z', '_widget_1744873387504': '130', '_id': '68d25958856a1852caa6decb', 'appId': '6694d3c4fcb69ca9a111a6c4', 'entryId': '67ede908eb9c22261016466e'}}
|
2025-09-23 16:24:58,178 - common_module.py - task_logger - INFO - 任务状态发送成功: {'data': {'creator': {'name': 'F6汽车科技', 'username': '#admin', 'status': 1, 'type': 0}, 'updater': {'name': 'F6汽车科技', 'username': '#admin', 'status': 1, 'type': 0}, 'deleter': None, 'createTime': '2025-09-23T08:24:56.968Z', 'updateTime': '2025-09-23T08:24:56.968Z', 'deleteTime': None, '_widget_1744873387500': '2025-09-23T00:00:00.000Z', '_widget_1743644977694': '高德匹配手机号', '_widget_1744873387501': '2025-09-23T08:22:48.000Z', '_widget_1744873387502': '2025-09-23T08:24:58.000Z', '_widget_1744873387504': '130', '_id': '68d25958856a1852caa6decb', 'appId': '6694d3c4fcb69ca9a111a6c4', 'entryId': '67ede908eb9c22261016466e'}}
|
||||||
|
2025-09-24 11:19:15,671 - api.py - task_logger - INFO - 已获取 100 条数据
|
||||||
|
2025-09-24 11:19:15,806 - api.py - task_logger - INFO - 已获取 200 条数据
|
||||||
|
2025-09-24 11:19:15,961 - api.py - task_logger - INFO - 已获取 300 条数据
|
||||||
|
2025-09-24 11:19:16,117 - api.py - task_logger - INFO - 已获取 400 条数据
|
||||||
|
2025-09-24 11:19:16,274 - api.py - task_logger - INFO - 已获取 500 条数据
|
||||||
|
2025-09-24 11:19:16,422 - api.py - task_logger - INFO - 已获取 600 条数据
|
||||||
|
2025-09-24 11:19:16,630 - api.py - task_logger - INFO - 已获取 700 条数据
|
||||||
|
2025-09-24 11:19:16,789 - api.py - task_logger - INFO - 已获取 800 条数据
|
||||||
|
2025-09-24 11:19:16,911 - api.py - task_logger - INFO - 已获取 900 条数据
|
||||||
|
2025-09-24 11:19:17,526 - api.py - task_logger - INFO - 已获取 1000 条数据
|
||||||
|
2025-09-24 11:19:17,672 - api.py - task_logger - INFO - 已获取 1100 条数据
|
||||||
|
2025-09-24 11:19:17,826 - api.py - task_logger - INFO - 已获取 1200 条数据
|
||||||
|
2025-09-24 11:19:17,946 - api.py - task_logger - INFO - 已获取 1300 条数据
|
||||||
|
2025-09-24 11:19:18,082 - api.py - task_logger - INFO - 已获取 1400 条数据
|
||||||
|
2025-09-24 11:19:18,225 - api.py - task_logger - INFO - 已获取 1500 条数据
|
||||||
|
2025-09-24 11:19:18,396 - api.py - task_logger - INFO - 已获取 1600 条数据
|
||||||
|
2025-09-24 11:19:18,530 - api.py - task_logger - INFO - 已获取 1700 条数据
|
||||||
|
2025-09-24 11:19:18,942 - api.py - task_logger - INFO - 已获取 1800 条数据
|
||||||
|
2025-09-24 11:19:19,092 - api.py - task_logger - INFO - 已获取 1900 条数据
|
||||||
|
2025-09-24 11:19:19,236 - api.py - task_logger - INFO - 已获取 2000 条数据
|
||||||
|
2025-09-24 11:19:19,374 - api.py - task_logger - INFO - 已获取 2100 条数据
|
||||||
|
2025-09-24 11:19:19,550 - api.py - task_logger - INFO - 已获取 2200 条数据
|
||||||
|
2025-09-24 11:19:19,698 - api.py - task_logger - INFO - 已获取 2300 条数据
|
||||||
|
2025-09-24 11:19:19,858 - api.py - task_logger - INFO - 已获取 2400 条数据
|
||||||
|
2025-09-24 11:19:19,976 - api.py - task_logger - INFO - 已获取 2500 条数据
|
||||||
|
2025-09-24 11:19:20,126 - api.py - task_logger - INFO - 已获取 2600 条数据
|
||||||
|
2025-09-24 11:19:21,582 - api.py - task_logger - INFO - 已获取 2700 条数据
|
||||||
|
2025-09-24 11:19:21,718 - api.py - task_logger - INFO - 已获取 2800 条数据
|
||||||
|
2025-09-24 11:19:22,015 - api.py - task_logger - INFO - 已获取 2900 条数据
|
||||||
|
2025-09-24 11:19:22,156 - api.py - task_logger - INFO - 已获取 3000 条数据
|
||||||
|
2025-09-24 11:19:22,305 - api.py - task_logger - INFO - 已获取 3100 条数据
|
||||||
|
2025-09-24 11:19:22,462 - api.py - task_logger - INFO - 已获取 3200 条数据
|
||||||
|
2025-09-24 11:19:22,605 - api.py - task_logger - INFO - 已获取 3300 条数据
|
||||||
|
2025-09-24 11:19:22,747 - api.py - task_logger - INFO - 已获取 3400 条数据
|
||||||
|
2025-09-24 11:19:22,921 - api.py - task_logger - INFO - 已获取 3500 条数据
|
||||||
|
2025-09-24 11:19:23,054 - api.py - task_logger - INFO - 已获取 3600 条数据
|
||||||
|
2025-09-24 11:19:23,176 - api.py - task_logger - INFO - 已获取 3670 条数据
|
||||||
|
2025-09-24 11:19:24,345 - api.py - task_logger - INFO - 已获取 100 条数据
|
||||||
|
2025-09-24 11:19:24,430 - api.py - task_logger - INFO - 已获取 145 条数据
|
||||||
|
2025-09-24 11:19:24,869 - api.py - task_logger - INFO - 已获取 100 条数据
|
||||||
|
2025-09-24 11:19:25,220 - api.py - task_logger - INFO - 已获取 200 条数据
|
||||||
|
2025-09-24 11:19:25,572 - api.py - task_logger - INFO - 已获取 300 条数据
|
||||||
|
2025-09-24 11:19:26,042 - api.py - task_logger - INFO - 已获取 400 条数据
|
||||||
|
2025-09-24 11:19:27,393 - api.py - task_logger - INFO - 已获取 500 条数据
|
||||||
|
2025-09-24 11:19:27,802 - api.py - task_logger - INFO - 已获取 600 条数据
|
||||||
|
2025-09-24 11:19:28,137 - api.py - task_logger - INFO - 已获取 700 条数据
|
||||||
|
2025-09-24 11:19:28,468 - api.py - task_logger - INFO - 已获取 800 条数据
|
||||||
|
2025-09-24 11:19:32,550 - api.py - task_logger - INFO - 已获取 900 条数据
|
||||||
|
2025-09-24 11:19:32,946 - api.py - task_logger - INFO - 已获取 1000 条数据
|
||||||
|
2025-09-24 11:19:33,425 - api.py - task_logger - INFO - 已获取 1100 条数据
|
||||||
|
2025-09-24 11:19:33,839 - api.py - task_logger - INFO - 已获取 1200 条数据
|
||||||
|
2025-09-24 11:19:34,194 - api.py - task_logger - INFO - 已获取 1300 条数据
|
||||||
|
2025-09-24 11:19:34,608 - api.py - task_logger - INFO - 已获取 1400 条数据
|
||||||
|
2025-09-24 11:19:34,913 - api.py - task_logger - INFO - 已获取 1500 条数据
|
||||||
|
2025-09-24 11:19:35,200 - api.py - task_logger - INFO - 已获取 1600 条数据
|
||||||
|
2025-09-24 11:19:35,577 - api.py - task_logger - INFO - 已获取 1700 条数据
|
||||||
|
2025-09-24 11:19:35,906 - api.py - task_logger - INFO - 已获取 1800 条数据
|
||||||
|
2025-09-24 11:19:36,211 - api.py - task_logger - INFO - 已获取 1900 条数据
|
||||||
|
2025-09-24 11:19:36,546 - api.py - task_logger - INFO - 已获取 2000 条数据
|
||||||
|
2025-09-24 11:19:36,874 - api.py - task_logger - INFO - 已获取 2100 条数据
|
||||||
|
2025-09-24 11:19:37,190 - api.py - task_logger - INFO - 已获取 2200 条数据
|
||||||
|
2025-09-24 11:19:37,715 - api.py - task_logger - INFO - 已获取 2300 条数据
|
||||||
|
2025-09-24 11:19:38,049 - api.py - task_logger - INFO - 已获取 2400 条数据
|
||||||
|
2025-09-24 11:19:38,396 - api.py - task_logger - INFO - 已获取 2500 条数据
|
||||||
|
2025-09-24 11:19:38,721 - api.py - task_logger - INFO - 已获取 2600 条数据
|
||||||
|
2025-09-24 11:19:39,086 - api.py - task_logger - INFO - 已获取 2700 条数据
|
||||||
|
2025-09-24 11:19:39,830 - api.py - task_logger - INFO - 已获取 2800 条数据
|
||||||
|
2025-09-24 11:19:40,115 - api.py - task_logger - INFO - 已获取 2900 条数据
|
||||||
|
2025-09-24 11:19:40,452 - api.py - task_logger - INFO - 已获取 3000 条数据
|
||||||
|
2025-09-24 11:19:45,898 - api.py - task_logger - INFO - 已获取 3100 条数据
|
||||||
|
2025-09-24 11:19:46,270 - api.py - task_logger - INFO - 已获取 3200 条数据
|
||||||
|
2025-09-24 11:19:46,600 - api.py - task_logger - INFO - 已获取 3300 条数据
|
||||||
|
2025-09-24 11:19:46,922 - api.py - task_logger - INFO - 已获取 3400 条数据
|
||||||
|
2025-09-24 11:19:47,245 - api.py - task_logger - INFO - 已获取 3500 条数据
|
||||||
|
2025-09-24 11:19:47,685 - api.py - task_logger - INFO - 已获取 3600 条数据
|
||||||
|
2025-09-24 11:19:48,015 - api.py - task_logger - INFO - 已获取 3700 条数据
|
||||||
|
2025-09-24 11:19:48,372 - api.py - task_logger - INFO - 已获取 3800 条数据
|
||||||
|
2025-09-24 11:19:48,691 - api.py - task_logger - INFO - 已获取 3900 条数据
|
||||||
|
2025-09-24 11:19:50,283 - api.py - task_logger - INFO - 已获取 4000 条数据
|
||||||
|
2025-09-24 11:19:50,651 - api.py - task_logger - INFO - 已获取 4100 条数据
|
||||||
|
2025-09-24 11:19:50,994 - api.py - task_logger - INFO - 已获取 4200 条数据
|
||||||
|
2025-09-24 11:19:51,316 - api.py - task_logger - INFO - 已获取 4300 条数据
|
||||||
|
2025-09-24 11:19:51,653 - api.py - task_logger - INFO - 已获取 4400 条数据
|
||||||
|
2025-09-24 11:19:51,975 - api.py - task_logger - INFO - 已获取 4500 条数据
|
||||||
|
2025-09-24 11:19:52,960 - api.py - task_logger - INFO - 已获取 4600 条数据
|
||||||
|
2025-09-24 11:19:53,263 - api.py - task_logger - INFO - 已获取 4700 条数据
|
||||||
|
2025-09-24 11:19:54,390 - api.py - task_logger - INFO - 已获取 4800 条数据
|
||||||
|
2025-09-24 11:19:54,730 - api.py - task_logger - INFO - 已获取 4900 条数据
|
||||||
|
2025-09-24 11:19:55,076 - api.py - task_logger - INFO - 已获取 5000 条数据
|
||||||
|
2025-09-24 11:19:55,397 - api.py - task_logger - INFO - 已获取 5100 条数据
|
||||||
|
2025-09-24 11:19:55,737 - api.py - task_logger - INFO - 已获取 5200 条数据
|
||||||
|
2025-09-24 11:19:56,130 - api.py - task_logger - INFO - 已获取 5300 条数据
|
||||||
|
2025-09-24 11:19:56,455 - api.py - task_logger - INFO - 已获取 5400 条数据
|
||||||
|
2025-09-24 11:19:56,755 - api.py - task_logger - INFO - 已获取 5500 条数据
|
||||||
|
2025-09-24 11:19:57,115 - api.py - task_logger - INFO - 已获取 5600 条数据
|
||||||
|
2025-09-24 11:19:57,494 - api.py - task_logger - INFO - 已获取 5700 条数据
|
||||||
|
2025-09-24 11:19:57,819 - api.py - task_logger - INFO - 已获取 5800 条数据
|
||||||
|
2025-09-24 11:19:59,390 - api.py - task_logger - INFO - 已获取 5900 条数据
|
||||||
|
2025-09-24 11:19:59,711 - api.py - task_logger - INFO - 已获取 6000 条数据
|
||||||
|
2025-09-24 11:20:00,020 - api.py - task_logger - INFO - 已获取 6100 条数据
|
||||||
|
2025-09-24 11:20:00,348 - api.py - task_logger - INFO - 已获取 6200 条数据
|
||||||
|
2025-09-24 11:20:04,936 - api.py - task_logger - INFO - 已获取 6300 条数据
|
||||||
|
2025-09-24 11:20:05,242 - api.py - task_logger - INFO - 已获取 6400 条数据
|
||||||
|
2025-09-24 11:20:05,554 - api.py - task_logger - INFO - 已获取 6500 条数据
|
||||||
|
2025-09-24 11:20:06,063 - api.py - task_logger - INFO - 已获取 6600 条数据
|
||||||
|
2025-09-24 11:20:06,428 - api.py - task_logger - INFO - 已获取 6700 条数据
|
||||||
|
2025-09-24 11:20:06,770 - api.py - task_logger - INFO - 已获取 6800 条数据
|
||||||
|
2025-09-24 11:20:07,077 - api.py - task_logger - INFO - 已获取 6900 条数据
|
||||||
|
2025-09-24 11:20:07,402 - api.py - task_logger - INFO - 已获取 7000 条数据
|
||||||
|
2025-09-24 11:20:07,740 - api.py - task_logger - INFO - 已获取 7100 条数据
|
||||||
|
2025-09-24 11:20:08,067 - api.py - task_logger - INFO - 已获取 7200 条数据
|
||||||
|
2025-09-24 11:20:08,403 - api.py - task_logger - INFO - 已获取 7300 条数据
|
||||||
|
2025-09-24 11:20:08,740 - api.py - task_logger - INFO - 已获取 7400 条数据
|
||||||
|
2025-09-24 11:20:09,080 - api.py - task_logger - INFO - 已获取 7500 条数据
|
||||||
|
2025-09-24 11:20:09,393 - api.py - task_logger - INFO - 已获取 7600 条数据
|
||||||
|
2025-09-24 11:20:17,447 - api.py - task_logger - INFO - 已获取 7700 条数据
|
||||||
|
2025-09-24 11:20:17,794 - api.py - task_logger - INFO - 已获取 7800 条数据
|
||||||
|
2025-09-24 11:20:18,126 - api.py - task_logger - INFO - 已获取 7900 条数据
|
||||||
|
2025-09-24 11:20:18,490 - api.py - task_logger - INFO - 已获取 8000 条数据
|
||||||
|
2025-09-24 11:20:18,794 - api.py - task_logger - INFO - 已获取 8100 条数据
|
||||||
|
2025-09-24 11:20:19,614 - api.py - task_logger - INFO - 已获取 8200 条数据
|
||||||
|
2025-09-24 11:20:19,931 - api.py - task_logger - INFO - 已获取 8300 条数据
|
||||||
|
2025-09-24 11:20:20,245 - api.py - task_logger - INFO - 已获取 8400 条数据
|
||||||
|
2025-09-24 11:20:20,557 - api.py - task_logger - INFO - 已获取 8500 条数据
|
||||||
|
2025-09-24 11:20:20,906 - api.py - task_logger - INFO - 已获取 8600 条数据
|
||||||
|
2025-09-24 11:20:22,847 - api.py - task_logger - INFO - 已获取 8700 条数据
|
||||||
|
2025-09-24 11:20:23,153 - api.py - task_logger - INFO - 已获取 8800 条数据
|
||||||
|
2025-09-24 11:20:23,463 - api.py - task_logger - INFO - 已获取 8900 条数据
|
||||||
|
2025-09-24 11:20:23,946 - api.py - task_logger - INFO - 已获取 9000 条数据
|
||||||
|
2025-09-24 11:20:24,250 - api.py - task_logger - INFO - 已获取 9100 条数据
|
||||||
|
2025-09-24 11:20:24,553 - api.py - task_logger - INFO - 已获取 9200 条数据
|
||||||
|
2025-09-24 11:20:25,801 - api.py - task_logger - INFO - 已获取 9300 条数据
|
||||||
|
2025-09-24 11:20:26,143 - api.py - task_logger - INFO - 已获取 9400 条数据
|
||||||
|
2025-09-24 11:20:26,449 - api.py - task_logger - INFO - 已获取 9500 条数据
|
||||||
|
2025-09-24 11:20:29,576 - api.py - task_logger - INFO - 已获取 9600 条数据
|
||||||
|
2025-09-24 11:20:29,882 - api.py - task_logger - INFO - 已获取 9700 条数据
|
||||||
|
2025-09-24 11:20:30,189 - api.py - task_logger - INFO - 已获取 9800 条数据
|
||||||
|
2025-09-24 11:20:30,509 - api.py - task_logger - INFO - 已获取 9900 条数据
|
||||||
|
2025-09-24 11:20:31,099 - api.py - task_logger - INFO - 已获取 10000 条数据
|
||||||
|
2025-09-24 11:20:31,422 - api.py - task_logger - INFO - 已获取 10100 条数据
|
||||||
|
2025-09-24 11:20:31,740 - api.py - task_logger - INFO - 已获取 10200 条数据
|
||||||
|
2025-09-24 11:20:32,057 - api.py - task_logger - INFO - 已获取 10300 条数据
|
||||||
|
2025-09-24 11:20:32,401 - api.py - task_logger - INFO - 已获取 10400 条数据
|
||||||
|
2025-09-24 11:20:32,754 - api.py - task_logger - INFO - 已获取 10500 条数据
|
||||||
|
2025-09-24 11:20:33,087 - api.py - task_logger - INFO - 已获取 10600 条数据
|
||||||
|
2025-09-24 11:20:33,812 - api.py - task_logger - INFO - 已获取 10700 条数据
|
||||||
|
2025-09-24 11:20:34,151 - api.py - task_logger - INFO - 已获取 10800 条数据
|
||||||
|
2025-09-24 11:20:34,591 - api.py - task_logger - INFO - 已获取 10900 条数据
|
||||||
|
2025-09-24 11:20:34,889 - api.py - task_logger - INFO - 已获取 11000 条数据
|
||||||
|
2025-09-24 11:20:35,201 - api.py - task_logger - INFO - 已获取 11100 条数据
|
||||||
|
2025-09-24 11:20:35,532 - api.py - task_logger - INFO - 已获取 11200 条数据
|
||||||
|
2025-09-24 11:20:35,844 - api.py - task_logger - INFO - 已获取 11300 条数据
|
||||||
|
2025-09-24 11:20:36,148 - api.py - task_logger - INFO - 已获取 11400 条数据
|
||||||
|
2025-09-24 11:20:36,468 - api.py - task_logger - INFO - 已获取 11500 条数据
|
||||||
|
2025-09-24 11:20:36,794 - api.py - task_logger - INFO - 已获取 11600 条数据
|
||||||
|
2025-09-24 11:20:37,377 - api.py - task_logger - INFO - 已获取 11700 条数据
|
||||||
|
2025-09-24 11:20:37,719 - api.py - task_logger - INFO - 已获取 11800 条数据
|
||||||
|
2025-09-24 11:20:38,012 - api.py - task_logger - INFO - 已获取 11900 条数据
|
||||||
|
2025-09-24 11:20:38,404 - api.py - task_logger - INFO - 已获取 12000 条数据
|
||||||
|
2025-09-24 11:20:38,737 - api.py - task_logger - INFO - 已获取 12100 条数据
|
||||||
|
2025-09-24 11:20:39,066 - api.py - task_logger - INFO - 已获取 12200 条数据
|
||||||
|
2025-09-24 11:20:39,410 - api.py - task_logger - INFO - 已获取 12300 条数据
|
||||||
|
2025-09-24 11:20:39,721 - api.py - task_logger - INFO - 已获取 12400 条数据
|
||||||
|
2025-09-24 11:20:40,033 - api.py - task_logger - INFO - 已获取 12500 条数据
|
||||||
|
2025-09-24 11:20:40,403 - api.py - task_logger - INFO - 已获取 12600 条数据
|
||||||
|
2025-09-24 11:20:40,731 - api.py - task_logger - INFO - 已获取 12700 条数据
|
||||||
|
2025-09-24 11:20:41,050 - api.py - task_logger - INFO - 已获取 12800 条数据
|
||||||
|
2025-09-24 11:20:41,372 - api.py - task_logger - INFO - 已获取 12900 条数据
|
||||||
|
2025-09-24 11:20:41,687 - api.py - task_logger - INFO - 已获取 13000 条数据
|
||||||
|
2025-09-24 11:20:42,013 - api.py - task_logger - INFO - 已获取 13100 条数据
|
||||||
|
2025-09-24 11:20:42,341 - api.py - task_logger - INFO - 已获取 13200 条数据
|
||||||
|
2025-09-24 11:20:42,669 - api.py - task_logger - INFO - 已获取 13300 条数据
|
||||||
|
2025-09-24 11:20:42,987 - api.py - task_logger - INFO - 已获取 13400 条数据
|
||||||
|
2025-09-24 11:20:43,319 - api.py - task_logger - INFO - 已获取 13500 条数据
|
||||||
|
2025-09-24 11:20:43,641 - api.py - task_logger - INFO - 已获取 13600 条数据
|
||||||
|
2025-09-24 11:20:43,954 - api.py - task_logger - INFO - 已获取 13700 条数据
|
||||||
|
2025-09-24 11:20:44,218 - api.py - task_logger - INFO - 已获取 13800 条数据
|
||||||
|
2025-09-24 11:20:44,546 - api.py - task_logger - INFO - 已获取 13900 条数据
|
||||||
|
2025-09-24 11:20:47,108 - api.py - task_logger - INFO - 已获取 14000 条数据
|
||||||
|
2025-09-24 11:20:47,457 - api.py - task_logger - INFO - 已获取 14100 条数据
|
||||||
|
2025-09-24 11:20:47,790 - api.py - task_logger - INFO - 已获取 14200 条数据
|
||||||
|
2025-09-24 11:20:48,115 - api.py - task_logger - INFO - 已获取 14300 条数据
|
||||||
|
2025-09-24 11:20:48,447 - api.py - task_logger - INFO - 已获取 14400 条数据
|
||||||
|
2025-09-24 11:20:48,801 - api.py - task_logger - INFO - 已获取 14500 条数据
|
||||||
|
2025-09-24 11:20:49,102 - api.py - task_logger - INFO - 已获取 14600 条数据
|
||||||
|
2025-09-24 11:20:49,428 - api.py - task_logger - INFO - 已获取 14700 条数据
|
||||||
|
2025-09-24 11:20:49,762 - api.py - task_logger - INFO - 已获取 14800 条数据
|
||||||
|
2025-09-24 11:20:50,086 - api.py - task_logger - INFO - 已获取 14900 条数据
|
||||||
|
2025-09-24 11:20:50,432 - api.py - task_logger - INFO - 已获取 15000 条数据
|
||||||
|
2025-09-24 11:20:50,784 - api.py - task_logger - INFO - 已获取 15100 条数据
|
||||||
|
2025-09-24 11:20:51,189 - api.py - task_logger - INFO - 已获取 15200 条数据
|
||||||
|
2025-09-24 11:20:51,490 - api.py - task_logger - INFO - 已获取 15300 条数据
|
||||||
|
2025-09-24 11:20:51,845 - api.py - task_logger - INFO - 已获取 15400 条数据
|
||||||
|
2025-09-24 11:20:52,168 - api.py - task_logger - INFO - 已获取 15500 条数据
|
||||||
|
2025-09-24 11:20:52,505 - api.py - task_logger - INFO - 已获取 15600 条数据
|
||||||
|
2025-09-24 11:20:52,796 - api.py - task_logger - INFO - 已获取 15700 条数据
|
||||||
|
2025-09-24 11:20:53,129 - api.py - task_logger - INFO - 已获取 15800 条数据
|
||||||
|
2025-09-24 11:20:53,472 - api.py - task_logger - INFO - 已获取 15900 条数据
|
||||||
|
2025-09-24 11:20:53,800 - api.py - task_logger - INFO - 已获取 16000 条数据
|
||||||
|
2025-09-24 11:20:54,124 - api.py - task_logger - INFO - 已获取 16100 条数据
|
||||||
|
2025-09-24 11:20:54,444 - api.py - task_logger - INFO - 已获取 16200 条数据
|
||||||
|
2025-09-24 11:20:56,267 - api.py - task_logger - INFO - 已获取 16300 条数据
|
||||||
|
2025-09-24 11:20:59,351 - api.py - task_logger - INFO - 已获取 16400 条数据
|
||||||
|
2025-09-24 11:20:59,674 - api.py - task_logger - INFO - 已获取 16500 条数据
|
||||||
|
2025-09-24 11:21:05,035 - api.py - task_logger - INFO - 已获取 16600 条数据
|
||||||
|
2025-09-24 11:21:05,382 - api.py - task_logger - INFO - 已获取 16700 条数据
|
||||||
|
2025-09-24 11:21:05,690 - api.py - task_logger - INFO - 已获取 16800 条数据
|
||||||
|
2025-09-24 11:21:06,606 - api.py - task_logger - INFO - 已获取 16900 条数据
|
||||||
|
2025-09-24 11:21:07,864 - api.py - task_logger - INFO - 已获取 17000 条数据
|
||||||
|
2025-09-24 11:21:08,196 - api.py - task_logger - INFO - 已获取 17100 条数据
|
||||||
|
2025-09-24 11:21:08,574 - api.py - task_logger - INFO - 已获取 17200 条数据
|
||||||
|
2025-09-24 11:21:08,996 - api.py - task_logger - INFO - 已获取 17300 条数据
|
||||||
|
2025-09-24 11:21:09,312 - api.py - task_logger - INFO - 已获取 17400 条数据
|
||||||
|
2025-09-24 11:21:19,364 - api.py - task_logger - WARNING - 请求异常: HTTPSConnectionPool(host='api.jiandaoyun.com', port=443): Read timed out. (read timeout=10), 将重新请求
|
||||||
|
2025-09-24 11:21:19,779 - api.py - task_logger - INFO - 已获取 17500 条数据
|
||||||
|
2025-09-24 11:21:20,121 - api.py - task_logger - INFO - 已获取 17600 条数据
|
||||||
|
2025-09-24 11:21:20,438 - api.py - task_logger - INFO - 已获取 17700 条数据
|
||||||
|
2025-09-24 11:21:20,752 - api.py - task_logger - INFO - 已获取 17800 条数据
|
||||||
|
2025-09-24 11:21:21,069 - api.py - task_logger - INFO - 已获取 17900 条数据
|
||||||
|
2025-09-24 11:21:21,435 - api.py - task_logger - INFO - 已获取 18000 条数据
|
||||||
|
2025-09-24 11:21:21,755 - api.py - task_logger - INFO - 已获取 18100 条数据
|
||||||
|
2025-09-24 11:21:22,104 - api.py - task_logger - INFO - 已获取 18200 条数据
|
||||||
|
2025-09-24 11:21:22,796 - api.py - task_logger - INFO - 已获取 18300 条数据
|
||||||
|
2025-09-24 11:21:23,105 - api.py - task_logger - INFO - 已获取 18400 条数据
|
||||||
|
2025-09-24 11:21:24,267 - api.py - task_logger - INFO - 已获取 18500 条数据
|
||||||
|
2025-09-24 11:21:24,589 - api.py - task_logger - INFO - 已获取 18600 条数据
|
||||||
|
2025-09-24 11:21:24,919 - api.py - task_logger - INFO - 已获取 18700 条数据
|
||||||
|
2025-09-24 11:21:25,217 - api.py - task_logger - INFO - 已获取 18800 条数据
|
||||||
|
2025-09-24 11:21:26,217 - api.py - task_logger - INFO - 已获取 18900 条数据
|
||||||
|
2025-09-24 11:21:26,581 - api.py - task_logger - INFO - 已获取 19000 条数据
|
||||||
|
2025-09-24 11:21:26,951 - api.py - task_logger - INFO - 已获取 19100 条数据
|
||||||
|
2025-09-24 11:21:27,356 - api.py - task_logger - INFO - 已获取 19200 条数据
|
||||||
|
2025-09-24 11:21:27,671 - api.py - task_logger - INFO - 已获取 19300 条数据
|
||||||
|
2025-09-24 11:21:27,961 - api.py - task_logger - INFO - 已获取 19400 条数据
|
||||||
|
2025-09-24 11:21:28,278 - api.py - task_logger - INFO - 已获取 19500 条数据
|
||||||
|
2025-09-24 11:21:28,966 - api.py - task_logger - INFO - 已获取 19600 条数据
|
||||||
|
2025-09-24 11:21:29,323 - api.py - task_logger - INFO - 已获取 19700 条数据
|
||||||
|
2025-09-24 11:21:29,685 - api.py - task_logger - INFO - 已获取 19800 条数据
|
||||||
|
2025-09-24 11:21:29,989 - api.py - task_logger - INFO - 已获取 19900 条数据
|
||||||
|
2025-09-24 11:21:30,302 - api.py - task_logger - INFO - 已获取 20000 条数据
|
||||||
|
2025-09-24 11:21:30,628 - api.py - task_logger - INFO - 已获取 20100 条数据
|
||||||
|
2025-09-24 11:21:30,966 - api.py - task_logger - INFO - 已获取 20200 条数据
|
||||||
|
2025-09-24 11:21:31,324 - api.py - task_logger - INFO - 已获取 20300 条数据
|
||||||
|
2025-09-24 11:21:31,666 - api.py - task_logger - INFO - 已获取 20400 条数据
|
||||||
|
2025-09-24 11:21:31,989 - api.py - task_logger - INFO - 已获取 20500 条数据
|
||||||
|
2025-09-24 11:21:32,339 - api.py - task_logger - INFO - 已获取 20600 条数据
|
||||||
|
2025-09-24 11:21:32,648 - api.py - task_logger - INFO - 已获取 20700 条数据
|
||||||
|
2025-09-24 11:21:33,000 - api.py - task_logger - INFO - 已获取 20800 条数据
|
||||||
|
2025-09-24 11:21:33,356 - api.py - task_logger - INFO - 已获取 20900 条数据
|
||||||
|
2025-09-24 11:21:33,671 - api.py - task_logger - INFO - 已获取 21000 条数据
|
||||||
|
2025-09-24 11:21:33,989 - api.py - task_logger - INFO - 已获取 21100 条数据
|
||||||
|
2025-09-24 11:21:34,286 - api.py - task_logger - INFO - 已获取 21200 条数据
|
||||||
|
2025-09-24 11:21:34,626 - api.py - task_logger - INFO - 已获取 21300 条数据
|
||||||
|
2025-09-24 11:21:34,962 - api.py - task_logger - INFO - 已获取 21400 条数据
|
||||||
|
2025-09-24 11:21:35,304 - api.py - task_logger - INFO - 已获取 21500 条数据
|
||||||
|
2025-09-24 11:21:35,655 - api.py - task_logger - INFO - 已获取 21600 条数据
|
||||||
|
2025-09-24 11:21:35,992 - api.py - task_logger - INFO - 已获取 21700 条数据
|
||||||
|
2025-09-24 11:21:36,326 - api.py - task_logger - INFO - 已获取 21800 条数据
|
||||||
|
2025-09-24 11:21:36,639 - api.py - task_logger - INFO - 已获取 21900 条数据
|
||||||
|
2025-09-24 11:21:36,973 - api.py - task_logger - INFO - 已获取 22000 条数据
|
||||||
|
2025-09-24 11:21:37,292 - api.py - task_logger - INFO - 已获取 22100 条数据
|
||||||
|
2025-09-24 11:21:37,604 - api.py - task_logger - INFO - 已获取 22200 条数据
|
||||||
|
2025-09-24 11:21:37,948 - api.py - task_logger - INFO - 已获取 22300 条数据
|
||||||
|
2025-09-24 11:21:38,317 - api.py - task_logger - INFO - 已获取 22400 条数据
|
||||||
|
2025-09-24 11:21:38,645 - api.py - task_logger - INFO - 已获取 22500 条数据
|
||||||
|
2025-09-24 11:21:39,141 - api.py - task_logger - INFO - 已获取 22600 条数据
|
||||||
|
2025-09-24 11:21:39,472 - api.py - task_logger - INFO - 已获取 22700 条数据
|
||||||
|
2025-09-24 11:21:39,778 - api.py - task_logger - INFO - 已获取 22800 条数据
|
||||||
|
2025-09-24 11:21:40,101 - api.py - task_logger - INFO - 已获取 22900 条数据
|
||||||
|
2025-09-24 11:21:40,513 - api.py - task_logger - INFO - 已获取 23000 条数据
|
||||||
|
2025-09-24 11:21:44,538 - api.py - task_logger - INFO - 已获取 23100 条数据
|
||||||
|
2025-09-24 11:21:44,827 - api.py - task_logger - INFO - 已获取 23200 条数据
|
||||||
|
2025-09-24 11:21:45,133 - api.py - task_logger - INFO - 已获取 23300 条数据
|
||||||
|
2025-09-24 11:21:45,469 - api.py - task_logger - INFO - 已获取 23400 条数据
|
||||||
|
2025-09-24 11:21:45,766 - api.py - task_logger - INFO - 已获取 23500 条数据
|
||||||
|
2025-09-24 11:21:46,097 - api.py - task_logger - INFO - 已获取 23600 条数据
|
||||||
|
2025-09-24 11:21:46,414 - api.py - task_logger - INFO - 已获取 23700 条数据
|
||||||
|
2025-09-24 11:21:46,748 - api.py - task_logger - INFO - 已获取 23800 条数据
|
||||||
|
2025-09-24 11:21:47,102 - api.py - task_logger - INFO - 已获取 23900 条数据
|
||||||
|
2025-09-24 11:21:47,419 - api.py - task_logger - INFO - 已获取 24000 条数据
|
||||||
|
2025-09-24 11:21:47,773 - api.py - task_logger - INFO - 已获取 24100 条数据
|
||||||
|
2025-09-24 11:21:48,106 - api.py - task_logger - INFO - 已获取 24200 条数据
|
||||||
|
2025-09-24 11:21:48,438 - api.py - task_logger - INFO - 已获取 24300 条数据
|
||||||
|
2025-09-24 11:21:48,761 - api.py - task_logger - INFO - 已获取 24400 条数据
|
||||||
|
2025-09-24 11:21:49,110 - api.py - task_logger - INFO - 已获取 24500 条数据
|
||||||
|
2025-09-24 11:21:49,435 - api.py - task_logger - INFO - 已获取 24600 条数据
|
||||||
|
2025-09-24 11:21:49,755 - api.py - task_logger - INFO - 已获取 24700 条数据
|
||||||
|
2025-09-24 11:21:50,081 - api.py - task_logger - INFO - 已获取 24800 条数据
|
||||||
|
2025-09-24 11:21:50,419 - api.py - task_logger - INFO - 已获取 24900 条数据
|
||||||
|
2025-09-24 11:21:50,750 - api.py - task_logger - INFO - 已获取 25000 条数据
|
||||||
|
2025-09-24 11:21:51,115 - api.py - task_logger - INFO - 已获取 25100 条数据
|
||||||
|
2025-09-24 11:21:51,430 - api.py - task_logger - INFO - 已获取 25200 条数据
|
||||||
|
2025-09-24 11:21:51,752 - api.py - task_logger - INFO - 已获取 25300 条数据
|
||||||
|
2025-09-24 11:21:52,086 - api.py - task_logger - INFO - 已获取 25400 条数据
|
||||||
|
2025-09-24 11:21:52,397 - api.py - task_logger - INFO - 已获取 25500 条数据
|
||||||
|
2025-09-24 11:21:52,723 - api.py - task_logger - INFO - 已获取 25600 条数据
|
||||||
|
2025-09-24 11:21:53,050 - api.py - task_logger - INFO - 已获取 25700 条数据
|
||||||
|
2025-09-24 11:21:54,058 - api.py - task_logger - INFO - 已获取 25800 条数据
|
||||||
|
2025-09-24 11:21:54,367 - api.py - task_logger - INFO - 已获取 25900 条数据
|
||||||
|
2025-09-24 11:21:54,684 - api.py - task_logger - INFO - 已获取 26000 条数据
|
||||||
|
2025-09-24 11:21:55,310 - api.py - task_logger - INFO - 已获取 26100 条数据
|
||||||
|
2025-09-24 11:21:55,658 - api.py - task_logger - INFO - 已获取 26200 条数据
|
||||||
|
2025-09-24 11:21:55,974 - api.py - task_logger - INFO - 已获取 26300 条数据
|
||||||
|
2025-09-24 11:21:56,348 - api.py - task_logger - INFO - 已获取 26400 条数据
|
||||||
|
2025-09-24 11:21:56,928 - api.py - task_logger - INFO - 已获取 26500 条数据
|
||||||
|
2025-09-24 11:21:57,265 - api.py - task_logger - INFO - 已获取 26600 条数据
|
||||||
|
2025-09-24 11:21:57,800 - api.py - task_logger - INFO - 已获取 26700 条数据
|
||||||
|
2025-09-24 11:21:58,136 - api.py - task_logger - INFO - 已获取 26800 条数据
|
||||||
|
2025-09-24 11:21:58,461 - api.py - task_logger - INFO - 已获取 26900 条数据
|
||||||
|
2025-09-24 11:21:58,793 - api.py - task_logger - INFO - 已获取 27000 条数据
|
||||||
|
2025-09-24 11:21:59,146 - api.py - task_logger - INFO - 已获取 27100 条数据
|
||||||
|
2025-09-24 11:21:59,477 - api.py - task_logger - INFO - 已获取 27200 条数据
|
||||||
|
2025-09-24 11:21:59,849 - api.py - task_logger - INFO - 已获取 27300 条数据
|
||||||
|
2025-09-24 11:22:00,201 - api.py - task_logger - INFO - 已获取 27400 条数据
|
||||||
|
2025-09-24 11:22:00,523 - api.py - task_logger - INFO - 已获取 27500 条数据
|
||||||
|
2025-09-24 11:22:00,839 - api.py - task_logger - INFO - 已获取 27600 条数据
|
||||||
|
2025-09-24 11:22:01,208 - api.py - task_logger - INFO - 已获取 27700 条数据
|
||||||
|
2025-09-24 11:22:01,522 - api.py - task_logger - INFO - 已获取 27800 条数据
|
||||||
|
2025-09-24 11:22:01,790 - api.py - task_logger - INFO - 已获取 27900 条数据
|
||||||
|
2025-09-24 11:22:02,135 - api.py - task_logger - INFO - 已获取 28000 条数据
|
||||||
|
2025-09-24 11:22:02,507 - api.py - task_logger - INFO - 已获取 28100 条数据
|
||||||
|
2025-09-24 11:22:02,822 - api.py - task_logger - INFO - 已获取 28200 条数据
|
||||||
|
2025-09-24 11:22:03,172 - api.py - task_logger - INFO - 已获取 28300 条数据
|
||||||
|
2025-09-24 11:22:03,482 - api.py - task_logger - INFO - 已获取 28400 条数据
|
||||||
|
2025-09-24 11:22:03,803 - api.py - task_logger - INFO - 已获取 28500 条数据
|
||||||
|
2025-09-24 11:22:04,125 - api.py - task_logger - INFO - 已获取 28600 条数据
|
||||||
|
2025-09-24 11:22:04,389 - api.py - task_logger - INFO - 已获取 28700 条数据
|
||||||
|
2025-09-24 11:22:04,724 - api.py - task_logger - INFO - 已获取 28800 条数据
|
||||||
|
2025-09-24 11:22:05,050 - api.py - task_logger - INFO - 已获取 28900 条数据
|
||||||
|
2025-09-24 11:22:05,420 - api.py - task_logger - INFO - 已获取 29000 条数据
|
||||||
|
2025-09-24 11:22:05,734 - api.py - task_logger - INFO - 已获取 29100 条数据
|
||||||
|
2025-09-24 11:22:06,029 - api.py - task_logger - INFO - 已获取 29200 条数据
|
||||||
|
2025-09-24 11:22:07,424 - api.py - task_logger - INFO - 已获取 29300 条数据
|
||||||
|
2025-09-24 11:22:07,749 - api.py - task_logger - INFO - 已获取 29400 条数据
|
||||||
|
2025-09-24 11:22:08,088 - api.py - task_logger - INFO - 已获取 29500 条数据
|
||||||
|
2025-09-24 11:22:08,425 - api.py - task_logger - INFO - 已获取 29600 条数据
|
||||||
|
2025-09-24 11:22:10,453 - api.py - task_logger - INFO - 已获取 29700 条数据
|
||||||
|
2025-09-24 11:22:11,566 - api.py - task_logger - INFO - 已获取 29800 条数据
|
||||||
|
2025-09-24 11:22:11,910 - api.py - task_logger - INFO - 已获取 29900 条数据
|
||||||
|
2025-09-24 11:22:12,245 - api.py - task_logger - INFO - 已获取 30000 条数据
|
||||||
|
2025-09-24 11:22:12,605 - api.py - task_logger - INFO - 已获取 30100 条数据
|
||||||
|
2025-09-24 11:22:12,908 - api.py - task_logger - INFO - 已获取 30200 条数据
|
||||||
|
2025-09-24 11:22:13,742 - api.py - task_logger - INFO - 已获取 30300 条数据
|
||||||
|
2025-09-24 11:22:14,084 - api.py - task_logger - INFO - 已获取 30400 条数据
|
||||||
|
2025-09-24 11:22:14,418 - api.py - task_logger - INFO - 已获取 30500 条数据
|
||||||
|
2025-09-24 11:22:15,377 - api.py - task_logger - INFO - 已获取 30600 条数据
|
||||||
|
2025-09-24 11:22:15,726 - api.py - task_logger - INFO - 已获取 30700 条数据
|
||||||
|
2025-09-24 11:22:16,105 - api.py - task_logger - INFO - 已获取 30800 条数据
|
||||||
|
2025-09-24 11:22:16,438 - api.py - task_logger - INFO - 已获取 30900 条数据
|
||||||
|
2025-09-24 11:22:16,733 - api.py - task_logger - INFO - 已获取 31000 条数据
|
||||||
|
2025-09-24 11:22:17,072 - api.py - task_logger - INFO - 已获取 31100 条数据
|
||||||
|
2025-09-24 11:22:17,408 - api.py - task_logger - INFO - 已获取 31200 条数据
|
||||||
|
2025-09-24 11:22:17,774 - api.py - task_logger - INFO - 已获取 31300 条数据
|
||||||
|
2025-09-24 11:22:18,104 - api.py - task_logger - INFO - 已获取 31400 条数据
|
||||||
|
2025-09-24 11:22:18,429 - api.py - task_logger - INFO - 已获取 31500 条数据
|
||||||
|
2025-09-24 11:22:18,748 - api.py - task_logger - INFO - 已获取 31600 条数据
|
||||||
|
2025-09-24 11:22:19,115 - api.py - task_logger - INFO - 已获取 31700 条数据
|
||||||
|
2025-09-24 11:22:19,436 - api.py - task_logger - INFO - 已获取 31800 条数据
|
||||||
|
2025-09-24 11:22:19,746 - api.py - task_logger - INFO - 已获取 31900 条数据
|
||||||
|
2025-09-24 11:22:20,074 - api.py - task_logger - INFO - 已获取 32000 条数据
|
||||||
|
2025-09-24 11:22:20,576 - api.py - task_logger - INFO - 已获取 32100 条数据
|
||||||
|
2025-09-24 11:22:20,912 - api.py - task_logger - INFO - 已获取 32200 条数据
|
||||||
|
2025-09-24 11:22:21,235 - api.py - task_logger - INFO - 已获取 32300 条数据
|
||||||
|
2025-09-24 11:22:21,568 - api.py - task_logger - INFO - 已获取 32400 条数据
|
||||||
|
2025-09-24 11:22:21,900 - api.py - task_logger - INFO - 已获取 32500 条数据
|
||||||
|
2025-09-24 11:22:22,210 - api.py - task_logger - INFO - 已获取 32600 条数据
|
||||||
|
2025-09-24 11:22:22,516 - api.py - task_logger - INFO - 已获取 32700 条数据
|
||||||
|
2025-09-24 11:22:22,804 - api.py - task_logger - INFO - 已获取 32800 条数据
|
||||||
|
2025-09-24 11:22:23,211 - api.py - task_logger - INFO - 已获取 32900 条数据
|
||||||
|
2025-09-24 11:22:23,542 - api.py - task_logger - INFO - 已获取 33000 条数据
|
||||||
|
2025-09-24 11:22:23,903 - api.py - task_logger - INFO - 已获取 33100 条数据
|
||||||
|
2025-09-24 11:22:24,273 - api.py - task_logger - INFO - 已获取 33200 条数据
|
||||||
|
2025-09-24 11:22:24,606 - api.py - task_logger - INFO - 已获取 33300 条数据
|
||||||
|
2025-09-24 11:22:24,946 - api.py - task_logger - INFO - 已获取 33400 条数据
|
||||||
|
2025-09-24 11:22:25,272 - api.py - task_logger - INFO - 已获取 33500 条数据
|
||||||
|
2025-09-24 11:22:25,597 - api.py - task_logger - INFO - 已获取 33600 条数据
|
||||||
|
2025-09-24 11:22:25,919 - api.py - task_logger - INFO - 已获取 33700 条数据
|
||||||
|
2025-09-24 11:22:26,226 - api.py - task_logger - INFO - 已获取 33800 条数据
|
||||||
|
2025-09-24 11:22:26,541 - api.py - task_logger - INFO - 已获取 33900 条数据
|
||||||
|
2025-09-24 11:22:27,050 - api.py - task_logger - INFO - 已获取 34000 条数据
|
||||||
|
2025-09-24 11:22:27,446 - api.py - task_logger - INFO - 已获取 34100 条数据
|
||||||
|
2025-09-24 11:22:27,871 - api.py - task_logger - INFO - 已获取 34200 条数据
|
||||||
|
2025-09-24 11:22:28,206 - api.py - task_logger - INFO - 已获取 34300 条数据
|
||||||
|
2025-09-24 11:22:30,197 - api.py - task_logger - INFO - 已获取 34400 条数据
|
||||||
|
2025-09-24 11:22:30,517 - api.py - task_logger - INFO - 已获取 34500 条数据
|
||||||
|
2025-09-24 11:22:30,827 - api.py - task_logger - INFO - 已获取 34600 条数据
|
||||||
|
2025-09-24 11:22:31,150 - api.py - task_logger - INFO - 已获取 34700 条数据
|
||||||
|
2025-09-24 11:22:31,458 - api.py - task_logger - INFO - 已获取 34800 条数据
|
||||||
|
2025-09-24 11:22:32,000 - api.py - task_logger - INFO - 已获取 34900 条数据
|
||||||
|
2025-09-24 11:22:32,323 - api.py - task_logger - INFO - 已获取 35000 条数据
|
||||||
|
2025-09-24 11:22:32,672 - api.py - task_logger - INFO - 已获取 35100 条数据
|
||||||
|
2025-09-24 11:22:32,998 - api.py - task_logger - INFO - 已获取 35200 条数据
|
||||||
|
2025-09-24 11:22:33,296 - api.py - task_logger - INFO - 已获取 35300 条数据
|
||||||
|
2025-09-24 11:22:33,611 - api.py - task_logger - INFO - 已获取 35400 条数据
|
||||||
|
2025-09-24 11:22:33,895 - api.py - task_logger - INFO - 已获取 35500 条数据
|
||||||
|
2025-09-24 11:22:34,206 - api.py - task_logger - INFO - 已获取 35600 条数据
|
||||||
|
2025-09-24 11:22:34,510 - api.py - task_logger - INFO - 已获取 35700 条数据
|
||||||
|
2025-09-24 11:22:34,822 - api.py - task_logger - INFO - 已获取 35800 条数据
|
||||||
|
2025-09-24 11:22:35,146 - api.py - task_logger - INFO - 已获取 35900 条数据
|
||||||
|
2025-09-24 11:22:35,460 - api.py - task_logger - INFO - 已获取 36000 条数据
|
||||||
|
2025-09-24 11:22:35,753 - api.py - task_logger - INFO - 已获取 36100 条数据
|
||||||
|
2025-09-24 11:22:36,073 - api.py - task_logger - INFO - 已获取 36200 条数据
|
||||||
|
2025-09-24 11:22:37,467 - api.py - task_logger - INFO - 已获取 36300 条数据
|
||||||
|
2025-09-24 11:22:37,805 - api.py - task_logger - INFO - 已获取 36400 条数据
|
||||||
|
2025-09-24 11:22:38,478 - api.py - task_logger - INFO - 已获取 36500 条数据
|
||||||
|
2025-09-24 11:22:38,827 - api.py - task_logger - INFO - 已获取 36600 条数据
|
||||||
|
2025-09-24 11:22:39,179 - api.py - task_logger - INFO - 已获取 36700 条数据
|
||||||
|
2025-09-24 11:22:39,525 - api.py - task_logger - INFO - 已获取 36800 条数据
|
||||||
|
2025-09-24 11:22:39,843 - api.py - task_logger - INFO - 已获取 36900 条数据
|
||||||
|
2025-09-24 11:22:40,163 - api.py - task_logger - INFO - 已获取 37000 条数据
|
||||||
|
2025-09-24 11:22:40,483 - api.py - task_logger - INFO - 已获取 37100 条数据
|
||||||
|
2025-09-24 11:22:40,836 - api.py - task_logger - INFO - 已获取 37200 条数据
|
||||||
|
2025-09-24 11:22:41,160 - api.py - task_logger - INFO - 已获取 37300 条数据
|
||||||
|
2025-09-24 11:22:41,478 - api.py - task_logger - INFO - 已获取 37400 条数据
|
||||||
|
2025-09-24 11:22:41,793 - api.py - task_logger - INFO - 已获取 37500 条数据
|
||||||
|
2025-09-24 11:22:42,093 - api.py - task_logger - INFO - 已获取 37600 条数据
|
||||||
|
2025-09-24 11:22:42,389 - api.py - task_logger - INFO - 已获取 37700 条数据
|
||||||
|
2025-09-24 11:22:42,702 - api.py - task_logger - INFO - 已获取 37800 条数据
|
||||||
|
2025-09-24 11:22:44,432 - api.py - task_logger - INFO - 已获取 37900 条数据
|
||||||
|
2025-09-24 11:22:44,764 - api.py - task_logger - INFO - 已获取 38000 条数据
|
||||||
|
2025-09-24 11:22:45,103 - api.py - task_logger - INFO - 已获取 38100 条数据
|
||||||
|
2025-09-24 11:22:45,421 - api.py - task_logger - INFO - 已获取 38200 条数据
|
||||||
|
2025-09-24 11:22:45,748 - api.py - task_logger - INFO - 已获取 38300 条数据
|
||||||
|
2025-09-24 11:22:46,091 - api.py - task_logger - INFO - 已获取 38400 条数据
|
||||||
|
2025-09-24 11:22:46,392 - api.py - task_logger - INFO - 已获取 38500 条数据
|
||||||
|
2025-09-24 11:22:46,700 - api.py - task_logger - INFO - 已获取 38600 条数据
|
||||||
|
2025-09-24 11:22:47,023 - api.py - task_logger - INFO - 已获取 38700 条数据
|
||||||
|
2025-09-24 11:22:47,346 - api.py - task_logger - INFO - 已获取 38800 条数据
|
||||||
|
2025-09-24 11:22:47,660 - api.py - task_logger - INFO - 已获取 38900 条数据
|
||||||
|
2025-09-24 11:22:47,960 - api.py - task_logger - INFO - 已获取 39000 条数据
|
||||||
|
2025-09-24 11:22:48,283 - api.py - task_logger - INFO - 已获取 39100 条数据
|
||||||
|
2025-09-24 11:22:49,236 - api.py - task_logger - INFO - 已获取 39200 条数据
|
||||||
|
2025-09-24 11:22:49,597 - api.py - task_logger - INFO - 已获取 39300 条数据
|
||||||
|
2025-09-24 11:22:49,972 - api.py - task_logger - INFO - 已获取 39400 条数据
|
||||||
|
2025-09-24 11:22:50,426 - api.py - task_logger - INFO - 已获取 39500 条数据
|
||||||
|
2025-09-24 11:22:50,778 - api.py - task_logger - INFO - 已获取 39600 条数据
|
||||||
|
2025-09-24 11:22:51,084 - api.py - task_logger - INFO - 已获取 39700 条数据
|
||||||
|
2025-09-24 11:22:51,422 - api.py - task_logger - INFO - 已获取 39800 条数据
|
||||||
|
2025-09-24 11:22:52,293 - api.py - task_logger - INFO - 已获取 39900 条数据
|
||||||
|
2025-09-24 11:22:52,640 - api.py - task_logger - INFO - 已获取 40000 条数据
|
||||||
|
2025-09-24 11:22:52,966 - api.py - task_logger - INFO - 已获取 40100 条数据
|
||||||
|
2025-09-24 11:22:53,270 - api.py - task_logger - INFO - 已获取 40200 条数据
|
||||||
|
2025-09-24 11:22:53,562 - api.py - task_logger - INFO - 已获取 40300 条数据
|
||||||
|
2025-09-24 11:22:53,859 - api.py - task_logger - INFO - 已获取 40400 条数据
|
||||||
|
2025-09-24 11:22:54,169 - api.py - task_logger - INFO - 已获取 40500 条数据
|
||||||
|
2025-09-24 11:22:54,482 - api.py - task_logger - INFO - 已获取 40600 条数据
|
||||||
|
2025-09-24 11:22:54,799 - api.py - task_logger - INFO - 已获取 40700 条数据
|
||||||
|
2025-09-24 11:22:55,385 - api.py - task_logger - INFO - 已获取 40800 条数据
|
||||||
|
2025-09-24 11:22:55,701 - api.py - task_logger - INFO - 已获取 40900 条数据
|
||||||
|
2025-09-24 11:22:56,015 - api.py - task_logger - INFO - 已获取 41000 条数据
|
||||||
|
2025-09-24 11:22:56,225 - api.py - task_logger - INFO - 已获取 41045 条数据
|
||||||
|
2025-09-24 11:22:56,552 - api.py - task_logger - INFO - 已获取 100 条数据
|
||||||
|
2025-09-24 11:22:56,749 - api.py - task_logger - INFO - 已获取 200 条数据
|
||||||
|
2025-09-24 11:22:56,957 - api.py - task_logger - INFO - 已获取 300 条数据
|
||||||
|
2025-09-24 11:22:57,155 - api.py - task_logger - INFO - 已获取 400 条数据
|
||||||
|
2025-09-24 11:22:57,329 - api.py - task_logger - INFO - 已获取 500 条数据
|
||||||
|
2025-09-24 11:22:57,515 - api.py - task_logger - INFO - 已获取 600 条数据
|
||||||
|
2025-09-24 11:22:57,707 - api.py - task_logger - INFO - 已获取 700 条数据
|
||||||
|
2025-09-24 11:22:57,874 - api.py - task_logger - INFO - 已获取 752 条数据
|
||||||
|
2025-09-24 11:22:58,388 - 异常回访.py - task_logger - INFO - 开始运行SaaS异常回访
|
||||||
|
2025-09-24 11:22:58,531 - common_module.py - task_logger - INFO - 任务状态发送成功: {'data': {'creator': {'name': 'F6汽车科技', 'username': '#admin', 'status': 1, 'type': 0}, 'updater': {'name': 'F6汽车科技', 'username': '#admin', 'status': 1, 'type': 0}, 'deleter': None, 'createTime': '2025-09-24T03:23:01.483Z', 'updateTime': '2025-09-24T03:23:01.483Z', 'deleteTime': None, '_widget_1744873387500': '2025-09-24T00:00:00.000Z', '_widget_1743644977694': '异常服务待办派发', '_widget_1744873387501': '2025-09-24T03:19:15.000Z', '_widget_1744873387502': '2025-09-24T03:22:58.000Z', '_widget_1744873387504': '223', '_id': '68d364156d282acaad713b83', 'appId': '6694d3c4fcb69ca9a111a6c4', 'entryId': '67ede908eb9c22261016466e'}}
|
||||||
|
|||||||
+393
@@ -0,0 +1,393 @@
|
|||||||
|
import datetime
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
import requests
|
||||||
|
from api import API
|
||||||
|
from back_ground_module import CommonModule
|
||||||
|
import pandas as pd
|
||||||
|
from log_config import configure_task_logger, configure_error_task_logger
|
||||||
|
|
||||||
|
api_instance = API()
|
||||||
|
common_module = CommonModule()
|
||||||
|
# start_time = datetime.datetime.now()
|
||||||
|
|
||||||
|
# 获取已经配置好的常规日志记录器
|
||||||
|
logger = configure_task_logger()
|
||||||
|
|
||||||
|
# 获取已经配置好的错误任务日志记录器
|
||||||
|
error_task_logger = configure_error_task_logger()
|
||||||
|
output_dir = "output" # 设置输出目录
|
||||||
|
os.makedirs(output_dir, exist_ok=True)
|
||||||
|
|
||||||
|
class NewExceptionTask:
|
||||||
|
"""
|
||||||
|
SaaS异常回访
|
||||||
|
"""
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
self.exception_service_todo = None
|
||||||
|
self.get_feature_usage = None
|
||||||
|
self.saas_create_time = None
|
||||||
|
self.index = None
|
||||||
|
self.date_one = None
|
||||||
|
self.data_yichang_S = None
|
||||||
|
self.date_list = None
|
||||||
|
self.Smart_detection = None
|
||||||
|
self.service_remind = None
|
||||||
|
self.NGV_data_list = None
|
||||||
|
self.permissions_table = None
|
||||||
|
self.staff_id_list = None
|
||||||
|
self.json_list = []
|
||||||
|
self.policy_recognition = None
|
||||||
|
self.widget_list = None
|
||||||
|
self.private_domain = None
|
||||||
|
self.public_domain = None
|
||||||
|
self.public_domain_list = None
|
||||||
|
self.different_industries = None
|
||||||
|
self.different_industries_list = None
|
||||||
|
self.groupnotification = None
|
||||||
|
self.fields_mapping = {
|
||||||
|
"门店名称": "_widget_1748241895830",
|
||||||
|
"联系人": "_widget_1748241895831",
|
||||||
|
"开户时间": "_widget_1748241895839",
|
||||||
|
"门店编码": "_widget_1748241895842",
|
||||||
|
"联系方式": "_widget_1748241895832",
|
||||||
|
"系统版本": "_widget_1748241895850",
|
||||||
|
"公司名称": "_widget_1748241895844",
|
||||||
|
"运营顾问": "_widget_1748246808679",
|
||||||
|
"区域经理": "_widget_1748246808682",
|
||||||
|
"公司等级": "_widget_1748241895846",
|
||||||
|
"运营专家": "_widget_1748246808681",
|
||||||
|
"操作模式E.L/E.S": "_widget_1748241895853",
|
||||||
|
"活跃健康状态变化": "_widget_1748241895829",
|
||||||
|
"初始日": "_widget_1748241895833",
|
||||||
|
"推进日": "_widget_1748241895834",
|
||||||
|
"异常跟进情况描述": "_widget_1748512176640",
|
||||||
|
"异常变化原因": "_widget_1748512176641",
|
||||||
|
"正常使用": "_widget_1748512176643",
|
||||||
|
"门店原因": "_widget_1748512176645",
|
||||||
|
"服务原因": "_widget_1748512176647",
|
||||||
|
"产品原因": "_widget_1748512176649",
|
||||||
|
"未正式切换": "_widget_1748512176651",
|
||||||
|
"跟进状态": "_widget_1748512176655",
|
||||||
|
"是否可激活": "_widget_1758615839701",
|
||||||
|
"是否有续约风险": "_widget_1758615839703",
|
||||||
|
"当前跟进人": "_widget_1748246808678",
|
||||||
|
"激活策略": "_widget_1758615839717",
|
||||||
|
"跟进时间": "_widget_1748512176654",
|
||||||
|
"是否跟进完成": "_widget_1751273412737",
|
||||||
|
"区域客服": "_widget_1748246808680",
|
||||||
|
"大区": "_widget_1748241895847",
|
||||||
|
"省": "_widget_1748241895848",
|
||||||
|
"城市": "_widget_1748241895855",
|
||||||
|
"门店类型": "_widget_1748241895849",
|
||||||
|
"saas客户类型": "_widget_1748241895851",
|
||||||
|
"门店阶段": "_widget_1748241895852",
|
||||||
|
"提交人": "creator",
|
||||||
|
"提交时间": "createTime",
|
||||||
|
"更新时间": "updateTime"
|
||||||
|
}
|
||||||
|
|
||||||
|
def calculate_date_one(self, start_offset=0):
|
||||||
|
"""
|
||||||
|
计算从当前日期(或指定偏移量的日期)开始,往前遍历遇到date_list中日期的次数。
|
||||||
|
|
||||||
|
参数:
|
||||||
|
- start_offset: 从当前日期起始的天数偏移量,默认为0(即今天)。负数表示过去,正数表示未来。
|
||||||
|
|
||||||
|
返回:
|
||||||
|
- date_one: 遍历到date_list中日期的次数。
|
||||||
|
"""
|
||||||
|
jdy_date = datetime.datetime.now().strftime("%Y-%m-%d")
|
||||||
|
jdy_start_time = datetime.datetime.now().strftime("%Y-%m-%d ")
|
||||||
|
# 设置起始日期
|
||||||
|
now_time = datetime.datetime.now() + datetime.timedelta(days=start_offset)
|
||||||
|
|
||||||
|
# 初始化计数器
|
||||||
|
date_one = 1
|
||||||
|
print("当前日期:", now_time.strftime("%Y-%m-%d"))
|
||||||
|
# 检查起始日期是否在date_list中
|
||||||
|
if now_time.strftime("%Y-%m-%d") in self.date_list:
|
||||||
|
date_one = 0
|
||||||
|
print("开始次数:", date_one)
|
||||||
|
|
||||||
|
else:
|
||||||
|
# 遍历日期
|
||||||
|
for i in range(1, 10):
|
||||||
|
new_date = now_time + datetime.timedelta(days=-i)
|
||||||
|
new_date_str = new_date.strftime("%Y-%m-%d")
|
||||||
|
print("遍历日期:", new_date_str)
|
||||||
|
if new_date_str in self.date_list:
|
||||||
|
date_one += 1
|
||||||
|
print("节假日期:", new_date_str)
|
||||||
|
else:
|
||||||
|
break
|
||||||
|
|
||||||
|
print("遍历次数:", date_one)
|
||||||
|
return date_one
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def download_url_content(url, save_path):
|
||||||
|
"""
|
||||||
|
下载指定 URL 的内容并保存到本地文件。
|
||||||
|
|
||||||
|
:param url: 要下载内容的 URL
|
||||||
|
:param save_path: 保存文件的路径
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
# 发送 GET 请求以获取内容
|
||||||
|
response = requests.get(url, stream=True)
|
||||||
|
response.raise_for_status() # 如果响应状态码不是 200,抛出异常
|
||||||
|
|
||||||
|
# 确保保存目录存在
|
||||||
|
os.makedirs(os.path.dirname(save_path), exist_ok=True)
|
||||||
|
|
||||||
|
# 将内容写入文件
|
||||||
|
with open(save_path, 'wb') as file:
|
||||||
|
for chunk in response.iter_content(chunk_size=8192): # 分块写入,避免占用过多内存
|
||||||
|
if chunk: # 过滤掉空块
|
||||||
|
file.write(chunk)
|
||||||
|
|
||||||
|
print(f"文件已成功保存到 {save_path}")
|
||||||
|
|
||||||
|
except requests.exceptions.RequestException as e:
|
||||||
|
print(f"下载失败: {e}")
|
||||||
|
except Exception as e:
|
||||||
|
print(f"发生错误: {e}")
|
||||||
|
|
||||||
|
def load_all_data(self):
|
||||||
|
"""加载所有必要的数据表"""
|
||||||
|
# 省市区人员关系表
|
||||||
|
payload = {"api_key": "675b900991ad2491c69389ca", "entry_id": "676512ac3e54dc3159460c0a"}
|
||||||
|
json_dict = api_instance.entry_data_list(payload)
|
||||||
|
self.json_list = json_dict.get("data")
|
||||||
|
|
||||||
|
# 获取简道云员工id
|
||||||
|
payload = {"api_key": "6694d3c4fcb69ca9a111a6c4",
|
||||||
|
"entry_id": "6769204a1902c9341340a1bc",
|
||||||
|
}
|
||||||
|
staff_id = api_instance.entry_data_list(payload)
|
||||||
|
self.staff_id_list = staff_id.get("data") # api请求格式,将数据封装在data字典里
|
||||||
|
|
||||||
|
# 获取NGV数据
|
||||||
|
payload = {"api_key": "675b900991ad2491c69389ca", "entry_id": "675bb02bd2d53c2034c665e4"}
|
||||||
|
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"}
|
||||||
|
self.exception_service_todo = api_instance.entry_data_list(payload).get("data", [])
|
||||||
|
print(self.exception_service_todo)
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def build_index(json_list):
|
||||||
|
index = {}
|
||||||
|
for json_item in json_list:
|
||||||
|
try:
|
||||||
|
key = (json_item['_widget_1734677164861'], json_item['_widget_1734677164862'],
|
||||||
|
json_item['_widget_1734677164863']) # 省市区
|
||||||
|
if '_widget_1734677164870' not in json_item: # 异常回访客服
|
||||||
|
raise KeyError("缺少 '异常回访客服' 键")
|
||||||
|
index[key] = json_item
|
||||||
|
except KeyError as e:
|
||||||
|
print(f"警告:{e},跳过该条记录: {json_item}")
|
||||||
|
continue
|
||||||
|
print('index', index)
|
||||||
|
return index
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def find_customer_service(province_name, city_name, area_name, index):
|
||||||
|
key = (province_name, city_name, area_name)
|
||||||
|
# print(index)
|
||||||
|
if key not in index:
|
||||||
|
return "数据缺失: 未找到对应的异常回访客服"
|
||||||
|
|
||||||
|
return index[key]
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def get_staff_id(row_item, name):
|
||||||
|
"""辅助函数,用于获取员工ID"""
|
||||||
|
if str(row_item["_widget_1734942794144"]) == str(name): # 检查姓名是否匹配
|
||||||
|
return row_item["_widget_1734942794145"] # 返回员工ID
|
||||||
|
return None
|
||||||
|
|
||||||
|
def assign_customer_service(self, province_name, city_name, area_name, index):
|
||||||
|
"""根据省市区派发给异常回访客服"""
|
||||||
|
# try:
|
||||||
|
customer_service_info = self.find_customer_service(province_name, city_name, area_name, index)
|
||||||
|
customer_service = customer_service_info.get('_widget_1734677164870', {}).get('username') # 异常回访客服
|
||||||
|
return customer_service
|
||||||
|
# except Exception as e:
|
||||||
|
# print(f"Error finding customer service: {e}")
|
||||||
|
# return "分配失败,请检查", "分配失败,请检查", "分配失败,请检查"
|
||||||
|
|
||||||
|
def main(self):
|
||||||
|
|
||||||
|
task_start_time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||||
|
try:
|
||||||
|
global png_url, key, upload_key, province_name, city_name, area_name
|
||||||
|
self.load_all_data()
|
||||||
|
|
||||||
|
self.data_yichang_S = common_module.get_yichang_details(days_back=1).astype(str) # 获取data_NGV 并转为str
|
||||||
|
self.index = self.build_index(self.json_list)
|
||||||
|
|
||||||
|
logger.info("开始运行SaaS异常回访")
|
||||||
|
|
||||||
|
data_yichang = self.data_yichang_S.copy()
|
||||||
|
# data_yichang.to_csv(os.path.join(output_dir,"data_yichang.csv"), index=False)
|
||||||
|
|
||||||
|
def replace_values(series):
|
||||||
|
# 使用条件判断来进行替换
|
||||||
|
return series.apply(lambda x: '' if pd.isna(x) or x in ['NA', 'None', ''] else x)
|
||||||
|
|
||||||
|
# 对整个DataFrame的所有列应用替换函数
|
||||||
|
data_yichang = data_yichang.apply(replace_values)
|
||||||
|
|
||||||
|
for index_num, row in data_yichang.iterrows(): # 对过滤后的每一条进行派发
|
||||||
|
try:
|
||||||
|
|
||||||
|
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 ['未处理', '处理中']:
|
||||||
|
is_pass = True
|
||||||
|
break
|
||||||
|
if is_pass:
|
||||||
|
logger.info(f"已存在待办,跳过该条记录: {row}")
|
||||||
|
continue
|
||||||
|
|
||||||
|
payload_dict = {}
|
||||||
|
|
||||||
|
distribution_date = datetime.datetime.now(datetime.timezone.utc)
|
||||||
|
distribution_date = distribution_date.strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3] + 'Z'
|
||||||
|
|
||||||
|
date_obj1 = datetime.datetime.strptime(row["init_day"], "%Y%m%d").strftime("%Y-%m-%d")
|
||||||
|
date_obj2 = datetime.datetime.strptime(row["push_day"], "%Y%m%d").strftime("%Y-%m-%d")
|
||||||
|
|
||||||
|
NGV_roles = {
|
||||||
|
'service_impl_principal': row['service_impl_principal'], # 运营负责人
|
||||||
|
'area_manager': row['area_manager'], # 区域经理
|
||||||
|
'technician': row['technician'], # 运营专家
|
||||||
|
}
|
||||||
|
for role, name in NGV_roles.items(): # 寻找对应的员工ID
|
||||||
|
for row_item in self.staff_id_list:
|
||||||
|
staff_id = self.get_staff_id(row_item, name)
|
||||||
|
if staff_id:
|
||||||
|
NGV_roles[role] = staff_id
|
||||||
|
break # 找到后退出循环
|
||||||
|
else:
|
||||||
|
NGV_roles[role] = None # 如果没有找到对应的员工ID
|
||||||
|
relationship_manager, area_manager, technician = [NGV_roles[role] for role in
|
||||||
|
['service_impl_principal',
|
||||||
|
'area_manager',
|
||||||
|
'technician']]
|
||||||
|
|
||||||
|
UUid = time.strftime("%Y%m%d%H%M%S", time.localtime())
|
||||||
|
|
||||||
|
NGV_data_id = None
|
||||||
|
reason = None
|
||||||
|
# 获取关联数据
|
||||||
|
for NGV_Data in self.NGV_data_list:
|
||||||
|
# NGV_Data = NGV_Data.get("data")
|
||||||
|
if row["org_code"] == NGV_Data.get("_widget_1734062123071"): # 门店编码
|
||||||
|
NGV_data_id = NGV_Data.get("_id")
|
||||||
|
province_name = NGV_Data.get("_widget_1734062123090")
|
||||||
|
city_name = NGV_Data.get("_widget_1734062123092")
|
||||||
|
area_name = NGV_Data.get("_widget_1734062123094")
|
||||||
|
# 门店原因
|
||||||
|
reason = NGV_Data.get("_widget_1758617393828")
|
||||||
|
logger.info(f"获取关联数据成功:{NGV_data_id}, {province_name}, {city_name}, {area_name}")
|
||||||
|
|
||||||
|
# 判断门店原因
|
||||||
|
if reason in ["门店倒闭", "门店转让", "加盟其他连锁","切换竞品","虚拟门店","重新开户","已退款","二套系统"]:
|
||||||
|
continue
|
||||||
|
|
||||||
|
|
||||||
|
if not NGV_data_id:
|
||||||
|
logger.warning(f"未找到关联数据,请检查门店编码: {row['org_code']}")
|
||||||
|
|
||||||
|
# 根据省市区派发给异常回访客服
|
||||||
|
customer_service = self.assign_customer_service(province_name, city_name, area_name, self.index)
|
||||||
|
|
||||||
|
payload_dict.update({
|
||||||
|
"_widget_1748241895829": {"value": row["health_warning_info"]}, # 活跃健康状态变化
|
||||||
|
|
||||||
|
"_widget_1748241895830": {"value": row["org_name"]}, # 门店名称
|
||||||
|
|
||||||
|
"_widget_1748241895831": {"value": row["contacts"]}, # 联系人
|
||||||
|
|
||||||
|
"_widget_1748241895832": {"value": row['contact_mobile']}, # 联系方式
|
||||||
|
|
||||||
|
"_widget_1748241895833": {
|
||||||
|
"value": int(time.mktime(time.strptime(date_obj1, "%Y-%m-%d")) * 1000) if row[
|
||||||
|
"init_day"] != '' else ''},
|
||||||
|
# 初始日
|
||||||
|
|
||||||
|
"_widget_1748241895834": {
|
||||||
|
"value": int(time.mktime(time.strptime(date_obj2, "%Y-%m-%d")) * 1000) if row[
|
||||||
|
"push_day"] != '' else ''},
|
||||||
|
# 推进日
|
||||||
|
|
||||||
|
"_widget_1748246808678": {"value": customer_service}, # 当前跟进人
|
||||||
|
|
||||||
|
"_widget_1748246808679": {"value": relationship_manager}, # 运营负责人
|
||||||
|
|
||||||
|
"_widget_1748246808680": {"value": customer_service}, # 区域客服
|
||||||
|
|
||||||
|
"_widget_1748241895839": {
|
||||||
|
"value": int(time.mktime(time.strptime(row["saas_create_time"], "%Y-%m-%d")) * 1000) if row[
|
||||||
|
"saas_create_time"] != '' else ''},
|
||||||
|
# 开户时间
|
||||||
|
|
||||||
|
"_widget_1748246808681": {"value": technician}, # 技术专家
|
||||||
|
|
||||||
|
"_widget_1748246808682": {"value": area_manager}, # 区域经理
|
||||||
|
|
||||||
|
"_widget_1748241895842": {"value": row['org_code']}, # 门店编码
|
||||||
|
|
||||||
|
"_widget_1748241895844": {"value": row['group_name']}, # 公司名称
|
||||||
|
|
||||||
|
"_widget_1748241895846": {"value": row['group_grade']}, # 公司等级
|
||||||
|
|
||||||
|
"_widget_1748241895847": {"value": row['region_name']}, # 大区
|
||||||
|
|
||||||
|
"_widget_1748241895848": {"value": row['province_name']}, # 省
|
||||||
|
|
||||||
|
"_widget_1748241895849": {"value": row['org_type']}, # 门店类型
|
||||||
|
|
||||||
|
"_widget_1748241895850": {"value": row['saas_edition_fmt']}, # 系统版本
|
||||||
|
|
||||||
|
"_widget_1748241895851": {"value": row['saas_customer_type']}, # saas客户类型
|
||||||
|
|
||||||
|
"_widget_1748241895852": {"value": row['org_stage']}, # 门店阶段
|
||||||
|
|
||||||
|
"_widget_1748241895853": {"value": row['contact_mobile']}, # 操作模式E.L/E.S
|
||||||
|
|
||||||
|
"_widget_1748241895855": {"value": row['city_name']}, # 城市
|
||||||
|
|
||||||
|
"_widget_1748247754304": {"value": NGV_data_id}, # 数据id
|
||||||
|
|
||||||
|
"_widget_1748512176655": {"value": "未处理"}, # 跟进状态
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
routine_follow_up_payload = {
|
||||||
|
"api_key": "675b900991ad2491c69389ca",
|
||||||
|
"entry_id": "68340de79f116c0b66b6b0cc", # 异常服务跟进待办
|
||||||
|
"is_start_workflow": "true",
|
||||||
|
"data": payload_dict,
|
||||||
|
"transaction_id": UUid
|
||||||
|
}
|
||||||
|
|
||||||
|
res = api_instance.data_batch_create(routine_follow_up_payload)
|
||||||
|
logger.info(f"创建结果:{res}")
|
||||||
|
except:
|
||||||
|
pass
|
||||||
|
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))
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
start = NewExceptionTask()
|
||||||
|
start.main()
|
||||||
Reference in New Issue
Block a user