Commit 7da52229 by 岳巧源

modify py script

parent a70c40f8
Showing with 5 additions and 5 deletions
...@@ -62,13 +62,13 @@ def resolve(file_name: str, supplier_id: int): ...@@ -62,13 +62,13 @@ def resolve(file_name: str, supplier_id: int):
brand_name = str(df.loc[i, "品牌"]) brand_name = str(df.loc[i, "品牌"])
if goods_name.strip() == "" or brand_name.strip() == "" or goods_name.strip() == "nan" or brand_name.strip() == "nan": if goods_name.strip() == "" or brand_name.strip() == "" or goods_name.strip() == "nan" or brand_name.strip() == "nan":
continue continue
stock = str(int(str(df.loc[i, "库存"]))) stock = str(int(df.loc[i, "库存"]))
moq = str(int(str(df.loc[i, "起订量"]))) moq = str(int(df.loc[i, "起订量"]))
mpq = str(int(str(df.loc[i, "MPQ(最小包装数量)"]))) mpq = str(int(df.loc[i, "MPQ(最小包装数量)"]))
price_is_us = False price_is_us = False
supp_id = int(supplier_id) supp_id = int(supplier_id)
supplier_name = "" supplier_name = ""
multiple = str(int(str(df.loc[i, "增量"]))) multiple = str(int(df.loc[i, "增量"]))
batch_sn = { batch_sn = {
str(df.loc[i, "批次"]): int(df.loc[i, "库存"]), str(df.loc[i, "批次"]): int(df.loc[i, "库存"]),
} }
...@@ -123,7 +123,7 @@ def process(url: str, supplier_id: int): ...@@ -123,7 +123,7 @@ def process(url: str, supplier_id: int):
f.write(response.content) f.write(response.content)
resolve(absolute_path, supplier_id) resolve(absolute_path, supplier_id)
except Exception as e: except Exception as e:
print(e) logging.error(e)
finally: finally:
if abs_path != "": if abs_path != "":
os.remove(abs_path) os.remove(abs_path)
......
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 sign in to comment