Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
lichenggang
/
tas_monitor
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
10124fa2
authored
Apr 14, 2021
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
新增过滤平台
parent
7db55a2d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
utils/mongo.py
utils/mongo.py
View file @
10124fa2
...
...
@@ -33,6 +33,9 @@ def get_mongo_conf():
return
conf
filter_pn
=
(
"cdi"
,
"richardsonrfpd"
,
"company"
,
"wpg"
,)
class
MongoOperator
:
def
__init__
(
self
):
...
...
@@ -140,11 +143,12 @@ class MongoOperator:
stock_ontrast_ratio
=
stock_rate
-
old_stock_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
:
msg_line
=
demo2
.
format
(
plat
,
stock_ontrast_ratio
,
tiered_ontrast_ratio
,
stock_rate
,
tiered_rate
)
print
(
plat
,
"空库存数量"
,
stock_num
,
"空价格数量"
,
stock_num
,
"总量"
,
total
,
"空库存率"
,
stock_rate
,
"空价格率"
,
tiered_rate
,
"空库存变化率"
,
stock_ontrast_ratio
,
"空价格变化率"
,
tiered_ontrast_ratio
,
)
if
plat
not
in
filter_pn
:
msg_line
=
demo2
.
format
(
plat
,
stock_ontrast_ratio
,
tiered_ontrast_ratio
,
stock_rate
,
tiered_rate
)
print
(
plat
,
"空库存数量"
,
stock_num
,
"空价格数量"
,
stock_num
,
"总量"
,
total
,
"空库存率"
,
stock_rate
,
"空价格率"
,
tiered_rate
,
"空库存变化率"
,
stock_ontrast_ratio
,
"空价格变化率"
,
tiered_ontrast_ratio
,
)
glo
.
set_value
(
plat
,
{
"stock"
:
stock_rate
,
"tiered"
:
tiered_rate
})
if
msg_line
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment