Commit 14340671 authored by rico.liu's avatar rico.liu

update

parent b28bbb11
...@@ -15,19 +15,19 @@ import ast ...@@ -15,19 +15,19 @@ import ast
def get_simple_value(): def get_simple_value():
conn_zi_new = pymssql.connect(host = '123.56.115.207', user = 'zgcprice3311', password = 'zgcprice20200628', database = 'ZI_NEW', autocommit = True) conn_zi_new = pymssql.connect(host = '123.56.115.207', user = 'zgcprice3311', password = 'zgcprice20200628', database = 'ZI_NEW', autocommit = True)
cursor = conn_zi_new.cursor() cursor = conn_zi_new.cursor()
cursor.execute(f"select tip from skuname_named_rule") cursor.execute(f"select categoryname,tip from skuname_named_rule")
data = (cursor.fetchall()) data = (cursor.fetchall())
export_category = pd.DataFrame(data,columns = [tuple[0] for tuple in cursor.description]) export_category = pd.DataFrame(data,columns = [tuple[0] for tuple in cursor.description])
'''
tip_list = export_category["tip"].tolist() tip_list = export_category["tip"].tolist()
temp = [] temp = []
for i in tip_list: for i in tip_list:
i = ast.literal_eval(i) i = ast.literal_eval(i)
temp = list(set(temp+i)) temp = list(set(temp+i))
'''
conn_zi_new.close() conn_zi_new.close()
return temp return export_category
def transform_simplevalue(simple_subtitle_list,shujuzidiandf,categoryname,subtitle,stdvalue): def transform_simplevalue(simple_subtitle_list,shujuzidiandf,categoryname,subtitle,stdvalue):
...@@ -134,7 +134,8 @@ def upload_params_data(category,path): ...@@ -134,7 +134,8 @@ def upload_params_data(category,path):
single_data_dict = data_dict single_data_dict = data_dict
#获取需要转换简称的参数列表 #获取需要转换简称的参数列表
simple_subtitle_list = get_simple_value() simple_subtitle_df = get_simple_value()
simple_subtitle_list = simple_subtitle_df[simple_subtitle_df['categoryname'] == category]['tip'].tolist()
process_index = 0 process_index = 0
index_ = Index() index_ = Index()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment