Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
98723261
提交
98723261
authored
6月 27, 2024
作者:
胡宁宁
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'v17.5_order_child_sync_broker_20240617' into dev
上级
80b73e6b
f32318ad
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
45 行增加
和
16 行删除
+45
-16
PayPlatformFeeParam.java
...clx/performance/param/pc/payment/PayPlatformFeeParam.java
+4
-0
TempSettlementController.java
...performance/controller/temp/TempSettlementController.java
+15
-0
OrderChildSyncTransportListener.java
...performance/listener/OrderChildSyncTransportListener.java
+1
-0
OrderChildPoundAuditServiceImpl.java
...ormance/service/impl/OrderChildPoundAuditServiceImpl.java
+7
-3
OrderChildServiceImpl.java
...m/clx/performance/service/impl/OrderChildServiceImpl.java
+7
-6
PaymentServiceImpl.java
.../com/clx/performance/service/impl/PaymentServiceImpl.java
+7
-1
NetworkDriverAccountServiceImpl.java
.../service/impl/settle/NetworkDriverAccountServiceImpl.java
+3
-6
SettlementMqHandlerServiceImpl.java
...e/service/impl/settle/SettlementMqHandlerServiceImpl.java
+1
-0
没有找到文件。
performance-api/src/main/java/com/clx/performance/param/pc/payment/PayPlatformFeeParam.java
浏览文件 @
98723261
...
...
@@ -20,6 +20,10 @@ public class PayPlatformFeeParam {
@ApiModelProperty
(
value
=
"金额"
,
example
=
"2356"
,
dataType
=
"int"
)
Integer
figure
;
@ApiModelProperty
(
value
=
"最新冻结金额金额"
,
example
=
"2356"
,
dataType
=
"int"
)
Integer
figureNew
;
@NotBlank
(
message
=
"交易单号不能为空"
)
@ApiModelProperty
(
value
=
"交易单号"
,
example
=
"2356"
,
dataType
=
"String"
)
String
tradeNo
;
...
...
performance-web/src/main/java/com/clx/performance/controller/temp/TempSettlementController.java
浏览文件 @
98723261
...
...
@@ -3,7 +3,9 @@ package com.clx.performance.controller.temp;
import
com.clx.performance.dao.OrderChildDao
;
import
com.clx.performance.listener.OrderChildSyncTransportListener
;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.service.settle.SettlementMqHandlerService
;
import
com.clx.performance.service.settle.SettlementMqService
;
import
com.clx.performance.vo.mq.SettlementStatisticsMqParam
;
import
com.msl.common.result.Result
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -29,7 +31,20 @@ public class TempSettlementController {
private
SettlementMqService
settlementMqService
;
@Autowired
private
OrderChildSyncTransportListener
orderChildSyncTransportListener
;
@Autowired
private
SettlementMqHandlerService
settlementMqHandlerService
;
@ApiOperation
(
value
=
"settlementStatistics"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"/settlementStatistics"
,
method
=
RequestMethod
.
GET
)
public
Result
settlementStatistics
(
String
childNo
)
{
SettlementStatisticsMqParam
mq
=
new
SettlementStatisticsMqParam
();
mq
.
setChildNo
(
childNo
);
mq
.
setInvoiceType
(
1
);
settlementMqHandlerService
.
settlementStatistics
(
mq
);
return
Result
.
ok
();
}
@ApiOperation
(
value
=
"运单同步broker"
,
notes
=
"<br>By:艾庆国"
)
@RequestMapping
(
value
=
"/orderChildSync"
,
method
=
RequestMethod
.
GET
)
...
...
performance-web/src/main/java/com/clx/performance/listener/OrderChildSyncTransportListener.java
浏览文件 @
98723261
...
...
@@ -169,6 +169,7 @@ public class OrderChildSyncTransportListener {
&&
Objects
.
equals
(
orderGoods
.
getSettlementWay
(),
SettlementWayEnum
.
WayType
.
UNLOAD_LOSS
.
getCode
()))
{
settlementOwnerDetail
.
setPrepayFreight
(
BigDecimal
.
ZERO
);
settlementDriverDetail
.
setPrepayFreightFlag
(
SettlementDriverEnum
.
PrepayFreightFlag
.
NO_PAY
.
getCode
());
settlementOwnerDetail
.
setFinalPaymentStatus
(
SettlementOwnerDetailEnum
.
FinalPaymentStatus
.
NO_REQUIRE
.
getCode
());
}
else
if
(
Objects
.
equals
(
invoiceType
,
SettlementOwnerEnum
.
InvoiceType
.
ONLINE
.
getCode
()))
{
...
...
performance-web/src/main/java/com/clx/performance/service/impl/OrderChildPoundAuditServiceImpl.java
浏览文件 @
98723261
...
...
@@ -156,7 +156,7 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
orderChild
.
getChildNo
(),
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
orderChild
.
getChildNo
(),
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
//保存运单日志数据
orderChildLogService
.
saveOrderChildLog
(
param
.
getChildNo
(),
type
,
OrderChildLogEnum
.
Type
.
getByCode
(
type
).
isPresent
()
?
OrderChildLogEnum
.
Type
.
getByCode
(
type
).
get
().
getMsg
()
:
""
,
...
...
@@ -167,11 +167,12 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
/***
* 平衡司机冻结保证金
*/
public
void
paymentChangePlatformFee
(
String
childNo
,
BigDecimal
changeDeposite
){
public
void
paymentChangePlatformFee
(
String
childNo
,
BigDecimal
changeDeposite
,
BigDecimal
figureNew
){
if
(
changeDeposite
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
PayPlatformFeeParam
payPlatformFeeParam
=
new
PayPlatformFeeParam
();
payPlatformFeeParam
.
setTradeNo
(
childNo
);
payPlatformFeeParam
.
setFigure
(
changeDeposite
.
intValue
());
payPlatformFeeParam
.
setFigureNew
(
figureNew
.
intValue
());
//冻结司机押金
paymentService
.
paymentChangePlatformFee
(
payPlatformFeeParam
);
}
...
...
@@ -226,6 +227,9 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
//本次调整金额
BigDecimal
platformServiceFeeNew
=
BigDecimal
.
ZERO
;
log
.
info
(
"运单号 {} ,原始冻结金额 {} "
,
orderChild
.
getChildNo
(),
platformServiceFee
);
if
(
freight
.
compareTo
(
BigDecimal
.
ZERO
)<=
0
){
return
PaymentDTO
.
builder
().
changeDeposit
(
platformServiceFee
.
multiply
(
new
BigDecimal
(
"-1"
))).
platformServiceFeeNew
(
platformServiceFeeNew
).
build
();
}
/**
* 如果之前未冻结保证金,本次不调整
* 如果 平台服务费率 为0 本次不处理
...
...
@@ -240,7 +244,7 @@ public class OrderChildPoundAuditServiceImpl implements OrderChildPoundAuditSer
{
platformServiceFeeNew
=
freight
//平台服务费率 * 100
.
multiply
(
platformServiceFeeRate
).
movePointLeft
(
2
).
setScale
(
2
,
RoundingMode
.
HALF_UP
);
.
multiply
(
platformServiceFeeRate
).
movePointLeft
(
2
).
setScale
(
0
,
RoundingMode
.
HALF_UP
);
changeDeposit
=
platformServiceFeeNew
.
subtract
(
platformServiceFee
);
log
.
info
(
"运单号 {} ,原始冻结金额 {} ,最新冻结金额 {},运费差 {} 运费价格{},费率 {}"
,
orderChild
.
getChildNo
(),
platformServiceFee
,
platformServiceFeeNew
,
changeDeposit
,
freightPrice
,
platformServiceFeeRate
...
...
performance-web/src/main/java/com/clx/performance/service/impl/OrderChildServiceImpl.java
浏览文件 @
98723261
...
...
@@ -808,7 +808,7 @@ public class OrderChildServiceImpl implements OrderChildService {
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
}
else
{
//计算司机保证金
...
...
@@ -826,7 +826,7 @@ public class OrderChildServiceImpl implements OrderChildService {
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
}
}
...
...
@@ -1007,7 +1007,7 @@ public class OrderChildServiceImpl implements OrderChildService {
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
}
else
{
//计算司机保证金
...
...
@@ -1028,7 +1028,7 @@ public class OrderChildServiceImpl implements OrderChildService {
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
}
}
...
...
@@ -1036,11 +1036,12 @@ public class OrderChildServiceImpl implements OrderChildService {
/***
* 平衡司机冻结保证金
*/
public
void
paymentChangePlatformFee
(
String
childNo
,
BigDecimal
changeDeposite
){
public
void
paymentChangePlatformFee
(
String
childNo
,
BigDecimal
changeDeposite
,
BigDecimal
deposite
){
if
(
changeDeposite
.
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
PayPlatformFeeParam
payPlatformFeeParam
=
new
PayPlatformFeeParam
();
payPlatformFeeParam
.
setTradeNo
(
childNo
);
payPlatformFeeParam
.
setFigure
(
changeDeposite
.
intValue
());
payPlatformFeeParam
.
setFigureNew
(
deposite
.
intValue
());
//冻结司机押金
paymentService
.
paymentChangePlatformFee
(
payPlatformFeeParam
);
}
...
...
@@ -1288,7 +1289,7 @@ public class OrderChildServiceImpl implements OrderChildService {
//判断是否平衡冻结金额
if
(
Objects
.
nonNull
(
paymentDTO
.
getChangeDeposit
())
&&
paymentDTO
.
getChangeDeposit
().
compareTo
(
BigDecimal
.
ZERO
)
!=
0
){
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
());
paymentChangePlatformFee
(
childNo
,
paymentDTO
.
getChangeDeposit
()
,
paymentDTO
.
getPlatformServiceFeeNew
()
);
}
}
...
...
performance-web/src/main/java/com/clx/performance/service/impl/PaymentServiceImpl.java
浏览文件 @
98723261
...
...
@@ -43,6 +43,7 @@ import java.security.GeneralSecurityException;
import
java.time.LocalDateTime
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Objects
;
import
java.util.UUID
;
import
java.util.stream.Collectors
;
...
...
@@ -253,7 +254,12 @@ public class PaymentServiceImpl implements PaymentService {
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
);
}
if
(
notify
.
getCode
()
!=
0
)
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
notify
.
getMsg
());
if
(
Objects
.
equals
(
notify
.
getCode
(),
""
)){
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
"预估接单保证金"
+
new
BigDecimal
(
param
.
getFigureNew
()).
movePointLeft
(
2
)+
"元,车主钱包余额不足,请先充值"
);
}
else
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
HTTP_ERROR
,
notify
.
getMsg
());
}
}
return
notify
;
}
...
...
performance-web/src/main/java/com/clx/performance/service/impl/settle/NetworkDriverAccountServiceImpl.java
浏览文件 @
98723261
...
...
@@ -21,6 +21,7 @@ import lombok.extern.slf4j.Slf4j;
import
org.springframework.stereotype.Service
;
import
java.math.BigDecimal
;
import
java.math.RoundingMode
;
import
java.time.LocalDateTime
;
/**
...
...
@@ -69,15 +70,11 @@ public class NetworkDriverAccountServiceImpl implements NetworkDriverAccountServ
UserSessionData
loginUserInfo
=
TokenUtil
.
getLoginUserInfo
();
Result
<
WalletResidueCardVO
>
result
=
paymentServiceFeign
.
getWallet
(
userCode
);
log
.
info
(
"WalletResidueCardVO:result:{}"
,
JSONUtil
.
parse
(
result
));
WalletResidueCardVO
data
=
result
.
getData
();
NetworkDriverAccount
account
=
networkDriverAccountDao
.
getOneByField
(
NetworkDriverAccount:
:
getDriverUserNo
,
loginUserInfo
.
getUserNo
()).
get
();
log
.
info
(
"WalletResidueCardVO:{}"
,
JSONUtil
.
parse
(
data
));
log
.
info
(
"NetworkDriverAccount:{}"
,
JSONUtil
.
parse
(
account
));
data
.
setAssetSum
(
data
.
getAssetSum
().
add
(
account
.
getAccountBalance
().
movePointLeft
(
2
)));
data
.
setFrozen
(
data
.
getFrozen
().
add
(
account
.
getFrozenBalance
()));
data
.
setResidue
(
data
.
getResidue
().
add
(
account
.
getUsableBalance
()));
log
.
info
(
"WalletResidueCardVO222:{}"
,
JSONUtil
.
parse
(
data
));
data
.
setFrozen
(
data
.
getFrozen
().
add
(
account
.
getFrozenBalance
()).
setScale
(
2
,
RoundingMode
.
UP
));
data
.
setResidue
(
data
.
getResidue
().
add
(
account
.
getUsableBalance
()).
setScale
(
2
,
RoundingMode
.
UP
));
return
data
;
}
}
performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementMqHandlerServiceImpl.java
浏览文件 @
98723261
...
...
@@ -212,6 +212,7 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
if
(
Objects
.
equals
(
orderGoods
.
getPlatformFreightQuotationTaxType
(),
QuotationEnum
.
PlatformFreightQuotationTaxType
.
NO
.
getCode
())
&&
Objects
.
equals
(
orderGoods
.
getSettlementWay
(),
SettlementWayEnum
.
WayType
.
UNLOAD_LOSS
.
getCode
()))
{
settlementDriverDetail
.
setSettlementNo
(
settlementNo
);
//插入同步网络货运待支付记录
childSyncTransportRecordService
.
addOrderChildSyncTransportRecord
(
settlementDriverDetail
);
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论