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
cd516d11
Commit
cd516d11
authored
Sep 15, 2020
by
Aeolus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
退款接口把寒山寺的agent_total按照80%的比例下调
25改为20,50改为40,75改为60
parent
9ac16817
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
5 deletions
+16
-5
Controller/RentController.py
+16
-5
No files found.
Controller/RentController.py
View file @
cd516d11
...
@@ -229,6 +229,11 @@ def rent_refund():
...
@@ -229,6 +229,11 @@ def rent_refund():
fee
=
RentService
.
check_fee
(
rent
.
pay_time
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
),
str
(
back_time
),
rent
.
one_day_price
,
fee
=
RentService
.
check_fee
(
rent
.
pay_time
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
),
str
(
back_time
),
rent
.
one_day_price
,
rent
.
free_time
,
production_info
.
Machine
.
id
,
production_info
.
Machine
.
price_type
)
rent
.
free_time
,
production_info
.
Machine
.
id
,
production_info
.
Machine
.
price_type
)
total
=
fee
[
'total'
]
if
fee
[
'total'
]
<
rent
.
deposit
else
rent
.
deposit
total
=
fee
[
'total'
]
if
fee
[
'total'
]
<
rent
.
deposit
else
rent
.
deposit
# 寒山寺agent_total把25修改为20,80%的比例
if
rent
.
spot_id
==
'48'
:
agent_total
=
total
*
0.8
else
:
agent_total
=
total
refund_money
=
rent
.
deposit
-
total
refund_money
=
rent
.
deposit
-
total
...
@@ -249,7 +254,7 @@ def rent_refund():
...
@@ -249,7 +254,7 @@ def rent_refund():
try
:
try
:
rent
.
total
=
rent
.
total
+
total
rent
.
total
=
rent
.
total
+
total
rent
.
real_total
=
rent
.
real_total
+
total
rent
.
real_total
=
rent
.
real_total
+
total
rent
.
agent_total
=
rent
.
agent_total
+
total
rent
.
agent_total
=
rent
.
agent_total
+
agent_
total
rent
.
is_over
=
1
rent
.
is_over
=
1
rent
.
over_time
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
rent
.
over_time
=
datetime
.
datetime
.
now
()
.
strftime
(
'
%
Y-
%
m-
%
d
%
H:
%
M:
%
S'
)
rent
.
back_money
=
rent
.
back_money
+
refund_money
rent
.
back_money
=
rent
.
back_money
+
refund_money
...
@@ -259,7 +264,7 @@ def rent_refund():
...
@@ -259,7 +264,7 @@ def rent_refund():
production
.
return_machine_id
=
production_info
.
Machine
.
id
production
.
return_machine_id
=
production_info
.
Machine
.
id
production
.
return_time
=
back_time
production
.
return_time
=
back_time
production
.
total
=
total
production
.
total
=
total
production
.
agent_total
=
total
production
.
agent_total
=
agent_
total
production
.
is_refund
=
1
production
.
is_refund
=
1
production
.
refund_no
=
refund_no
production
.
refund_no
=
refund_no
if
refund_type
==
'1'
:
if
refund_type
==
'1'
:
...
@@ -430,7 +435,13 @@ def rent_money_refund_new():
...
@@ -430,7 +435,13 @@ def rent_money_refund_new():
rent
=
rent_info
.
Rent
rent
=
rent_info
.
Rent
production
=
rent_info
.
Production
production
=
rent_info
.
Production
new_total
=
int
(
time_price
[
-
1
])
new_total
=
int
(
time_price
[
-
1
])
# 传入的收费标准参考["60分钟","75分钟",1500],["75分钟","1天",2500]
# 寒山寺agent_total把25修改为20,80%的比例
if
rent
.
spot_id
==
'48'
:
new_agent_total
=
new_total
*
0.8
else
:
new_agent_total
=
new_total
if
production
.
is_return
:
if
production
.
is_return
:
refund_money
=
production
.
total
-
new_total
refund_money
=
production
.
total
-
new_total
else
:
else
:
...
@@ -447,7 +458,7 @@ def rent_money_refund_new():
...
@@ -447,7 +458,7 @@ def rent_money_refund_new():
if
tmp
.
id
==
production
.
id
:
if
tmp
.
id
==
production
.
id
:
rent_total
+=
new_total
rent_total
+=
new_total
rent_real_total
+=
new_total
rent_real_total
+=
new_total
rent_agent_total
+=
new_total
rent_agent_total
+=
new_
agent_
total
else
:
else
:
rent_total
+=
tmp
.
total
if
tmp
.
total
is
not
None
else
0
rent_total
+=
tmp
.
total
if
tmp
.
total
is
not
None
else
0
rent_real_total
+=
tmp
.
total
if
tmp
.
total
is
not
None
else
0
rent_real_total
+=
tmp
.
total
if
tmp
.
total
is
not
None
else
0
...
@@ -478,7 +489,7 @@ def rent_money_refund_new():
...
@@ -478,7 +489,7 @@ def rent_money_refund_new():
rent
.
is_over
=
1
rent
.
is_over
=
1
production
.
total
=
new_total
production
.
total
=
new_total
production
.
agent_total
=
new_total
production
.
agent_total
=
new_
agent_
total
if
not
production
.
is_return
:
if
not
production
.
is_return
:
production
.
is_return
=
1
production
.
is_return
=
1
production
.
return_time
=
datetime
.
datetime
.
now
()
production
.
return_time
=
datetime
.
datetime
.
now
()
...
...
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