日常回访多公司派发一个
This commit is contained in:
@@ -109,6 +109,10 @@ class RenewServicesRevisit:
|
||||
payload = {"api_key": "675b900991ad2491c69389ca", "entry_id": "67e5107198ba1b20d5df3974"}
|
||||
self.groupnotification = api_instance.entry_data_list(payload).get("data", [])
|
||||
|
||||
# 获取多公司过滤表
|
||||
payload = {"api_key": "675b900991ad2491c69389ca", "entry_id": "689bf5f8ba88a28cb0679ec9"}
|
||||
self.get_filter_company_list = api_instance.entry_data_list(payload).get("data", [])
|
||||
|
||||
@staticmethod
|
||||
def download_url_content(url, save_path):
|
||||
"""
|
||||
@@ -252,6 +256,15 @@ class RenewServicesRevisit:
|
||||
self.data_NGV = common_module.get_ngv_details(days_back=1) # 获取data_NGV 并转为str
|
||||
self.index = self.build_index(self.json_list)
|
||||
|
||||
logger.info("获取多公司过滤公司id")
|
||||
all_filter_company_list = [] # 获取多公司过滤公司id
|
||||
for company in self.get_filter_company_list:
|
||||
company_list = company.get("_widget_1755052002491")
|
||||
for company_item in company_list:
|
||||
if company_item.get("_widget_1755052002496") == "否":
|
||||
all_filter_company_list.append(company_item.get("_widget_1755052002495"))
|
||||
logger.info(f"过滤公司条数:{len(all_filter_company_list)}")
|
||||
|
||||
# 将A列和B列的日期字符串转换为日期格式
|
||||
data_NGV = self.data_NGV.copy()
|
||||
data_NGV['A'] = pd.to_datetime(data_NGV['expiry_time'])
|
||||
@@ -265,6 +278,9 @@ class RenewServicesRevisit:
|
||||
# 处理字符串数据并显式指定数据类型
|
||||
data_NGV = data_NGV.apply(replace_values)
|
||||
|
||||
# 过滤多公司
|
||||
data_NGV = data_NGV[~data_NGV['id_own_group'].isin(all_filter_company_list)]
|
||||
|
||||
# 定义优先级顺序
|
||||
edition_order = ['皇冠版', '至尊版', '尊享版', '旗舰版', '标准版', '进阶版', '基础版', '入门版']
|
||||
customer_type_order = ["F", "E", "D", "C", "B", "A"] # 索引越小优先级越高
|
||||
|
||||
Reference in New Issue
Block a user