Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
cad22df2
提交
cad22df2
authored
2月 02, 2024
作者:
huyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
借款相关接单拦截判断
上级
5ef33676
隐藏空白字符变更
内嵌
并排
正在显示
7 个修改的文件
包含
142 行增加
和
85 行删除
+142
-85
OrderChildLoanComponent.java
...om/clx/performance/component/OrderChildLoanComponent.java
+101
-0
OrderGoodsIdGenerate.java
...a/com/clx/performance/component/OrderGoodsIdGenerate.java
+1
-0
OwnerLoanAccount.java
...java/com/clx/performance/model/loan/OwnerLoanAccount.java
+26
-10
OrderChildServiceImpl.java
...m/clx/performance/service/impl/OrderChildServiceImpl.java
+3
-0
OwnerLoanAccountServiceImpl.java
...rmance/service/impl/loan/OwnerLoanAccountServiceImpl.java
+8
-3
OwnerLoanRecordServiceImpl.java
...ormance/service/impl/loan/OwnerLoanRecordServiceImpl.java
+3
-3
SettlementServiceImpl.java
...erformance/service/impl/settle/SettlementServiceImpl.java
+0
-69
没有找到文件。
performance-web/src/main/java/com/clx/performance/component/OrderChildLoanComponent.java
0 → 100644
浏览文件 @
cad22df2
package
com
.
clx
.
performance
.
component
;
import
com.clx.order.feign.OrderFeign
;
import
com.clx.order.vo.feign.FeignOrderInfoVO
;
import
com.clx.order.vo.pc.owner.OwnerQuotationDetailVO
;
import
com.clx.performance.dao.OrderChildDao
;
import
com.clx.performance.dao.OwnerRunningWaterRecordDao
;
import
com.clx.performance.dao.loan.OwnerLoanAccountDao
;
import
com.clx.performance.dao.loan.OwnerRepaymentDao
;
import
com.clx.performance.enums.OrderGoodsOverWeightEnum
;
import
com.clx.performance.enums.OwnerAccountEnum
;
import
com.clx.performance.enums.PerformanceResultEnum
;
import
com.clx.performance.enums.loan.OwnerRePaymentEnum
;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.model.OrderGoods
;
import
com.clx.performance.model.OwnerRunningWaterRecord
;
import
com.clx.performance.model.loan.OwnerLoanAccount
;
import
com.clx.performance.model.loan.OwnerRepayment
;
import
com.clx.user.vo.feign.OwnerInfoFeignVO
;
import
com.msl.common.base.Optional
;
import
com.msl.common.exception.ServiceSystemException
;
import
lombok.AllArgsConstructor
;
import
org.springframework.stereotype.Component
;
import
java.math.BigDecimal
;
import
java.util.List
;
@Component
@AllArgsConstructor
public
class
OrderChildLoanComponent
{
private
final
OrderFeign
orderFeign
;
private
final
OwnerRunningWaterRecordDao
ownerRunningWaterRecordDao
;
private
final
OrderChildDao
orderChildDao
;
private
final
OwnerLoanAccountDao
ownerLoanAccountDao
;
private
final
OwnerRepaymentDao
ownerRepaymentDao
;
public
void
getChildDetermine
(
FeignOrderInfoVO
orderInfoVO
,
OwnerInfoFeignVO
ownerInfoFeignVO
,
OrderGoods
orderGoods
)
{
OwnerQuotationDetailVO
quotationDetailVO
=
orderFeign
.
getQuotationByOrderNo
(
orderInfoVO
.
getOrderNo
()).
getData
();
BigDecimal
freightFreezeRate
=
quotationDetailVO
.
getFreightFreezeRate
();
if
(
freightFreezeRate
.
compareTo
(
BigDecimal
.
ONE
)
==
0
)
{
//百分百预付不需要考虑借款账户
return
;
}
//发货-是否可超标准 0 否 1 是
Integer
overWeight
=
orderInfoVO
.
getOverWeight
();
if
(
OrderGoodsOverWeightEnum
.
NO
.
getCode
().
equals
(
overWeight
))
{
determine
(
orderGoods
.
getPendingOrderFreight
().
multiply
(
new
BigDecimal
(
35
)));
}
else
{
determine
(
orderGoods
.
getPendingOrderFreight
().
multiply
(
new
BigDecimal
(
50
)));
}
}
public
void
determine
(
BigDecimal
orderChildPrice
)
{
List
<
OwnerRunningWaterRecord
>
runningWaterRecordList
=
ownerRunningWaterRecordDao
.
getOwnerRunningWaterRecord
(
""
);
BigDecimal
frozen
=
runningWaterRecordList
.
stream
().
filter
(
item
->
{
return
item
.
getRunningWaterType
().
equals
(
OwnerAccountEnum
.
RunningWaterStatus
.
FROZEN
.
getCode
())
&&
item
.
getAccountType
().
equals
(
OwnerAccountEnum
.
AccountTypeStatus
.
PREPAID_FREIGHT_ACCOUNT
.
getCode
())
;
}).
map
(
OwnerRunningWaterRecord:
:
getAlterationBalance
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
takeOut
=
runningWaterRecordList
.
stream
().
filter
(
item
->
{
return
item
.
getRunningWaterType
().
equals
(
OwnerAccountEnum
.
RunningWaterStatus
.
TAKE_OUT
.
getCode
())
&&
item
.
getAccountType
().
equals
(
OwnerAccountEnum
.
AccountTypeStatus
.
PREPAID_FREIGHT_ACCOUNT
.
getCode
())
;
}).
map
(
OwnerRunningWaterRecord:
:
getAlterationBalance
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
subtract
=
frozen
.
subtract
(
takeOut
);
if
(
subtract
.
compareTo
(
BigDecimal
.
ZERO
)
>
0
)
{
//查询未结算的运单(没有产生扣除流水的运单)
List
<
OrderChild
>
orderChildList
=
orderChildDao
.
selectInTransitOrderChildLtUnsettle
(
""
);
BigDecimal
orderChildSum
=
orderChildList
.
stream
().
map
(
OrderChild:
:
getWeight
).
reduce
(
BigDecimal
.
ZERO
,
BigDecimal:
:
add
);
BigDecimal
ans
=
subtract
.
subtract
(
orderChildSum
);
if
(
ans
.
compareTo
(
BigDecimal
.
ZERO
)
>=
0
&&
ans
.
compareTo
(
orderChildPrice
)
>=
0
)
{
//预付运费够
return
;
}
}
// 进行借款判断
OwnerLoanAccount
ownerLoanAccount
=
ownerLoanAccountDao
.
getOneByField
(
OwnerLoanAccount:
:
getOwnerUserNo
,
null
).
get
();
BigDecimal
ownerLoanAccountSum
=
ownerLoanAccount
.
getVirtuallyUsableBalance
().
add
(
ownerLoanAccount
.
getFundingUsableBalance
());
if
(
ownerLoanAccountSum
.
compareTo
(
orderChildPrice
)
<
0
)
{
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
ORDER_CHILD_SAVE_FAIL
,
"货主已欠款"
);
}
//借款账户钱够,判断是否逾期
Optional
<
OwnerRepayment
>
optional
=
ownerRepaymentDao
.
getLimitOneByField
(
OwnerRepayment:
:
getBeOverdue
,
OwnerRePaymentEnum
.
BeOverdue
.
YES
.
getCode
());
if
(
optional
.
isPresent
())
{
//逾期:不允许
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
ORDER_CHILD_SAVE_FAIL
,
"货主已欠款"
);
}
}
}
performance-web/src/main/java/com/clx/performance/component/OrderGoodsIdGenerate.java
浏览文件 @
cad22df2
...
@@ -7,6 +7,7 @@ import com.msl.common.exception.ServiceSystemException;
...
@@ -7,6 +7,7 @@ import com.msl.common.exception.ServiceSystemException;
import
com.msl.common.utils.DateUtils
;
import
com.msl.common.utils.DateUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.exception.ExceptionUtils
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RLock
;
import
org.redisson.api.RedissonClient
;
import
org.redisson.api.RedissonClient
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
performance-web/src/main/java/com/clx/performance/model/loan/OwnerLoanAccount.java
浏览文件 @
cad22df2
package
com
.
clx
.
performance
.
model
.
loan
;
package
com
.
clx
.
performance
.
model
.
loan
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.msl.common.config.KeyColumn
;
import
com.msl.common.config.KeyColumn
;
import
com.msl.common.model.HasKey
;
import
com.msl.common.model.HasKey
;
...
@@ -8,11 +10,9 @@ import io.swagger.annotations.ApiModelProperty;
...
@@ -8,11 +10,9 @@ import io.swagger.annotations.ApiModelProperty;
import
lombok.Getter
;
import
lombok.Getter
;
import
lombok.Setter
;
import
lombok.Setter
;
import
lombok.experimental.Accessors
;
import
lombok.experimental.Accessors
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
import
java.io.Serializable
;
/**
/**
* @author kavin
* @author kavin
...
@@ -44,13 +44,29 @@ public class OwnerLoanAccount implements HasKey<Integer> {
...
@@ -44,13 +44,29 @@ public class OwnerLoanAccount implements HasKey<Integer> {
@ApiModelProperty
(
"账户类型: 默认3 借款账户"
)
@ApiModelProperty
(
"账户类型: 默认3 借款账户"
)
private
Integer
accountType
;
private
Integer
accountType
;
@TableField
(
"funding_amount"
)
@TableField
(
"funding_account_balance"
)
@ApiModelProperty
(
"资金金额"
)
@ApiModelProperty
(
"资金账户金额"
)
private
BigDecimal
fundingAmount
;
private
BigDecimal
fundingAccountBalance
;
@TableField
(
"funding_usable_balance"
)
@ApiModelProperty
(
"资金可用金额"
)
private
BigDecimal
fundingUsableBalance
;
@TableField
(
"funding_frozen_balance"
)
@ApiModelProperty
(
"资金冻结金额"
)
private
BigDecimal
fundingFrozenBalance
;
@TableField
(
"virtually_account_balance"
)
@ApiModelProperty
(
"虚拟币账户金额"
)
private
BigDecimal
virtuallyAccountBalance
;
@TableField
(
"virtually_usable_balance"
)
@ApiModelProperty
(
"虚拟币可用余额"
)
private
BigDecimal
virtuallyUsableBalance
;
@TableField
(
"virtually_
amount
"
)
@TableField
(
"virtually_
frozen_balance
"
)
@ApiModelProperty
(
"虚拟币
金
额"
)
@ApiModelProperty
(
"虚拟币
冻结余
额"
)
private
BigDecimal
virtually
Amount
;
private
BigDecimal
virtually
FrozenBalance
;
@TableField
(
"funding_arrears"
)
@TableField
(
"funding_arrears"
)
@ApiModelProperty
(
"资金欠款"
)
@ApiModelProperty
(
"资金欠款"
)
...
@@ -75,6 +91,6 @@ public class OwnerLoanAccount implements HasKey<Integer> {
...
@@ -75,6 +91,6 @@ public class OwnerLoanAccount implements HasKey<Integer> {
@Override
@Override
@KeyColumn
(
"id"
)
@KeyColumn
(
"id"
)
public
Integer
gainKey
()
{
public
Integer
gainKey
()
{
return
this
.
id
;
return
this
.
id
;
}
}
}
}
performance-web/src/main/java/com/clx/performance/service/impl/OrderChildServiceImpl.java
浏览文件 @
cad22df2
...
@@ -312,6 +312,9 @@ public class OrderChildServiceImpl implements OrderChildService {
...
@@ -312,6 +312,9 @@ public class OrderChildServiceImpl implements OrderChildService {
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
ORDER_WEIGHT_LACK
);
throw
new
ServiceSystemException
(
PerformanceResultEnum
.
ORDER_WEIGHT_LACK
);
}
}
//TODO 借款账户相关限制
OrderChild
orderChild
=
new
OrderChild
();
OrderChild
orderChild
=
new
OrderChild
();
orderChild
.
setChildNo
(
childNo
);
orderChild
.
setChildNo
(
childNo
);
orderChild
.
setUserNo
(
userNo
);
orderChild
.
setUserNo
(
userNo
);
...
...
performance-web/src/main/java/com/clx/performance/service/impl/loan/OwnerLoanAccountServiceImpl.java
浏览文件 @
cad22df2
...
@@ -38,10 +38,15 @@ public class OwnerLoanAccountServiceImpl implements OwnerLoanAccountService {
...
@@ -38,10 +38,15 @@ public class OwnerLoanAccountServiceImpl implements OwnerLoanAccountService {
entity
.
setOwnerUserNo
(
ownerUserNo
);
entity
.
setOwnerUserNo
(
ownerUserNo
);
entity
.
setMobile
(
mobile
);
entity
.
setMobile
(
mobile
);
entity
.
setOwnerUserName
(
ownerUserName
);
entity
.
setOwnerUserName
(
ownerUserName
);
entity
.
setFundingAmount
(
BigDecimal
.
ZERO
);
entity
.
setFundingAccountBalance
(
BigDecimal
.
ZERO
);
entity
.
setFundingAmount
(
BigDecimal
.
ZERO
);
entity
.
setFundingFrozenBalance
(
BigDecimal
.
ZERO
);
entity
.
setVirtuallyAmount
(
BigDecimal
.
ZERO
);
entity
.
setFundingUsableBalance
(
BigDecimal
.
ZERO
);
entity
.
setFundingArrears
(
BigDecimal
.
ZERO
);
entity
.
setVirtuallyArrears
(
BigDecimal
.
ZERO
);
entity
.
setVirtuallyArrears
(
BigDecimal
.
ZERO
);
entity
.
setVirtuallyAccountBalance
(
BigDecimal
.
ZERO
);
entity
.
setVirtuallyUsableBalance
(
BigDecimal
.
ZERO
);
entity
.
setVirtuallyFrozenBalance
(
BigDecimal
.
ZERO
);
ownerLoanAccountDao
.
saveEntity
(
entity
);
ownerLoanAccountDao
.
saveEntity
(
entity
);
}
}
...
...
performance-web/src/main/java/com/clx/performance/service/impl/loan/OwnerLoanRecordServiceImpl.java
浏览文件 @
cad22df2
...
@@ -142,8 +142,8 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
...
@@ -142,8 +142,8 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
ownerLoanRecord
.
getOwnerUserNo
()).
get
();
ownerLoanRecord
.
getOwnerUserNo
()).
get
();
OwnerLoanAccount
entity
=
new
OwnerLoanAccount
();
OwnerLoanAccount
entity
=
new
OwnerLoanAccount
();
entity
.
setId
(
ownerLoanAccount
.
getId
());
entity
.
setId
(
ownerLoanAccount
.
getId
());
entity
.
setVirtuallyAmount
(
ownerLoanRecord
.
getLoanBalance
());
/*
entity.setVirtuallyAmount(ownerLoanRecord.getLoanBalance());
entity
.
setFundingAmount
(
BigDecimal
.
ZERO
);
entity.setFundingAmount(BigDecimal.ZERO);
*/
entity
.
setModifiedTime
(
ownerLoanAccount
.
getModifiedTime
());
entity
.
setModifiedTime
(
ownerLoanAccount
.
getModifiedTime
());
Integer
flag
=
ownerLoanAccountDao
.
updateAccountCAS
(
entity
,
LocalDateTime
.
now
(),
true
);
Integer
flag
=
ownerLoanAccountDao
.
updateAccountCAS
(
entity
,
LocalDateTime
.
now
(),
true
);
if
(
flag
==
1
)
{
if
(
flag
==
1
)
{
...
@@ -187,7 +187,7 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
...
@@ -187,7 +187,7 @@ public class OwnerLoanRecordServiceImpl implements OwnerLoanRecordService {
.
setLoanNo
(
ownerLoanRecord
.
getLoanNo
())
.
setLoanNo
(
ownerLoanRecord
.
getLoanNo
())
.
setRunningWaterType
(
RunningWaterTypeEnum
.
Status
.
LOAN
.
getCode
())
.
setRunningWaterType
(
RunningWaterTypeEnum
.
Status
.
LOAN
.
getCode
())
.
setAlterationBalance
(
ownerLoanRecord
.
getLoanBalance
())
.
setAlterationBalance
(
ownerLoanRecord
.
getLoanBalance
())
.
setAccountBalance
(
ownerLoanAccount
.
getFundingA
mount
().
add
(
ownerLoanAccount
.
getVirtuallyAmount
()))
.
setAccountBalance
(
ownerLoanAccount
.
getFundingA
ccountBalance
().
add
(
ownerLoanAccount
.
getVirtuallyAccountBalance
()))
.
setCreateBy
(
"系统"
);
.
setCreateBy
(
"系统"
);
ownerLoanAccountRunningWaterRecordDao
.
saveEntity
(
record
);
ownerLoanAccountRunningWaterRecordDao
.
saveEntity
(
record
);
}
}
...
...
performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementServiceImpl.java
浏览文件 @
cad22df2
...
@@ -62,13 +62,9 @@ public class SettlementServiceImpl implements SettlementService {
...
@@ -62,13 +62,9 @@ public class SettlementServiceImpl implements SettlementService {
SettlementOwnerDetail
settlementOwnerDetail
=
settlementOwnerDetailDao
.
getByChildNo
(
childNo
).
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
SettlementOwnerDetail
settlementOwnerDetail
=
settlementOwnerDetailDao
.
getByChildNo
(
childNo
).
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
SettlementDriverDetail
settlementDriverDetail
=
settlementDriverDetailDao
.
getByChildNo
(
childNo
).
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
SettlementDriverDetail
settlementDriverDetail
=
settlementDriverDetailDao
.
getByChildNo
(
childNo
).
orElseThrow
(
PerformanceResultEnum
.
DATA_NOT_FIND
);
if
(
settlementOwnerDetail
.
getInvoiceType
()
!=
null
)
{
return
;
}
// 开票金额
// 开票金额
settlementOwnerDetail
.
setInvoiceFreight
(
invoiceFreightCalc
(
orderChild
.
getSettlementWay
(),
settlementOwnerDetail
));
settlementOwnerDetail
.
setInvoiceFreight
(
invoiceFreightCalc
(
orderChild
.
getSettlementWay
(),
settlementOwnerDetail
));
if
(
settlementDriverDetail
.
getSettlementFreight
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
if
(
settlementDriverDetail
.
getSettlementFreight
().
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
invoiceType
=
SettlementOwnerEnum
.
InvoiceType
.
ORDINARY
.
getCode
();
settlementDriverDetail
.
setPrepayFreightFlag
(
SettlementDriverEnum
.
PrepayFreightFlag
.
NO_PAY
.
getCode
());
settlementDriverDetail
.
setPrepayFreightFlag
(
SettlementDriverEnum
.
PrepayFreightFlag
.
NO_PAY
.
getCode
());
settlementOwnerDetail
.
setPrepayFreight
(
BigDecimal
.
ZERO
);
settlementOwnerDetail
.
setPrepayFreight
(
BigDecimal
.
ZERO
);
}
else
{
}
else
{
...
@@ -77,71 +73,6 @@ public class SettlementServiceImpl implements SettlementService {
...
@@ -77,71 +73,6 @@ public class SettlementServiceImpl implements SettlementService {
RabbitKeyConstants
.
ORDER_CHILD_SYNC_TRANSPORT_EXCHANGE
,
RabbitKeyConstants
.
ORDER_CHILD_SYNC_TRANSPORT_ROUTE_KEY
,
message
RabbitKeyConstants
.
ORDER_CHILD_SYNC_TRANSPORT_EXCHANGE
,
RabbitKeyConstants
.
ORDER_CHILD_SYNC_TRANSPORT_ROUTE_KEY
,
message
);
);
return
;
return
;
// OrderGoods orderGoods = orderGoodsDao.getByOrderGoodsNo(orderChild.getOrderGoodsNo()).get();
// //是否通过风控,调用网络货运
// ThirdOrderChildBrokerParam param = transportSyncService.generateOrderChildSync(orderChild, orderGoods, settlementOwnerDetail, settlementDriverDetail);
// HttpDTO httpDTOResult = transportFeignService.orderChildSync(param);
// String decrypt = ThirdComponent.decrypt(httpDTOResult.getData());
// OrderChildSyncDTO bean = JSONUtil.toBean(decrypt, OrderChildSyncDTO.class);
// log.info("OrderChildSyncDTO信息为:{}", JSONUtil.parse(bean));
// if (bean.getCode() == 0) {
// Integer status = bean.getData().getStatus();
// if (status == 1) {
// //通过风控
// List<OwnerRunningWaterRecord> runningWaterRecordList = ownerRunningWaterRecordDao.getOwnerRunningWaterRecord(orderChild.getOrderNo());
// BigDecimal frozen = runningWaterRecordList.stream().filter(item -> {
// return item.getRunningWaterType().equals(OwnerAccountEnum.RunningWaterStatus.FROZEN.getCode())
// && item.getAccountType().equals(OwnerAccountEnum.AccountTypeStatus.PREPAID_FREIGHT_ACCOUNT.getCode())
// ;
// }).map(OwnerRunningWaterRecord::getAlterationBalance).reduce(BigDecimal.ZERO, BigDecimal::add);
//
// BigDecimal takeOut = runningWaterRecordList.stream().filter(item -> {
// return item.getRunningWaterType().equals(OwnerAccountEnum.RunningWaterStatus.TAKE_OUT.getCode())
// && item.getAccountType().equals(OwnerAccountEnum.AccountTypeStatus.PREPAID_FREIGHT_ACCOUNT.getCode())
// ;
// }).map(OwnerRunningWaterRecord::getAlterationBalance).reduce(BigDecimal.ZERO, BigDecimal::add);
// //设置预付运费金额
// BigDecimal ans = getPrepayFreightPay(orderChild.getSettlementWay(), settlementOwnerDetail, frozen);
// BigDecimal subtract = frozen.subtract(takeOut);
// log.info("冻结预付运费:{}, 扣除的流水总和:{}", frozen, takeOut);
// invoiceType = SettlementOwnerEnum.InvoiceType.ONLINE.getCode();
// settlementDriverDetail.setPrepayFreight(ans);
// //冻结的预付运费为0 或者 此刻预付运费也可能为0,那么就不用生成扣除相关流水逻辑
// if (subtract.compareTo(BigDecimal.ZERO) <= 0 || ans.compareTo(BigDecimal.ZERO) == 0) {
// settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
// settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
// } else {
// if (subtract.subtract(ans).compareTo(BigDecimal.ZERO) >= 0) {
// //账户扣钱并生成扣除流水
// generateTakeOutRunningWatter(orderChild, ans, settlementOwnerDetail, settlementDriverDetail);
// try {
// //网络货运钱包账户
// networkDriverRunningWaterRecordService.generateNetworkDriverRunningWaterRecord(
// settlementDriverDetail,
// NetworkDriverAccountEnum.RunningWaterStatus.SETTLEMENT.getCode()
// );
// //生成提现记录
// networkDriverRunningWaterRecordService.generateNetworkCaseOutRecord(settlementDriverDetail);
// }catch (Exception e) {
// log.info("运单同步网络货运生成司机运单结算流水失败:{}", e.getMessage());
// }
//
// } else {
// settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
// settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
//
// }
// }
//
// } else {
// settlementDriverDetail.setPrepayFreightFlag(SettlementDriverEnum.PrepayFreightFlag.NO_PAY.getCode());
// settlementOwnerDetail.setPrepayFreight(BigDecimal.ZERO);
// settlementOwnerDetail.setFinalPaymentStatus(SettlementOwnerDetailEnum.FinalPaymentStatus.NO.getCode());
// }
// } else {
// throw new ServiceSystemException(PerformanceResultEnum.ORDER_CHILD_SYNC_ERROR);
//
// }
}
}
// 结算金额
// 结算金额
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论