Commit 0d8ab262 by 陈森彬

debug

parent 965d0c74
Showing with 3 additions and 3 deletions
...@@ -120,11 +120,11 @@ class MongoOperator: ...@@ -120,11 +120,11 @@ class MongoOperator:
if total > 0: if total > 0:
stock_rate = stock_num / total * 100 stock_rate = stock_num / total * 100
tiered_rate = tiered_num / total * 100 tiered_rate = tiered_num / total * 100
old_stock_rate = glo.get_value(plat)["stock"] if glo.get_value(plat) else 0 old_stock_rate = glo.get_value(plat)["stock"] if glo.get_value(plat) else None
old_tiered_rate = glo.get_value(plat)["tiered"] if glo.get_value(plat) else 0 old_tiered_rate = glo.get_value(plat)["tiered"] if glo.get_value(plat) else None
if stock_rate >= 10 or tiered_rate >= 10: if stock_rate >= 10 or tiered_rate >= 10:
msg_line = "" msg_line = ""
if old_stock_rate == 0 or old_tiered_rate == 0: if old_stock_rate is None or old_tiered_rate is None:
print(plat, "空库存数量", stock_num, "空价格数量", stock_num, "总量", total print(plat, "空库存数量", stock_num, "空价格数量", stock_num, "总量", total
, "空库存率", stock_rate, "空价格率", tiered_rate, ) , "空库存率", stock_rate, "空价格率", tiered_rate, )
msg_line = demo1.format(plat, stock_rate, tiered_rate) msg_line = demo1.format(plat, stock_rate, tiered_rate)
......
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