Commit 10124fa2 by 陈森彬

新增过滤平台

parent 7db55a2d
Showing with 9 additions and 5 deletions
...@@ -33,6 +33,9 @@ def get_mongo_conf(): ...@@ -33,6 +33,9 @@ def get_mongo_conf():
return conf return conf
filter_pn = ("cdi", "richardsonrfpd", "company", "wpg",)
class MongoOperator: class MongoOperator:
def __init__(self): def __init__(self):
...@@ -140,11 +143,12 @@ class MongoOperator: ...@@ -140,11 +143,12 @@ class MongoOperator:
stock_ontrast_ratio = stock_rate - old_stock_rate stock_ontrast_ratio = stock_rate - old_stock_rate
tiered_ontrast_ratio = tiered_rate - old_tiered_rate tiered_ontrast_ratio = tiered_rate - old_tiered_rate
if not -3 < stock_ontrast_ratio < 3 or not -3 < tiered_ontrast_ratio < 3 or stock_rate > 90 or tiered_rate > 90: if not -3 < stock_ontrast_ratio < 3 or not -3 < tiered_ontrast_ratio < 3 or stock_rate > 90 or tiered_rate > 90:
msg_line = demo2.format(plat, stock_ontrast_ratio, tiered_ontrast_ratio, stock_rate, if plat not in filter_pn:
tiered_rate) msg_line = demo2.format(plat, stock_ontrast_ratio, tiered_ontrast_ratio, stock_rate,
print(plat, "空库存数量", stock_num, "空价格数量", stock_num, "总量", total, "空库存率", tiered_rate)
stock_rate, "空价格率", tiered_rate, "空库存变化率", stock_ontrast_ratio, print(plat, "空库存数量", stock_num, "空价格数量", stock_num, "总量", total, "空库存率",
"空价格变化率", tiered_ontrast_ratio, ) stock_rate, "空价格率", tiered_rate, "空库存变化率", stock_ontrast_ratio,
"空价格变化率", tiered_ontrast_ratio, )
glo.set_value(plat, {"stock": stock_rate, "tiered": tiered_rate}) glo.set_value(plat, {"stock": stock_rate, "tiered": tiered_rate})
if msg_line: if msg_line:
......
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