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
0753af61
Commit
0753af61
authored
Jun 15, 2020
by
魏强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qwe;
parent
796d6a5d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
16 deletions
+40
-16
Service/RentService.py
+40
-16
No files found.
Service/RentService.py
View file @
0753af61
...
@@ -99,22 +99,46 @@ class RentService():
...
@@ -99,22 +99,46 @@ class RentService():
print
(
'no_production_Detail'
)
print
(
'no_production_Detail'
)
rent_detail
=
Rent
.
query
.
filter_by
(
rent_no
=
rent_no
)
.
first
()
rent_detail
=
Rent
.
query
.
filter_by
(
rent_no
=
rent_no
)
.
first
()
total_info
=
[]
total_info
=
[]
tmp
=
{
cur_info
=
{}
'deposit'
:
9900
,
cur_info
[
'deposit'
]
=
9900
'is_return'
:
1
,
cur_info
[
'is_return'
]
=
0
'status'
:
0
,
cur_info
[
'mac_no'
]
=
None
'mac_no'
:
None
,
cur_info
[
'phone'
]
=
RentService
.
get_customer_phone
(
rent_detail
.
customer_id
)
'phone'
:
RentService
.
get_customer_phone
(
rent_detail
.
customer_id
),
cur_info
[
'real_total'
]
=
0
'real_total'
:
0
,
cur_info
[
'rent_no'
]
=
rent_no
'rent_no'
:
rent_no
,
cur_info
[
'rent_over_time'
]
=
None
'rent_over_time'
:
None
,
cur_info
[
'rent_price'
]
=
None
'rent_price'
:
None
,
cur_info
[
'spot_name'
]
=
RentService
.
get_rent_spot_name
(
rent_detail
.
spot_id
)
'spot_name'
:
RentService
.
get_rent_spot_name
(
rent_detail
.
spot_id
),
cur_info
[
'is_refund'
]
=
0
'is_refund'
:
0
,
cur_info
[
'refund_no'
]
=
None
'refund_no'
:
None
,
cur_info
[
'rent_refund_no'
]
=
None
'rent_refund_no'
:
None
,
}
if
rent_detail
.
rent_type
==
2
:
total_info
.
append
(
tmp
)
if
rent_detail
.
machine_id
==
0
:
if
rent_detail
.
is_pay
==
1
and
rent_detail
.
is_over
==
0
:
cur_info
[
'status'
]
=
4
else
:
cur_info
[
'status'
]
=
2
if
cur_info
[
'total'
]
<=
0
:
if
rent_detail
.
return_hatch_no
==
127
:
cur_info
[
'status'
]
=
3
else
:
cur_info
[
'status'
]
=
2
else
:
cur_info
[
'status'
]
=
1
elif
rent_detail
.
is_return
==
1
:
if
cur_info
[
'total'
]
<=
0
:
if
rent_detail
.
return_hatch_no
==
127
:
cur_info
[
'status'
]
=
3
else
:
cur_info
[
'status'
]
=
2
else
:
cur_info
[
'status'
]
=
1
else
:
cur_info
[
'status'
]
=
0
total_info
.
append
(
cur_info
)
return
total_info
return
total_info
@staticmethod
@staticmethod
...
...
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