Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
467aa25d
提交
467aa25d
authored
2月 06, 2024
作者:
huyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
确认收货处理相关借款逻辑
上级
bb58b488
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
9 行增加
和
0 行删除
+9
-0
OrderChildLoanComponent.java
...om/clx/performance/component/OrderChildLoanComponent.java
+9
-0
没有找到文件。
performance-web/src/main/java/com/clx/performance/component/OrderChildLoanComponent.java
浏览文件 @
467aa25d
...
@@ -181,6 +181,7 @@ public class OrderChildLoanComponent {
...
@@ -181,6 +181,7 @@ public class OrderChildLoanComponent {
log
.
info
(
"4.查询当前运单号:{}, 当前货主,{}, 此运单借款冻结记录:{}"
,
childNo
,
settlementOwnerDetail
.
getOwnerUserNo
(),
JSONUtil
.
parse
(
runningWaterRecordList
));
log
.
info
(
"4.查询当前运单号:{}, 当前货主,{}, 此运单借款冻结记录:{}"
,
childNo
,
settlementOwnerDetail
.
getOwnerUserNo
(),
JSONUtil
.
parse
(
runningWaterRecordList
));
if
(
CollectionUtil
.
isEmpty
(
runningWaterRecordList
))
{
if
(
CollectionUtil
.
isEmpty
(
runningWaterRecordList
))
{
//说明当初没借款,预付运费够,但是真实结算后,预付运费不够,走此逻辑
//说明当初没借款,预付运费够,但是真实结算后,预付运费不够,走此逻辑
log
.
info
(
"4.1 说明当初没借款,预付运费够,但是真实结算后,预付运费不够,走此逻辑"
);
try
{
try
{
ownerLoanRecordService
.
getLoanBalance
(
settlementOwnerDetail
.
getSettlementFreight
(),
settlementDriverDetail
.
getDriverUserNo
(),
childNo
);
ownerLoanRecordService
.
getLoanBalance
(
settlementOwnerDetail
.
getSettlementFreight
(),
settlementDriverDetail
.
getDriverUserNo
(),
childNo
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
...
@@ -193,10 +194,14 @@ public class OrderChildLoanComponent {
...
@@ -193,10 +194,14 @@ public class OrderChildLoanComponent {
BigDecimal
alterationBalance
=
runningWaterRecordList
.
stream
().
map
(
OwnerLoanAccountRunningWaterRecord:
:
getAlterationBalance
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
alterationBalance
=
runningWaterRecordList
.
stream
().
map
(
OwnerLoanAccountRunningWaterRecord:
:
getAlterationBalance
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
if
(
alterationBalance
.
compareTo
(
settlementOwnerDetail
.
getSettlementFreight
())
==
0
)
{
if
(
alterationBalance
.
compareTo
(
settlementOwnerDetail
.
getSettlementFreight
())
==
0
)
{
log
.
info
(
"4.2 相等直接生成运单核销"
);
//相等直接生成运单核销
//相等直接生成运单核销
childWriteOffOwnerLoanAccount
(
runningWaterRecordList
);
childWriteOffOwnerLoanAccount
(
runningWaterRecordList
);
}
else
if
(
alterationBalance
.
compareTo
(
settlementOwnerDetail
.
getSettlementFreight
())
>
0
)
{
}
else
if
(
alterationBalance
.
compareTo
(
settlementOwnerDetail
.
getSettlementFreight
())
>
0
)
{
//大于,则生成核销后,释放冻结的借款
//大于,则生成核销后,释放冻结的借款
log
.
info
(
"4.3 大于,则生成核销后,释放冻结的借款"
);
BigDecimal
thawBigdecimal
=
settlementOwnerDetail
.
getSettlementFreight
().
subtract
(
alterationBalance
);
BigDecimal
thawBigdecimal
=
settlementOwnerDetail
.
getSettlementFreight
().
subtract
(
alterationBalance
);
OwnerLoanAccountRunningWaterRecord
entity
=
runningWaterRecordList
.
get
(
runningWaterRecordList
.
size
()
-
1
);
OwnerLoanAccountRunningWaterRecord
entity
=
runningWaterRecordList
.
get
(
runningWaterRecordList
.
size
()
-
1
);
Long
loanNo
=
entity
.
getLoanNo
();
Long
loanNo
=
entity
.
getLoanNo
();
...
@@ -207,6 +212,8 @@ public class OrderChildLoanComponent {
...
@@ -207,6 +212,8 @@ public class OrderChildLoanComponent {
//多余的金额需要生成解冻流水
//多余的金额需要生成解冻流水
thawOwnerLoanAccount
(
loanNo
,
loanType
,
entity
.
getOwnerUserNo
(),
entity
.
getOwnerUserName
(),
entity
.
getMobile
(),
entity
.
getChildNo
(),
thawBigdecimal
.
negate
());
thawOwnerLoanAccount
(
loanNo
,
loanType
,
entity
.
getOwnerUserNo
(),
entity
.
getOwnerUserName
(),
entity
.
getMobile
(),
entity
.
getChildNo
(),
thawBigdecimal
.
negate
());
}
else
{
}
else
{
log
.
info
(
"4.4 冻结的借款不够了"
);
BigDecimal
subtract
=
alterationBalance
.
subtract
(
settlementOwnerDetail
.
getSettlementFreight
());
BigDecimal
subtract
=
alterationBalance
.
subtract
(
settlementOwnerDetail
.
getSettlementFreight
());
// 冻结的借款不够了
// 冻结的借款不够了
try
{
try
{
...
@@ -216,6 +223,7 @@ public class OrderChildLoanComponent {
...
@@ -216,6 +223,7 @@ public class OrderChildLoanComponent {
}
}
runningWaterRecordList
=
ownerLoanAccountRunningWaterRecordDao
.
getListByOrderNoAndRunningWaterType
runningWaterRecordList
=
ownerLoanAccountRunningWaterRecordDao
.
getListByOrderNoAndRunningWaterType
(
childNo
,
OwnerLoanAccountRunningWaterRecordEnum
.
RunWaterType
.
APPROVE_FROZEN
.
getCode
());
(
childNo
,
OwnerLoanAccountRunningWaterRecordEnum
.
RunWaterType
.
APPROVE_FROZEN
.
getCode
());
log
.
info
(
"4.5新查询出冻结借款记录:{}"
,
JSONUtil
.
parse
(
runningWaterRecordList
));
childWriteOffOwnerLoanAccount
(
runningWaterRecordList
);
childWriteOffOwnerLoanAccount
(
runningWaterRecordList
);
}
}
...
@@ -277,6 +285,7 @@ public class OrderChildLoanComponent {
...
@@ -277,6 +285,7 @@ public class OrderChildLoanComponent {
}
}
public
void
childWriteOffOwnerLoanAccount
(
List
<
OwnerLoanAccountRunningWaterRecord
>
frozenList
)
{
public
void
childWriteOffOwnerLoanAccount
(
List
<
OwnerLoanAccountRunningWaterRecord
>
frozenList
)
{
log
.
info
(
"5. 执行核销扣除,相关流水{}"
,
JSONUtil
.
parse
(
frozenList
));
while
(
true
)
{
while
(
true
)
{
int
flag
=
0
;
int
flag
=
0
;
List
<
OwnerLoanAccountRunningWaterRecord
>
saveList
=
new
LinkedList
<>();
List
<
OwnerLoanAccountRunningWaterRecord
>
saveList
=
new
LinkedList
<>();
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论