Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tour_business
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
魏强
tour_business
Commits
f63b004c
Commit
f63b004c
authored
Nov 04, 2020
by
魏强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
弹出数量超标提示,改成每天累计弹出量;
parent
f53ff517
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
Controller/ToolController.py
+6
-1
No files found.
Controller/ToolController.py
View file @
f63b004c
...
@@ -5,6 +5,7 @@ import time
...
@@ -5,6 +5,7 @@ import time
from
flask
import
Blueprint
,
jsonify
,
request
,
g
from
flask
import
Blueprint
,
jsonify
,
request
,
g
from
Libs.ErrorTips
import
MACHINE_NOT_EXIST_ERROR
,
MACHINE_HATCH_NOT_ILLEGAL
,
MACHINE_NOT_ONLINE
,
BASE_RESPONSE
from
Libs.ErrorTips
import
MACHINE_NOT_EXIST_ERROR
,
MACHINE_HATCH_NOT_ILLEGAL
,
MACHINE_NOT_ONLINE
,
BASE_RESPONSE
from
Libs.Helper.Helper
import
getTodayDate
from
Libs.Onenet.Message.Message
import
CommandMessage
from
Libs.Onenet.Message.Message
import
CommandMessage
from
Libs.Onenet.OneNetApi
import
OneNetApi
from
Libs.Onenet.OneNetApi
import
OneNetApi
from
Model.Base
import
db
from
Model.Base
import
db
...
@@ -124,7 +125,11 @@ def take_out_multiple():
...
@@ -124,7 +125,11 @@ def take_out_multiple():
time
.
sleep
(
3
)
time
.
sleep
(
3
)
# 当弹出充电宝数量大于5台时,给管理员手机发送短信
# 当弹出充电宝数量大于5台时,给管理员手机发送短信
cur_take_out_num
=
len
(
hatch_no_list
)
zero_today
,
last_today
=
getTodayDate
()
cur_take_out_num
=
db
.
session
.
query
(
TakeoutTool
)
.
filter
(
TakeoutTool
.
customer_id
==
g
.
user
.
id
,
TakeoutTool
.
created_at
>=
zero_today
,
TakeoutTool
.
created_at
<=
last_today
)
.
count
()
# cur_take_out_num = len(hatch_no_list)
if
cur_take_out_num
>=
5
:
if
cur_take_out_num
>=
5
:
cur_user_name
=
g
.
user
.
user_name
cur_user_name
=
g
.
user
.
user_name
...
...
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