Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
d63c2ba8
Commit
d63c2ba8
authored
Dec 04, 2019
by
周健威
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-delay-add' into dev
parents
1b022904
ce8e6f63
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
1 deletion
+19
-1
OrderCalculateBiz.java
.../com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
+19
-1
No files found.
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCalculateBiz.java
View file @
d63c2ba8
...
@@ -393,6 +393,14 @@ public class OrderCalculateBiz {
...
@@ -393,6 +393,14 @@ public class OrderCalculateBiz {
InProgressVO
inProgressVO
=
new
InProgressVO
();
InProgressVO
inProgressVO
=
new
InProgressVO
();
BigDecimal
topAmount
=
BigDecimal
.
ZERO
;
BigDecimal
topAmount
=
BigDecimal
.
ZERO
;
//缓冲取消时间(一个小时)
Map
<
String
,
Dictionary
>
dictionaryMap
=
thirdFeign
.
dictionaryGetAll4Map
().
getData
();
Long
autoCancelTime
=
Long
.
valueOf
(
dictionaryMap
.
get
(
APP_ORDER
+
"_"
+
DictionaryKey
.
CANCEL_TIME_BUFFER
).
getDetail
());
//判断是否支付超过缓冲取消时间(一个小时)
Long
orderCrtLag
=
System
.
currentTimeMillis
()
-
orderPageVO
.
getPayTime
();
Boolean
overCancelBuffer
=
(
orderCrtLag
>
autoCancelTime
)?
Boolean
.
TRUE
:
Boolean
.
FALSE
;
switch
(
orderTypeEnum
)
{
switch
(
orderTypeEnum
)
{
case
RENT_VEHICLE:
case
RENT_VEHICLE:
...
@@ -406,7 +414,7 @@ public class OrderCalculateBiz {
...
@@ -406,7 +414,7 @@ public class OrderCalculateBiz {
//融入日期价格
//融入日期价格
List
<
VehicleModelCalendarPriceDTO
>
vmcpds
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
vehicleItemDTO
.
getDetail
()),
VehicleModelCalendarPriceDTO
.
class
);
List
<
VehicleModelCalendarPriceDTO
>
vmcpds
=
JSONUtil
.
toList
(
JSONUtil
.
parseArray
(
vehicleItemDTO
.
getDetail
()),
VehicleModelCalendarPriceDTO
.
class
);
if
(
timeLag
<
0
)
{
if
(
timeLag
<
0
&&
overCancelBuffer
)
{
Integer
useDays
=
getIncludeDays
(
orderPageVO
.
getOrderRentVehicleDetail
().
getStartTime
(),
DateTime
.
now
().
getMillis
());
Integer
useDays
=
getIncludeDays
(
orderPageVO
.
getOrderRentVehicleDetail
().
getStartTime
(),
DateTime
.
now
().
getMillis
());
OrderAccountDetail
oad
=
new
OrderAccountDetail
();
OrderAccountDetail
oad
=
new
OrderAccountDetail
();
inProgressVO
=
inProgressCalculate
(
orderPageVO
,
vehicleItemDTO
,
orderPageVO
.
getOrderRentVehicleDetail
(),
useDays
,
oad
,
Boolean
.
FALSE
);
inProgressVO
=
inProgressCalculate
(
orderPageVO
,
vehicleItemDTO
,
orderPageVO
.
getOrderRentVehicleDetail
(),
useDays
,
oad
,
Boolean
.
FALSE
);
...
@@ -424,6 +432,11 @@ public class OrderCalculateBiz {
...
@@ -424,6 +432,11 @@ public class OrderCalculateBiz {
,
DictionaryKey
.
APP_ORDER
+
"_"
+
key
,
DictionaryKey
.
APP_ORDER
+
"_"
+
key
,
refundDescBuilder
);
,
refundDescBuilder
);
if
(!
overCancelBuffer
)
{
deductionAmount
=
BigDecimal
.
ZERO
;
refundDescBuilder
=
new
StringBuilder
(
""
);
}
topAmount
=
vehicleItemDTO
.
getTopAmount
(
0
);
topAmount
=
vehicleItemDTO
.
getTopAmount
(
0
);
totalDeductAmount
=
(
topAmount
.
compareTo
(
deductionAmount
)
<
0
)
?
topAmount:
deductionAmount
;
totalDeductAmount
=
(
topAmount
.
compareTo
(
deductionAmount
)
<
0
)
?
topAmount:
deductionAmount
;
totalRefundAmount
=
orderPageVO
.
getRealAmount
().
subtract
(
totalDeductAmount
);
totalRefundAmount
=
orderPageVO
.
getRealAmount
().
subtract
(
totalDeductAmount
);
...
@@ -456,6 +469,11 @@ public class OrderCalculateBiz {
...
@@ -456,6 +469,11 @@ public class OrderCalculateBiz {
,
DictionaryKey
.
APP_ORDER
+
"_"
+
key
,
DictionaryKey
.
APP_ORDER
+
"_"
+
key
,
refundDescBuilder
);
,
refundDescBuilder
);
if
(!
overCancelBuffer
)
{
deductionAmount
=
BigDecimal
.
ZERO
;
refundDescBuilder
=
new
StringBuilder
(
""
);
}
topAmount
=
adultItemAmount
.
add
(
childItemAmount
);
topAmount
=
adultItemAmount
.
add
(
childItemAmount
);
totalDeductAmount
=
deductionAmount
;
totalDeductAmount
=
deductionAmount
;
totalRefundAmount
=
orderPageVO
.
getRealAmount
().
subtract
(
deductionAmount
);
totalRefundAmount
=
orderPageVO
.
getRealAmount
().
subtract
(
deductionAmount
);
...
...
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