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
ba0f3f50
Commit
ba0f3f50
authored
Oct 18, 2021
by
冯佳佳
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
6f125435
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
myapps/sukang24h/api/tallyman_portal.py
+18
-0
No files found.
myapps/sukang24h/api/tallyman_portal.py
View file @
ba0f3f50
...
@@ -291,7 +291,23 @@ def run_tally_over():
...
@@ -291,7 +291,23 @@ def run_tally_over():
json_data
=
request
.
get_json
()
json_data
=
request
.
get_json
()
machine_no
=
json_data
[
'machine_no'
]
machine_no
=
json_data
[
'machine_no'
]
hatch_no
=
json_data
[
'hatch_no'
]
hatch_no
=
json_data
[
'hatch_no'
]
tally_type
=
json_data
[
"type"
]
# 补货类型 1全部缺货锁 2打开指定仓号
user_id
=
g
.
user
.
id
user_id
=
g
.
user
.
id
if
tally_type
==
1
:
for
i
in
hatch_no
:
tally_record
=
TallyRecord
.
query
.
filter
(
TallyRecord
.
user_no
==
g
.
user
.
user_no
,
TallyRecord
.
machine_no
==
machine_no
,
TallyRecord
.
hatch_no
==
i
,
TallyRecord
.
status
==
1
)
.
order_by
(
TallyRecord
.
id
.
desc
())
.
first
()
if
tally_record
:
tally_record
.
status
=
2
db
.
session
.
add
(
tally_record
)
db
.
session
.
commit
()
hatch
=
Hatch
.
query
.
filter_by
(
machine_no
=
machine_no
,
hatch_no
=
hatch_no
,
status
=
2
)
.
update
({
"status"
:
1
})
db
.
session
.
commit
()
elif
tally_type
==
2
:
tally_record
=
TallyRecord
.
query
.
filter
(
TallyRecord
.
user_no
==
g
.
user
.
user_no
,
TallyRecord
.
machine_no
==
machine_no
,
tally_record
=
TallyRecord
.
query
.
filter
(
TallyRecord
.
user_no
==
g
.
user
.
user_no
,
TallyRecord
.
machine_no
==
machine_no
,
TallyRecord
.
hatch_no
==
hatch_no
,
TallyRecord
.
hatch_no
==
hatch_no
,
TallyRecord
.
status
==
1
)
.
order_by
(
TallyRecord
.
id
.
desc
())
.
first
()
TallyRecord
.
status
==
1
)
.
order_by
(
TallyRecord
.
id
.
desc
())
.
first
()
...
@@ -303,6 +319,8 @@ def run_tally_over():
...
@@ -303,6 +319,8 @@ def run_tally_over():
hatch
.
status
=
1
hatch
.
status
=
1
db
.
session
.
add
(
hatch
)
db
.
session
.
add
(
hatch
)
db
.
session
.
commit
()
db
.
session
.
commit
()
else
:
pass
return
BaseResponse
()
return
BaseResponse
()
...
...
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