Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
Automat
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
1
Merge Requests
1
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
冯佳佳
Automat
Commits
3d3f02d9
Commit
3d3f02d9
authored
Nov 25, 2021
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加机柜指令运行时间
parent
5756af86
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletions
+3
-1
models/models.py
+1
-0
myapps/sukang24h/api/machine_portal.py
+2
-1
No files found.
models/models.py
View file @
3d3f02d9
...
...
@@ -73,6 +73,7 @@ class Machine(Base):
status
=
Column
(
TINYINT
(
1
),
server_default
=
text
(
"'1'"
),
comment
=
'状态: 1正常-1删除'
)
created_at
=
Column
(
TIMESTAMP
,
nullable
=
False
,
server_default
=
text
(
"CURRENT_TIMESTAMP"
))
updated_at
=
Column
(
TIMESTAMP
,
nullable
=
False
,
server_default
=
text
(
"CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"
))
command_time
=
Column
(
INTEGER
(
1
),
nullable
=
False
)
class
MachineProduction
(
Base
):
...
...
myapps/sukang24h/api/machine_portal.py
View file @
3d3f02d9
...
...
@@ -88,6 +88,7 @@ def run_get_machine_no():
machine
=
Machine
.
query
.
filter_by
(
qrcode_no
=
qrcode_no
)
.
first
()
if
machine
:
return
BaseResponse
(
data
=
{
"machine_no"
:
machine
.
machine_no
,
"status"
:
machine
.
status
,
"mac_no"
:
machine
.
mac
})
return
BaseResponse
(
data
=
{
"machine_no"
:
machine
.
machine_no
,
"status"
:
machine
.
status
,
"mac_no"
:
machine
.
mac
,
"command_time"
:
machine
.
command_time
})
else
:
return
jsonify
(
MACHINE_NOT_EXIST_ERROR
)
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