记得上下班打卡 | 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
074c2c2d
Commit
074c2c2d
authored
Jan 05, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
canRefundPriceExpress
parent
520e3db1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
19 deletions
+20
-19
KylinOrderTicketPreVo.java
...t/service/kylin/dto/vo/returns/KylinOrderTicketPreVo.java
+3
-0
KylinOrderTicketsRefundServiceImpl.java
...ylin/service/impl/KylinOrderTicketsRefundServiceImpl.java
+17
-19
No files found.
liquidnet-bus-api/liquidnet-service-kylin-api/src/main/java/com/liquidnet/service/kylin/dto/vo/returns/KylinOrderTicketPreVo.java
View file @
074c2c2d
...
@@ -104,6 +104,9 @@ public class KylinOrderTicketPreVo implements Serializable, Cloneable {
...
@@ -104,6 +104,9 @@ public class KylinOrderTicketPreVo implements Serializable, Cloneable {
@ApiModelProperty
(
value
=
"快递状态"
)
@ApiModelProperty
(
value
=
"快递状态"
)
private
Integer
expressStatus
;
private
Integer
expressStatus
;
@ApiModelProperty
(
value
=
"可退的快递费金额"
)
private
BigDecimal
canRefundPriceExpress
;
private
static
final
KylinOrderTicketPreVo
obj
=
new
KylinOrderTicketPreVo
();
private
static
final
KylinOrderTicketPreVo
obj
=
new
KylinOrderTicketPreVo
();
public
static
KylinOrderTicketPreVo
getNew
()
{
public
static
KylinOrderTicketPreVo
getNew
()
{
...
...
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/KylinOrderTicketsRefundServiceImpl.java
View file @
074c2c2d
...
@@ -87,22 +87,6 @@ public class KylinOrderTicketsRefundServiceImpl {
...
@@ -87,22 +87,6 @@ public class KylinOrderTicketsRefundServiceImpl {
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20003"
));
return
ResponseDto
.
failure
(
ErrorMapping
.
get
(
"20003"
));
}
}
}
}
// 可退快递费
// 快递费 判断是否是最后一张入场人票 减去已经退的快递费
BigDecimal
canRefundPriceExpress
=
BigDecimal
.
valueOf
(
0
);
// 正在和已经退的快递票金额 正在和已经退的票数量
Integer
refundNum
=
0
;
BigDecimal
priceExpressOld
=
BigDecimal
.
valueOf
(
0
);
for
(
KylinOrderRefundsVo
refundVo
:
kylinOrderRefundsVoBaseList
)
{
int
status
=
refundVo
.
getStatus
();
if
(
status
!=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
&&
status
!=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
)
{
//退款流程未完成和已完成的
refundNum
++;
priceExpressOld
=
priceExpressOld
.
add
(
refundVo
.
getPriceExpress
());
}
}
if
(
refundNum
+
1
==
orderTicketVo
.
getNumber
())
{
canRefundPriceExpress
=
orderTicketVo
.
getPriceExpress
().
subtract
(
priceExpressOld
);
}
// 入场人 数据脱敏/退款
// 入场人 数据脱敏/退款
List
<
KylinOrderTicketEntitiesVo
>
kylinOrderTicketEntitiesVoList
=
orderTicketVo
.
getEntitiesVoList
();
List
<
KylinOrderTicketEntitiesVo
>
kylinOrderTicketEntitiesVoList
=
orderTicketVo
.
getEntitiesVoList
();
List
<
KylinOrderTicketEntitiesPreRefundVo
>
kylinOrderTicketEntitiesPreRefundVos
=
ObjectUtil
.
getKylinOrderTicketEntitiesPreRefundVoArrayList
();
List
<
KylinOrderTicketEntitiesPreRefundVo
>
kylinOrderTicketEntitiesPreRefundVos
=
ObjectUtil
.
getKylinOrderTicketEntitiesPreRefundVoArrayList
();
...
@@ -120,9 +104,6 @@ public class KylinOrderTicketsRefundServiceImpl {
...
@@ -120,9 +104,6 @@ public class KylinOrderTicketsRefundServiceImpl {
BigDecimal
chargesRatio
=
getChargesRatio
(
orderTicketVo
.
getUseStart
(),
performanceVo
.
getIsRefundPoundage
());
BigDecimal
chargesRatio
=
getChargesRatio
(
orderTicketVo
.
getUseStart
(),
performanceVo
.
getIsRefundPoundage
());
BigDecimal
chargesPrice
=
item
.
getPriceCanRefund
().
multiply
(
chargesRatio
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
BigDecimal
chargesPrice
=
item
.
getPriceCanRefund
().
multiply
(
chargesRatio
).
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
);
item
.
setPriceCanRefund
(
item
.
getPriceCanRefund
().
subtract
(
chargesPrice
));
item
.
setPriceCanRefund
(
item
.
getPriceCanRefund
().
subtract
(
chargesPrice
));
if
(
item
.
getPriceCanRefund
().
compareTo
(
BigDecimal
.
ZERO
)
==
1
)
{
item
.
setPriceCanRefund
(
item
.
getPriceCanRefund
().
add
(
canRefundPriceExpress
));
}
item
.
setChargesRatio
(
chargesRatio
);
item
.
setChargesRatio
(
chargesRatio
);
item
.
setChargesPrice
(
chargesPrice
);
item
.
setChargesPrice
(
chargesPrice
);
...
@@ -144,6 +125,22 @@ public class KylinOrderTicketsRefundServiceImpl {
...
@@ -144,6 +125,22 @@ public class KylinOrderTicketsRefundServiceImpl {
// 快递状态
// 快递状态
Integer
orderExpressStatus
=
dataUtils
.
getOrderExpressInfo
(
orderTicketVo
.
getOrderTicketsId
());
Integer
orderExpressStatus
=
dataUtils
.
getOrderExpressInfo
(
orderTicketVo
.
getOrderTicketsId
());
vo
.
setExpressStatus
(
orderExpressStatus
);
vo
.
setExpressStatus
(
orderExpressStatus
);
// 可退快递费
// 快递费 判断是否是最后一张入场人票 减去已经退的快递费
BigDecimal
canRefundPriceExpress
=
BigDecimal
.
valueOf
(
0
);
// 正在和已经退的快递票金额 正在和已经退的票数量
Integer
refundNum
=
0
;
BigDecimal
priceExpressOld
=
BigDecimal
.
valueOf
(
0
);
for
(
KylinOrderRefundsVo
refundVo
:
kylinOrderRefundsVoBaseList
)
{
int
status
=
refundVo
.
getStatus
();
if
(
status
!=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_CANCEL
&&
status
!=
KylinTableStatusConst
.
ORDER_REFUND_STATUS_REJECT
)
{
//退款流程未完成和已完成的
refundNum
++;
priceExpressOld
=
priceExpressOld
.
add
(
refundVo
.
getPriceExpress
());
}
}
if
(
refundNum
+
1
==
orderTicketVo
.
getNumber
())
{
canRefundPriceExpress
=
orderTicketVo
.
getPriceExpress
().
subtract
(
priceExpressOld
);
}
// 整理返回数据
// 整理返回数据
BeanUtils
.
copyProperties
(
orderTicketVo
,
vo
);
BeanUtils
.
copyProperties
(
orderTicketVo
,
vo
);
vo
.
setIsRefundPoundage
(
performanceVo
.
getIsRefundPoundage
());
vo
.
setIsRefundPoundage
(
performanceVo
.
getIsRefundPoundage
());
...
@@ -155,6 +152,7 @@ public class KylinOrderTicketsRefundServiceImpl {
...
@@ -155,6 +152,7 @@ public class KylinOrderTicketsRefundServiceImpl {
vo
.
setIsTrueName
(
performanceVo
.
getIsTrueName
());
vo
.
setIsTrueName
(
performanceVo
.
getIsTrueName
());
vo
.
setIsRefundExpress
(
performanceVo
.
getIsRefundExpress
());
vo
.
setIsRefundExpress
(
performanceVo
.
getIsRefundExpress
());
vo
.
setEntitiesPreRefundVos
(
kylinOrderTicketEntitiesPreRefundVos
);
vo
.
setEntitiesPreRefundVos
(
kylinOrderTicketEntitiesPreRefundVos
);
vo
.
setCanRefundPriceExpress
(
canRefundPriceExpress
);
return
ResponseDto
.
success
(
vo
);
return
ResponseDto
.
success
(
vo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"toOrderRefundDetailsException"
,
e
);
log
.
error
(
"toOrderRefundDetailsException"
,
e
);
...
...
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