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
284c35e0
Commit
284c35e0
authored
Jul 08, 2021
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
df532045
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
1 deletions
+25
-1
Controller/ToolController.py
+25
-1
No files found.
Controller/ToolController.py
View file @
284c35e0
...
...
@@ -139,7 +139,8 @@ def take_out_multiple():
# 发短信
sms
=
SMSService
()
sms
.
phoneSendTips
(
cur_user_name
,
cur_spot_name
,
mac_no
,
cur_take_out_num
,
cur_user_phone
,
'18068402080'
,
'灰兔智能'
)
sms
.
phoneSendTips
(
cur_user_name
,
cur_spot_name
,
mac_no
,
cur_take_out_num
,
cur_user_phone
,
'18068402080'
,
'灰兔智能'
)
try
:
if
take_out_success_number
>
0
and
machine_info
.
mac_no
in
TAKEOUT_RECORD_MAC_NO
:
...
...
@@ -184,3 +185,26 @@ def tool_reset():
db
.
session
.
commit
()
return
jsonify
(
BASE_RESPONSE
()
.
to_dict
())
@route_tool.route
(
'/hatch_no_lock'
,
methods
=
[
"POST"
])
def
tool_hatch_no_lock
():
json_data
=
request
.
get_json
()
mac_no
=
json_data
.
get
(
'mac_no'
,
None
)
hatch_no
=
json_data
.
get
(
'hatch_no'
,
None
)
if
not
mac_no
or
not
hatch_no
:
return
jsonify
({
'code'
:
-
1
,
'msg'
:
'params error'
})
machine_info
=
Machine
.
query
.
filter_by
(
mac_no
=
mac_no
)
.
first
()
if
not
machine_info
:
return
jsonify
(
MACHINE_NOT_EXIST_ERROR
)
power_info
=
Power
.
query
.
filter_by
(
machine_id
=
machine_info
.
id
,
hatch_no
=
hatch_no
)
.
first
()
if
power_info
:
power_info
.
status
=
5
db
.
session
.
add
(
power_info
)
db
.
session
.
commit
()
return
jsonify
(
BASE_RESPONSE
()
.
to_dict
())
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