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
ca46a06e
Commit
ca46a06e
authored
Nov 26, 2021
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
补货报告接口修改
补货数量修改
parent
85f3c5a7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
myapps/sukang24h/api/tallyman_portal.py
+5
-3
No files found.
myapps/sukang24h/api/tallyman_portal.py
View file @
ca46a06e
...
...
@@ -4,6 +4,8 @@ import logging
import
time
from
flask
import
Blueprint
,
jsonify
,
request
,
g
from
sqlalchemy
import
func
from
config.base_config
import
MONGO_DATABASE_URI
from
config.commen_config
import
LOGIN_TYPE
...
...
@@ -340,9 +342,9 @@ def get_tally_report():
return
jsonify
(
MACHINE_NOT_EXIST_ERROR
)
empty_number
=
int
(
machine_info
[
"empty_number"
])
over_number
=
TallyRecord
.
query
.
filter
(
TallyRecord
.
user_no
==
g
.
user
.
user_no
,
TallyRecord
.
machine_no
==
machine_no
,
TallyRecord
.
status
==
2
)
.
count
()
over_number
=
db
.
session
.
query
(
func
.
sum
(
TallyRecord
.
tally_count
))
.
filter
(
TallyRecord
.
user_no
==
g
.
user
.
user_no
,
TallyRecord
.
machine_no
==
machine_no
,
TallyRecord
.
status
==
2
)
.
scalar
()
return
BaseResponse
(
data
=
{
"empty_number"
:
empty_number
,
"over_number"
:
over_number
})
...
...
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