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
0d8ab262
authored
Nov 22, 2019
by
陈森彬
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
debug
parent
965d0c74
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
utils/mongo.py
utils/mongo.py
View file @
0d8ab262
...
...
@@ -120,11 +120,11 @@ class MongoOperator:
if
total
>
0
:
stock_rate
=
stock_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_tiered_rate
=
glo
.
get_value
(
plat
)[
"tiered"
]
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
None
if
stock_rate
>=
10
or
tiered_rate
>=
10
:
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
,
"空库存率"
,
stock_rate
,
"空价格率"
,
tiered_rate
,
)
msg_line
=
demo1
.
format
(
plat
,
stock_rate
,
tiered_rate
)
...
...
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