Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
aa584296
提交
aa584296
authored
12月 12, 2023
作者:
huyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加解冻释放保证金处理
上级
54dc3aa5
隐藏空白字符变更
内嵌
并排
正在显示
6 个修改的文件
包含
62 行增加
和
37 行删除
+62
-37
ThirdComponent.java
...in/java/com/clx/performance/component/ThirdComponent.java
+7
-2
TransportSyncController.java
...ance/controller/pc/transport/TransportSyncController.java
+2
-1
SettlementDriverDetailDaoImpl.java
...rmance/dao/impl/settle/SettlementDriverDetailDaoImpl.java
+1
-0
OrderCancelServiceImpl.java
.../clx/performance/service/impl/OrderCancelServiceImpl.java
+21
-6
SettlementMqHandlerServiceImpl.java
...e/service/impl/settle/SettlementMqHandlerServiceImpl.java
+3
-1
SettlementServiceImpl.java
...erformance/service/impl/settle/SettlementServiceImpl.java
+28
-27
没有找到文件。
performance-web/src/main/java/com/clx/performance/component/ThirdComponent.java
浏览文件 @
aa584296
...
@@ -18,9 +18,14 @@ public class ThirdComponent {
...
@@ -18,9 +18,14 @@ public class ThirdComponent {
public
static
final
String
TRANSPORT_KEY
=
"9Y1N5AUP8N2TI359"
;
public
static
final
String
TRANSPORT_KEY
=
"9Y1N5AUP8N2TI359"
;
public
static
String
encrypt
(
String
param
)
throws
Exception
{
public
static
String
encrypt
(
String
param
){
HttpDTO
httpDTO
=
EncryptUtil
.
buildDTO
(
TRANSPORT_USER
,
param
,
TRANSPORT_KEY
,
System
.
currentTimeMillis
());
HttpDTO
httpDTO
=
null
;
try
{
httpDTO
=
EncryptUtil
.
buildDTO
(
TRANSPORT_USER
,
param
,
TRANSPORT_KEY
,
System
.
currentTimeMillis
());
}
catch
(
GeneralSecurityException
e
)
{
throw
new
RuntimeException
(
e
);
}
return
JSONUtil
.
parse
(
httpDTO
).
toString
();
return
JSONUtil
.
parse
(
httpDTO
).
toString
();
}
}
...
...
performance-web/src/main/java/com/clx/performance/controller/pc/transport/TransportSyncController.java
浏览文件 @
aa584296
...
@@ -60,7 +60,8 @@ public class TransportSyncController {
...
@@ -60,7 +60,8 @@ public class TransportSyncController {
log
.
info
(
"payStatusNotify 原始报文:{}"
,
JSONUtil
.
parse
(
param
));
log
.
info
(
"payStatusNotify 原始报文:{}"
,
JSONUtil
.
parse
(
param
));
String
decrypt
=
ThirdComponent
.
decrypt
(
param
.
getChildNo
());
String
decrypt
=
ThirdComponent
.
decrypt
(
param
.
getChildNo
());
log
.
info
(
"payStatusNotify 解密后:{}"
,
decrypt
);
log
.
info
(
"payStatusNotify 解密后:{}"
,
decrypt
);
return
Result
.
ok
(
decrypt
);
return
Result
.
ok
(
ThirdComponent
.
encrypt
(
"success"
));
}
}
...
...
performance-web/src/main/java/com/clx/performance/dao/impl/settle/SettlementDriverDetailDaoImpl.java
浏览文件 @
aa584296
...
@@ -27,6 +27,7 @@ public class SettlementDriverDetailDaoImpl extends BaseDaoImpl<SettlementDriverD
...
@@ -27,6 +27,7 @@ public class SettlementDriverDetailDaoImpl extends BaseDaoImpl<SettlementDriverD
return
update
(
lUdWrapper
()
return
update
(
lUdWrapper
()
.
eq
(
SettlementDriverDetail:
:
getId
,
item
.
getId
())
.
eq
(
SettlementDriverDetail:
:
getId
,
item
.
getId
())
.
set
(
SettlementDriverDetail:
:
getInvoiceType
,
item
.
getInvoiceType
())
.
set
(
SettlementDriverDetail:
:
getInvoiceType
,
item
.
getInvoiceType
())
.
set
(
SettlementDriverDetail:
:
getPrepayFreight
,
item
.
getPrepayFreight
())
.
set
(
SettlementDriverDetail:
:
getPrepayFreightFlag
,
item
.
getPrepayFreightFlag
())
.
set
(
SettlementDriverDetail:
:
getPrepayFreightFlag
,
item
.
getPrepayFreightFlag
())
);
);
}
}
...
...
performance-web/src/main/java/com/clx/performance/service/impl/OrderCancelServiceImpl.java
浏览文件 @
aa584296
...
@@ -13,6 +13,7 @@ import com.clx.performance.component.OrderCancelComponent;
...
@@ -13,6 +13,7 @@ import com.clx.performance.component.OrderCancelComponent;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.dao.OrderChildDao
;
import
com.clx.performance.dao.OrderChildDao
;
import
com.clx.performance.dao.OrderGoodsDao
;
import
com.clx.performance.dao.OrderGoodsDao
;
import
com.clx.performance.dao.settle.SettlementOwnerDetailDao
;
import
com.clx.performance.enums.*
;
import
com.clx.performance.enums.*
;
import
com.clx.performance.extranal.user.DriverService
;
import
com.clx.performance.extranal.user.DriverService
;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.model.OrderChild
;
...
@@ -76,6 +77,8 @@ public class OrderCancelServiceImpl implements OrderCancelService {
...
@@ -76,6 +77,8 @@ public class OrderCancelServiceImpl implements OrderCancelService {
private
final
OrderChildPostService
orderChildPostService
;
private
final
OrderChildPostService
orderChildPostService
;
private
final
SettlementOwnerDetailDao
settlementOwnerDetailDao
;
@Override
@Override
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
...
@@ -178,13 +181,16 @@ public class OrderCancelServiceImpl implements OrderCancelService {
...
@@ -178,13 +181,16 @@ public class OrderCancelServiceImpl implements OrderCancelService {
}
}
//TODO 注意判断普通单还是网运单 普通单类型 1 网运单 2
//TODO 注意判断普通单还是网运单 普通单类型 1 网运单 2
Integer
invoiceType
=
settlementOwnerDetailDao
.
getInvoiceType
(
orderNo
);
ThawAccountParam
thawAccountParam
=
new
ThawAccountParam
();
ThawAccountParam
thawAccountParam
=
new
ThawAccountParam
();
if
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
ORDINARY
.
getCode
().
equals
(
invoiceType
))
{
thawAccountParam
.
setOrderType
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
ORDINARY
.
getCode
());
}
else
{
thawAccountParam
.
setOrderType
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
NETWORK
.
getCode
());
}
thawAccountParam
.
setOrderNo
(
orderNo
);
thawAccountParam
.
setOrderNo
(
orderNo
);
thawAccountParam
.
setOrderType
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
ORDINARY
.
getCode
());
log
.
info
(
"执行解冻账户,参数:{}"
,
JSONUtil
.
parse
(
thawAccountParam
));
log
.
info
(
"执行解冻账户,参数:{}"
,
JSONUtil
.
parse
(
thawAccountParam
));
ownerAccountService
.
ownerAccountThaw
(
thawAccountParam
);
ownerAccountService
.
ownerAccountThaw
(
thawAccountParam
);
Result
<
Object
>
result
=
orderFeign
.
updateOrderStatusByOrderNo
(
orderNo
,
orderStatusCode
);
Result
<
Object
>
result
=
orderFeign
.
updateOrderStatusByOrderNo
(
orderNo
,
orderStatusCode
);
if
(!
result
.
succeed
())
{
if
(!
result
.
succeed
())
{
throw
new
RuntimeException
(
"货主取消订单失败,原因:远程调用取消订单失败"
);
throw
new
RuntimeException
(
"货主取消订单失败,原因:远程调用取消订单失败"
);
...
@@ -337,10 +343,14 @@ public class OrderCancelServiceImpl implements OrderCancelService {
...
@@ -337,10 +343,14 @@ public class OrderCancelServiceImpl implements OrderCancelService {
orderFeign
.
orderCancelReason
(
orderCancelReasonParam
);
orderFeign
.
orderCancelReason
(
orderCancelReasonParam
);
//TODO 注意判断普通单还是网运单 普通单类型 1 网运单 2
//TODO 注意判断普通单还是网运单 普通单类型 1 网运单 2
Integer
invoiceType
=
settlementOwnerDetailDao
.
getInvoiceType
(
orderNo
);
ThawAccountParam
thawAccountParam
=
new
ThawAccountParam
();
ThawAccountParam
thawAccountParam
=
new
ThawAccountParam
();
if
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
ORDINARY
.
getCode
().
equals
(
invoiceType
))
{
thawAccountParam
.
setOrderType
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
ORDINARY
.
getCode
());
}
else
{
thawAccountParam
.
setOrderType
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
NETWORK
.
getCode
());
}
thawAccountParam
.
setOrderNo
(
orderNo
);
thawAccountParam
.
setOrderNo
(
orderNo
);
thawAccountParam
.
setOrderType
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
ORDINARY
.
getCode
());
log
.
info
(
"执行解冻账户,参数:{}"
,
JSONUtil
.
parse
(
thawAccountParam
));
log
.
info
(
"执行解冻账户,参数:{}"
,
JSONUtil
.
parse
(
thawAccountParam
));
ownerAccountService
.
ownerAccountThaw
(
thawAccountParam
);
ownerAccountService
.
ownerAccountThaw
(
thawAccountParam
);
...
@@ -471,9 +481,14 @@ public class OrderCancelServiceImpl implements OrderCancelService {
...
@@ -471,9 +481,14 @@ public class OrderCancelServiceImpl implements OrderCancelService {
orderFeign
.
orderCancelReason
(
orderCancelReasonParam
);
orderFeign
.
orderCancelReason
(
orderCancelReasonParam
);
//TODO 注意判断普通单还是网运单 普通单类型 1 网运单 2
//TODO 注意判断普通单还是网运单 普通单类型 1 网运单 2
Integer
invoiceType
=
settlementOwnerDetailDao
.
getInvoiceType
(
orderNo
);
ThawAccountParam
thawAccountParam
=
new
ThawAccountParam
();
ThawAccountParam
thawAccountParam
=
new
ThawAccountParam
();
if
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
ORDINARY
.
getCode
().
equals
(
invoiceType
))
{
thawAccountParam
.
setOrderType
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
ORDINARY
.
getCode
());
}
else
{
thawAccountParam
.
setOrderType
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
NETWORK
.
getCode
());
}
thawAccountParam
.
setOrderNo
(
orderNo
);
thawAccountParam
.
setOrderNo
(
orderNo
);
thawAccountParam
.
setOrderType
(
OwnerAccountEnum
.
OrderChildTypeStatus
.
ORDINARY
.
getCode
());
log
.
info
(
"执行解冻账户,参数:{}"
,
JSONUtil
.
parse
(
thawAccountParam
));
log
.
info
(
"执行解冻账户,参数:{}"
,
JSONUtil
.
parse
(
thawAccountParam
));
ownerAccountService
.
ownerAccountThaw
(
thawAccountParam
);
ownerAccountService
.
ownerAccountThaw
(
thawAccountParam
);
...
...
performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementMqHandlerServiceImpl.java
浏览文件 @
aa584296
...
@@ -181,7 +181,9 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
...
@@ -181,7 +181,9 @@ public class SettlementMqHandlerServiceImpl implements SettlementMqHandlerServic
settlementDriver
.
setPrepayFreightFlag
(
detail
.
getPrepayFreightFlag
());
settlementDriver
.
setPrepayFreightFlag
(
detail
.
getPrepayFreightFlag
());
settlementDriver
.
setSettlementFreight
(
detail
.
getSettlementFreight
());
settlementDriver
.
setSettlementFreight
(
detail
.
getSettlementFreight
());
settlementDriver
.
setInvoiceType
(
detail
.
getInvoiceType
());
settlementDriver
.
setInvoiceType
(
detail
.
getInvoiceType
());
settlementDriver
.
setSettlementPlatform
(
String
.
valueOf
(
SettlementPlatformEnum
.
Platform
.
MSL
.
getCode
()));
settlementDriver
.
setSettlementPlatform
(
detail
.
getInvoiceType
()
==
1
?
String
.
valueOf
(
SettlementPlatformEnum
.
Platform
.
WY
.
getCode
()):
String
.
valueOf
(
SettlementPlatformEnum
.
Platform
.
MSL
.
getCode
()));
if
(
settlementDriver
.
getInvoiceType
().
equals
(
SettlementOwnerEnum
.
InvoiceType
.
ONLINE
.
getCode
()))
{
if
(
settlementDriver
.
getInvoiceType
().
equals
(
SettlementOwnerEnum
.
InvoiceType
.
ONLINE
.
getCode
()))
{
settlementDriver
.
setStatus
(
SettlementDriverEnum
.
Status
.
SETTLED
.
getCode
());
settlementDriver
.
setStatus
(
SettlementDriverEnum
.
Status
.
SETTLED
.
getCode
());
}
else
{
}
else
{
...
...
performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementServiceImpl.java
浏览文件 @
aa584296
...
@@ -104,35 +104,36 @@ public class SettlementServiceImpl implements SettlementService {
...
@@ -104,35 +104,36 @@ public class SettlementServiceImpl implements SettlementService {
BigDecimal
subtract
=
frozen
.
subtract
(
takeOut
);
BigDecimal
subtract
=
frozen
.
subtract
(
takeOut
);
if
(
subtract
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
if
(
subtract
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
settlementOwnerDetail
.
setPrepayFreight
(
BigDecimal
.
ZERO
);
settlementOwnerDetail
.
setPrepayFreight
(
BigDecimal
.
ZERO
);
}
if
(
subtract
.
subtract
(
ans
).
compareTo
(
BigDecimal
.
ZERO
)
>=
0
)
{
OwnerAccount
account
=
ownerAccountDao
.
getAccountByOwnerUserNoAndAccountType
(
orderChild
.
getOwnerUserNo
(),
OwnerAccountEnum
.
AccountTypeStatus
.
PREPAID_FREIGHT_ACCOUNT
.
getCode
());
settlementOwnerDetail
.
setPrepayFreight
(
ans
);
//生成扣除流水
OwnerRunningWaterRecord
runningWaterRecord
=
new
OwnerRunningWaterRecord
();
runningWaterRecord
.
setOwnerUserName
(
orderChild
.
getOwnerName
());
runningWaterRecord
.
setMobile
(
orderChild
.
getDriverMobile
());
runningWaterRecord
.
setCreateBy
(
"系统"
);
runningWaterRecord
.
setOrderId
(
orderChild
.
getId
());
runningWaterRecord
.
setOrderNo
(
orderChild
.
getOrderNo
());
runningWaterRecord
.
setRelationId
(
null
);
runningWaterRecord
.
setAlterationBalance
(
ans
);
runningWaterRecord
.
setFrozenBalance
(
account
.
getFrozenBalance
().
subtract
(
ans
));
runningWaterRecord
.
setUsableBalance
(
account
.
getUsableBalance
());
runningWaterRecord
.
setTakeOutBalance
(
ans
);
runningWaterRecord
.
setAccountBalance
(
account
.
getAccountBalance
().
subtract
(
ans
));
runningWaterRecord
.
setOwnerUserNo
(
account
.
getOwnerUserNo
());
runningWaterRecord
.
setAccountType
(
OwnerAccountEnum
.
AccountTypeStatus
.
PREPAID_FREIGHT_ACCOUNT
.
getCode
());
runningWaterRecord
.
setRunningWaterType
(
OwnerAccountEnum
.
RunningWaterStatus
.
TAKE_OUT
.
getCode
());
runningWaterRecord
.
setRunningWaterNo
(
idGenerateSnowFlake
.
nextId
(
IdTypeEnum
.
Type
.
TAKE_OUT
.
getCode
()));
ownerRunningWaterRecordDao
.
saveEntity
(
runningWaterRecord
);
}
else
{
}
else
{
settlementOwnerDetail
.
setPrepayFreight
(
BigDecimal
.
ZERO
);
if
(
subtract
.
subtract
(
ans
).
compareTo
(
BigDecimal
.
ZERO
)
>=
0
)
{
OwnerAccount
account
=
ownerAccountDao
.
getAccountByOwnerUserNoAndAccountType
(
orderChild
.
getOwnerUserNo
(),
OwnerAccountEnum
.
AccountTypeStatus
.
PREPAID_FREIGHT_ACCOUNT
.
getCode
());
settlementOwnerDetail
.
setPrepayFreight
(
ans
);
//生成扣除流水
OwnerRunningWaterRecord
runningWaterRecord
=
new
OwnerRunningWaterRecord
();
runningWaterRecord
.
setOwnerUserName
(
orderChild
.
getOwnerName
());
runningWaterRecord
.
setMobile
(
orderChild
.
getDriverMobile
());
runningWaterRecord
.
setCreateBy
(
"系统"
);
runningWaterRecord
.
setOrderId
(
orderChild
.
getId
());
runningWaterRecord
.
setOrderNo
(
orderChild
.
getOrderNo
());
runningWaterRecord
.
setRelationId
(
null
);
runningWaterRecord
.
setAlterationBalance
(
ans
);
runningWaterRecord
.
setFrozenBalance
(
account
.
getFrozenBalance
().
subtract
(
ans
));
runningWaterRecord
.
setUsableBalance
(
account
.
getUsableBalance
());
runningWaterRecord
.
setTakeOutBalance
(
ans
);
runningWaterRecord
.
setAccountBalance
(
account
.
getAccountBalance
().
subtract
(
ans
));
runningWaterRecord
.
setOwnerUserNo
(
account
.
getOwnerUserNo
());
runningWaterRecord
.
setAccountType
(
OwnerAccountEnum
.
AccountTypeStatus
.
PREPAID_FREIGHT_ACCOUNT
.
getCode
());
runningWaterRecord
.
setRunningWaterType
(
OwnerAccountEnum
.
RunningWaterStatus
.
TAKE_OUT
.
getCode
());
runningWaterRecord
.
setRunningWaterNo
(
idGenerateSnowFlake
.
nextId
(
IdTypeEnum
.
Type
.
TAKE_OUT
.
getCode
()));
ownerRunningWaterRecordDao
.
saveEntity
(
runningWaterRecord
);
}
else
{
settlementOwnerDetail
.
setPrepayFreight
(
BigDecimal
.
ZERO
);
}
}
}
}
else
{
}
else
{
settlementDriverDetail
.
setPrepayFreightFlag
(
0
);
settlementDriverDetail
.
setPrepayFreightFlag
(
0
);
invoiceType
=
SettlementOwnerEnum
.
InvoiceType
.
ORDINARY
.
getCode
();
invoiceType
=
SettlementOwnerEnum
.
InvoiceType
.
ORDINARY
.
getCode
();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论