经销商新签服务单表单字段更新
This commit is contained in:
@@ -6,3 +6,27 @@ Traceback (most recent call last):
|
||||
prepared_df['g_month_percentage'] = (pd.to_numeric(data_NGV_j['g_month_percentage'], errors='coerce')
|
||||
^^^^^^^^^^
|
||||
NameError: name 'data_NGV_j' is not defined
|
||||
2025-12-15 10:53:08,519 - log_config.py - error_task_logger - ERROR - 经销商新签服务单转BI任务执行失败: '业务人员'
|
||||
Traceback (most recent call last):
|
||||
File "D:\ProgramTools\anaconda3\envs\saas\Lib\site-packages\pandas\core\indexes\base.py", line 3812, in get_loc
|
||||
return self._engine.get_loc(casted_key)
|
||||
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
|
||||
File "pandas/_libs/index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
|
||||
File "pandas/_libs/index.pyx", line 196, in pandas._libs.index.IndexEngine.get_loc
|
||||
File "pandas/_libs/hashtable_class_helper.pxi", line 7088, in pandas._libs.hashtable.PyObjectHashTable.get_item
|
||||
File "pandas/_libs/hashtable_class_helper.pxi", line 7096, in pandas._libs.hashtable.PyObjectHashTable.get_item
|
||||
KeyError: '业务人员'
|
||||
|
||||
The above exception was the direct cause of the following exception:
|
||||
|
||||
Traceback (most recent call last):
|
||||
File "D:\Idea Project\SaaS_V1.7\back_ground_module\new_dealer_service_order_to_bi.py", line 198, in main
|
||||
df = self.data_process()
|
||||
File "D:\Idea Project\SaaS_V1.7\back_ground_module\new_dealer_service_order_to_bi.py", line 83, in data_process
|
||||
df[col] = df[col].map(lambda x: x.get("name", "") if isinstance(x, dict) else "")
|
||||
~~^^^^^
|
||||
File "D:\ProgramTools\anaconda3\envs\saas\Lib\site-packages\pandas\core\frame.py", line 4107, in __getitem__
|
||||
indexer = self.columns.get_loc(key)
|
||||
File "D:\ProgramTools\anaconda3\envs\saas\Lib\site-packages\pandas\core\indexes\base.py", line 3819, in get_loc
|
||||
raise KeyError(key) from err
|
||||
KeyError: '业务人员'
|
||||
|
||||
@@ -42,7 +42,8 @@ class NewDealerServiceOrderToBI:
|
||||
'系统到期时间': '_widget_1741165503709', '开通状态': '_widget_1741165503714',
|
||||
'销售负责人': '_widget_1741165503716', '运营顾问': '_widget_1741165503718',
|
||||
'运营专家': '_widget_1741165503719', '区域经理': '_widget_1741165503717',
|
||||
'业务人员': '_widget_1741165503721', '是否设置经营范围': '_widget_1742200372555',
|
||||
# '业务人员': '_widget_1741165503721'
|
||||
'是否设置经营范围': '_widget_1742200372555',
|
||||
'不设置经营范围原因': '_widget_1742268351775', '是否建群': '_widget_1742200372553',
|
||||
'不建群原因': '_widget_1742268351776', '是否设置备货清单': '_widget_1742200372634',
|
||||
'不设置备货清单原因': '_widget_1742268351778', '是否设置报价': '_widget_1742260928184',
|
||||
@@ -76,7 +77,7 @@ class NewDealerServiceOrderToBI:
|
||||
df.columns = [reverse_mapping.get(col, col) for col in df.columns]
|
||||
|
||||
# 2.成员字段取值
|
||||
user_columns = ["提交人", "销售负责人", "区域经理", "业务人员", "运营顾问", "运营专家"]
|
||||
user_columns = ["提交人", "销售负责人", "区域经理", "运营顾问", "运营专家"]
|
||||
|
||||
for col in user_columns:
|
||||
df[col] = df[col].map(lambda x: x.get("name", "") if isinstance(x, dict) else "")
|
||||
|
||||
Reference in New Issue
Block a user