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
e75bb400
Commit
e75bb400
authored
Oct 24, 2019
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改使用免费天数bug
parent
3cb98b39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
+8
-3
VehicleItemDTO.java
...va/com/xxfc/platform/order/pojo/order/VehicleItemDTO.java
+8
-3
No files found.
xx-order/xx-order-api/src/main/java/com/xxfc/platform/order/pojo/order/VehicleItemDTO.java
View file @
e75bb400
...
@@ -19,13 +19,18 @@ import java.util.List;
...
@@ -19,13 +19,18 @@ import java.util.List;
public
class
VehicleItemDTO
extends
OrderItem
{
public
class
VehicleItemDTO
extends
OrderItem
{
public
static
final
int
topNum
=
2
;
public
static
final
int
topNum
=
2
;
public
BigDecimal
calculateVehicleUnitPrice
(
BigDecimal
vehicleAmount
,
BigDecimal
metaVehicleAmount
,
Boolean
isSetRealAmount
)
{
public
BigDecimal
calculateVehicleUnitPrice
(
BigDecimal
vehicleAmount
,
BigDecimal
metaVehicleAmount
,
Boolean
isSetRealAmount
)
{
BigDecimal
unitPrice
=
vehicleAmount
.
divide
(
new
BigDecimal
(
getCalculateNum
()+
""
),
2
,
RoundingMode
.
HALF_UP
);
BigDecimal
metaUnitPrice
=
metaVehicleAmount
.
divide
(
new
BigDecimal
(
getCalculateNum
()+
""
),
2
,
RoundingMode
.
HALF_UP
);
if
(
isSetRealAmount
)
{
if
(
isSetRealAmount
)
{
setRealAmount
(
vehicleAmount
);
setRealAmount
(
vehicleAmount
);
}
}
BigDecimal
unitPrice
=
BigDecimal
.
ZERO
;
BigDecimal
metaUnitPrice
=
BigDecimal
.
ZERO
;
if
(
getCalculateNum
()
>
0
)
{
unitPrice
=
vehicleAmount
.
divide
(
new
BigDecimal
(
getCalculateNum
()+
""
),
2
,
RoundingMode
.
HALF_UP
);
metaUnitPrice
=
metaVehicleAmount
.
divide
(
new
BigDecimal
(
getCalculateNum
()+
""
),
2
,
RoundingMode
.
HALF_UP
);
}
setUnitPrice
(
unitPrice
);
setUnitPrice
(
unitPrice
);
setMetaUnitPrice
(
metaUnitPrice
);
setMetaUnitPrice
(
metaUnitPrice
);
...
...
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