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

deal complicated source

parent bc17ee8d
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
...@@ -36,12 +36,12 @@ def get_params_df(df): ...@@ -36,12 +36,12 @@ def get_params_df(df):
productid_list = df['productId'].unique().tolist() productid_list = df['productId'].unique().tolist()
productid_list_str = str(productid_list).replace('[','(').replace(']',')') productid_list_str = str(productid_list).replace('[','(').replace(']',')')
batch = df['batch'][0] batch = df['batch'][0]
source = df['source'][0] #source = df['source'][0]
#search #search
conn = pymssql.connect('123.56.115.207','zgcindex','jiayou2017+2018','ZI_DataBase') conn = pymssql.connect('123.56.115.207','zgcindex','jiayou2017+2018','ZI_DataBase')
cursor = conn.cursor() cursor = conn.cursor()
cursor.execute(f"select * from Product_Parameter_Process where productId in {productid_list_str} and batch = '{batch}' and source = '{source}' and state = 2 and paramAttributeMatch = 1") cursor.execute(f"select * from Product_Parameter_Process where productId in {productid_list_str} and batch = '{batch}' and state = 2 and paramAttributeMatch = 1")
params_df = pd.DataFrame([v for v in cursor.fetchall()],columns=[tuple[0] for tuple in cursor.description]) params_df = pd.DataFrame([v for v in cursor.fetchall()],columns=[tuple[0] for tuple in cursor.description])
#comoleted brand info #comoleted brand info
...@@ -180,4 +180,4 @@ def match(df): ...@@ -180,4 +180,4 @@ def match(df):
#enter #enter
params_df = get_params_df(df) params_df = get_params_df(df)
res = match_with_db(params_df) res = match_with_db(params_df)
return res return res
\ No newline at end of file
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