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
f276518a
Commit
f276518a
authored
Jun 15, 2020
by
魏强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qwe;
parent
c746330f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
Controller/RentController.py
+3
-0
Service/RentService.py
+4
-3
No files found.
Controller/RentController.py
View file @
f276518a
...
...
@@ -73,6 +73,9 @@ def rent_detail():
rent_no
=
json_data
[
'rent_no'
]
if
'rent_no'
in
json_data
else
''
hatch_no
=
json_data
[
'hatch_no'
]
if
'hatch_no'
in
json_data
else
''
# data = RentService.get_production_detail(rent_no, hatch_no)
if
not
hatch_no
:
data
=
RentService
.
get_no_production_detail
(
rent_no
)
else
:
data
=
RentService
.
get_production_detail_new
(
rent_no
,
hatch_no
)
return
jsonify
(
BASE_RESPONSE
(
data
=
data
)
.
to_dict
())
...
...
Service/RentService.py
View file @
f276518a
...
...
@@ -95,8 +95,7 @@ class RentService():
return
data
@staticmethod
def
get_production_detail_new
(
rent_no
,
hatch_no
):
if
not
hatch_no
:
def
get_no_production_detail
(
rent_no
):
rent_detail
=
Rent
.
query
.
filter_by
(
rent_no
=
rent_no
)
.
first
()
total_info
=
[]
tmp
=
{
...
...
@@ -117,7 +116,9 @@ class RentService():
total_info
.
append
(
tmp
)
return
total_info
else
:
@staticmethod
def
get_production_detail_new
(
rent_no
,
hatch_no
):
sql
=
'''
SELECT rent.deposit, rent.is_over, production.is_return, production.total, production.return_hatch_no,
production.rent_machine_id, rent.customer_id, rent.real_total, rent.rent_no, production.return_time,
...
...
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