记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
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
董敬伟
liquidnet-bus-v1
Commits
54a07a32
Commit
54a07a32
authored
Jul 07, 2021
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
精度
parent
75952f49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
KylinOrderRefundsServiceImpl.java
...gzai/kylin/service/impl/KylinOrderRefundsServiceImpl.java
+7
-7
No files found.
liquidnet-bus-client/liquidnet-client-admin/liquidnet-client-admin-zhengzai/src/main/java/com/liquidnet/client/admin/zhengzai/kylin/service/impl/KylinOrderRefundsServiceImpl.java
View file @
54a07a32
...
@@ -426,28 +426,28 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
...
@@ -426,28 +426,28 @@ public class KylinOrderRefundsServiceImpl extends ServiceImpl<KylinOrderRefundsM
List
<
KylinOrderTicketEntitiesDao
>
entitiesListTemp
=
kylinOrderTicketEntitiesMapper
.
getRefundEntitiesList
(
kylinOrderTickets
.
getOrderTicketsId
());
List
<
KylinOrderTicketEntitiesDao
>
entitiesListTemp
=
kylinOrderTicketEntitiesMapper
.
getRefundEntitiesList
(
kylinOrderTickets
.
getOrderTicketsId
());
List
<
KylinOrderTicketEntitiesDao
>
entitiesList
=
new
ArrayList
<>();
List
<
KylinOrderTicketEntitiesDao
>
entitiesList
=
new
ArrayList
<>();
if
(
entitiesListTemp
.
size
()
>
0
)
{
if
(
entitiesListTemp
.
size
()
>
0
)
{
double
priceActual
=
kylinOrderTickets
.
getPriceActual
().
doubleValue
();
BigDecimal
priceActual
=
kylinOrderTickets
.
getPriceActual
();
double
priceExpress
=
kylinOrderTickets
.
getPriceExpress
().
doubleValue
();
BigDecimal
priceExpress
=
kylinOrderTickets
.
getPriceExpress
();
int
allEntitiesCount
=
kylinOrderTicketEntitiesMapper
.
selectCount
(
// 总入场人数量 排出未付款的 用来计算单入场人的价格
int
allEntitiesCount
=
kylinOrderTicketEntitiesMapper
.
selectCount
(
// 总入场人数量 排出未付款的 用来计算单入场人的价格
new
QueryWrapper
<
KylinOrderTicketEntities
>()
new
QueryWrapper
<
KylinOrderTicketEntities
>()
.
eq
(
"order_id"
,
kylinOrderTickets
.
getOrderTicketsId
())
.
eq
(
"order_id"
,
kylinOrderTickets
.
getOrderTicketsId
())
.
ne
(
"is_payment"
,
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT0
)
.
ne
(
"is_payment"
,
KylinTableStatusConst
.
ENTITIES_IS_PAYMENT0
)
);
);
double
onePrice
=
(
priceActual
-
priceExpress
)
/
allEntitiesCount
;
//单价
BigDecimal
onePrice
=
(
priceActual
.
subtract
(
priceExpress
)).
divide
(
BigDecimal
.
valueOf
(
allEntitiesCount
))
;
//单价
for
(
KylinOrderTicketEntitiesDao
entities
:
entitiesListTemp
)
{
for
(
KylinOrderTicketEntitiesDao
entities
:
entitiesListTemp
)
{
Double
refundedPrice
=
kylinOrderTicketEntitiesMapper
.
getRefundEntitiesPrice
(
//已退 包含退款中
Double
refundedPrice
=
kylinOrderTicketEntitiesMapper
.
getRefundEntitiesPrice
(
//已退 包含退款中
kylinOrderTickets
.
getOrderTicketsId
(),
kylinOrderTickets
.
getOrderTicketsId
(),
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
,
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
,
entities
.
getOrderTicketEntitiesId
()
entities
.
getOrderTicketEntitiesId
()
);
);
double
canRefundedPrice
;
BigDecimal
canRefundedPrice
;
if
(
null
!=
refundedPrice
)
{
if
(
null
!=
refundedPrice
)
{
canRefundedPrice
=
onePrice
-
refundedPrice
;
canRefundedPrice
=
onePrice
.
subtract
(
BigDecimal
.
valueOf
(
refundedPrice
))
;
}
else
{
}
else
{
canRefundedPrice
=
onePrice
;
canRefundedPrice
=
onePrice
;
}
}
entities
.
setCanRefundedPrice
(
BigDecimal
.
valueOf
(
canRefundedPrice
)
);
entities
.
setCanRefundedPrice
(
canRefundedPrice
);
if
(
canRefundedPrice
>
0
)
{
// 退款中但是可退款金额为0不展示
if
(
canRefundedPrice
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
// 退款中但是可退款金额为0不展示
entitiesList
.
add
(
entities
);
entitiesList
.
add
(
entities
);
}
}
}
}
...
...
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