Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
clx-performance
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
姜武杰
clx-performance
Commits
9808f5bb
提交
9808f5bb
authored
1月 23, 2024
作者:
huyufan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
增加根据货主ID查询货主借款账户信息
上级
2f35ad6a
显示空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
121 行增加
和
53 行删除
+121
-53
PerformanceFeign.java
...main/java/com/clx/performance/feign/PerformanceFeign.java
+4
-0
OwnerLoanAccountVO.java
...in/java/com/clx/performance/vo/pc/OwnerLoanAccountVO.java
+46
-0
OwnerAccountFeignController.java
...ormance/controller/feign/OwnerAccountFeignController.java
+7
-1
OwnerAccountService.java
...java/com/clx/performance/service/OwnerAccountService.java
+3
-0
OwnerAccountServiceImpl.java
...clx/performance/service/impl/OwnerAccountServiceImpl.java
+17
-0
SettlementOwnerDetailServiceImpl.java
...service/impl/settle/SettlementOwnerDetailServiceImpl.java
+0
-52
OwnerLoanAccountSqlProvider.java
...ormance/sqlProvider/loan/OwnerLoanAccountSqlProvider.java
+28
-0
OwnerLoanAccountStruct.java
...m/clx/performance/struct/loan/OwnerLoanAccountStruct.java
+16
-0
没有找到文件。
performance-api/src/main/java/com/clx/performance/feign/PerformanceFeign.java
浏览文件 @
9808f5bb
...
...
@@ -11,6 +11,7 @@ import com.clx.performance.vo.app.collect.AppCollectTruckVO;
import
com.clx.performance.vo.feign.FreightEstimateVO
;
import
com.clx.performance.vo.feign.OrderGoodsFeignVO
;
import
com.clx.performance.vo.pc.OwnerAccountAllVO
;
import
com.clx.performance.vo.pc.OwnerLoanAccountVO
;
import
com.clx.performance.vo.pc.breakcontract.carrier.BreakContractOwnerRuleVO
;
import
com.msl.common.result.Result
;
import
org.springframework.cloud.openfeign.FeignClient
;
...
...
@@ -111,4 +112,7 @@ public interface PerformanceFeign {
@PostMapping
(
value
=
{
"clx-performance/feign/orderGoods/listFreightEstimate"
})
Result
<
FreightEstimateVO
>
listFreightEstimate
(
@RequestBody
OrderChildReportParam
param
);
@GetMapping
(
value
=
{
"clx-performance/feign/owner/loanAccount"
})
Result
<
OwnerLoanAccountVO
>
loanAccount
(
@RequestParam
Long
userNo
);
}
performance-api/src/main/java/com/clx/performance/vo/pc/OwnerLoanAccountVO.java
0 → 100644
浏览文件 @
9808f5bb
package
com
.
clx
.
performance
.
vo
.
pc
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
java.math.BigDecimal
;
import
java.time.LocalDateTime
;
@Data
public
class
OwnerLoanAccountVO
{
private
Integer
id
;
@ApiModelProperty
(
"货主编码"
)
private
Long
ownerUserNo
;
@ApiModelProperty
(
"货主名称"
)
private
String
ownerUserName
;
@ApiModelProperty
(
"联系电话"
)
private
String
mobile
;
@ApiModelProperty
(
"账户类型: 默认3 借款账户"
)
private
Integer
accountType
;
@ApiModelProperty
(
"资金金额"
)
private
BigDecimal
fundingAmount
;
@ApiModelProperty
(
"虚拟币金额"
)
private
BigDecimal
virtuallyAmount
;
@ApiModelProperty
(
"资金欠款"
)
private
BigDecimal
fundingArrears
;
@ApiModelProperty
(
"虚拟币欠款"
)
private
BigDecimal
virtuallyArrears
;
@ApiModelProperty
(
"创建人"
)
private
String
createBy
;
@ApiModelProperty
(
"创建时间"
)
private
LocalDateTime
createTime
;
@ApiModelProperty
(
"修改时间"
)
private
LocalDateTime
modifiedTime
;
}
performance-web/src/main/java/com/clx/performance/controller/feign/OwnerAccountFeignController.java
浏览文件 @
9808f5bb
...
...
@@ -5,8 +5,8 @@ import com.clx.performance.param.pc.owner.FrozenAccountParam;
import
com.clx.performance.param.pc.owner.ThawAccountParam
;
import
com.clx.performance.service.OwnerAccountService
;
import
com.clx.performance.vo.pc.OwnerAccountAllVO
;
import
com.clx.performance.vo.pc.OwnerLoanAccountVO
;
import
com.msl.common.result.Result
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -44,4 +44,10 @@ public class OwnerAccountFeignController {
public
Result
<
OwnerAccountAllVO
>
accountInfo
(
@RequestParam
Long
userNo
)
{
return
Result
.
ok
(
ownerAccountService
.
accountInfo
(
userNo
));
}
@ApiOperation
(
value
=
"查询用户预付运费和保证金账户"
,
notes
=
"<br>By:胡宇帆"
)
@GetMapping
(
"/loanAccount"
)
public
Result
<
OwnerLoanAccountVO
>
loanAccount
(
@RequestParam
Long
userNo
)
{
return
Result
.
ok
(
ownerAccountService
.
loanAccount
(
userNo
));
}
}
performance-web/src/main/java/com/clx/performance/service/OwnerAccountService.java
浏览文件 @
9808f5bb
...
...
@@ -16,6 +16,7 @@ import com.clx.performance.param.pc.owner.ThawAccountParam;
import
com.clx.performance.vo.pc.OwnerAccountAllVO
;
import
com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO
;
import
com.clx.performance.vo.pc.OwnerAccountVO
;
import
com.clx.performance.vo.pc.OwnerLoanAccountVO
;
import
com.clx.user.param.pc.owner.UpdateOwnerBindCardFeignParam
;
import
com.clx.user.vo.pc.owner.OwnerBindCardVO
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
...
...
@@ -101,4 +102,6 @@ public interface OwnerAccountService {
String
checkBusinessLicenseNumber
(
InformationParam
param
);
void
resetPassword
(
ResetPasswordParam
param
);
OwnerLoanAccountVO
loanAccount
(
Long
userNo
);
}
performance-web/src/main/java/com/clx/performance/service/impl/OwnerAccountServiceImpl.java
浏览文件 @
9808f5bb
...
...
@@ -15,11 +15,13 @@ import com.clx.performance.config.ClxMessageConfig;
import
com.clx.performance.constant.RabbitKeyConstants
;
import
com.clx.performance.constant.RedisConstants
;
import
com.clx.performance.dao.*
;
import
com.clx.performance.dao.loan.OwnerLoanAccountDao
;
import
com.clx.performance.enums.IdTypeEnum
;
import
com.clx.performance.enums.OwnerAccountEnum
;
import
com.clx.performance.enums.PerformanceResultEnum
;
import
com.clx.performance.extranal.user.OwnerInfoService
;
import
com.clx.performance.model.*
;
import
com.clx.performance.model.loan.OwnerLoanAccount
;
import
com.clx.performance.param.app.CheckMobileParam
;
import
com.clx.performance.param.app.InformationParam
;
import
com.clx.performance.param.app.ResetPasswordParam
;
...
...
@@ -33,6 +35,7 @@ import com.clx.performance.param.pc.owner.FrozenAccountParam;
import
com.clx.performance.param.pc.owner.ThawAccountParam
;
import
com.clx.performance.service.OwnerAccountService
;
import
com.clx.performance.struct.OwnerAccountStruct
;
import
com.clx.performance.struct.loan.OwnerLoanAccountStruct
;
import
com.clx.performance.utils.MyMD5Util
;
import
com.clx.performance.utils.excel.ExcelData
;
import
com.clx.performance.utils.excel.ExcelField
;
...
...
@@ -41,6 +44,7 @@ import com.clx.performance.utils.excel.ExcelUtil;
import
com.clx.performance.vo.pc.OwnerAccountAllVO
;
import
com.clx.performance.vo.pc.OwnerAccountRunningWaterRecordVO
;
import
com.clx.performance.vo.pc.OwnerAccountVO
;
import
com.clx.performance.vo.pc.OwnerLoanAccountVO
;
import
com.clx.user.enums.owner.FreezeSettingEnum
;
import
com.clx.user.feign.OwnerFeign
;
import
com.clx.user.feign.OwnerInfoFeign
;
...
...
@@ -111,6 +115,10 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
private
final
OwnerInfoService
ownerInfoService
;
private
final
OwnerLoanAccountDao
ownerLoanAccountDao
;
private
final
OwnerLoanAccountStruct
ownerLoanAccountStruct
;
@Override
public
IPage
<
OwnerAccountVO
>
pageList
(
PageOwnerAccountListParam
param
)
{
return
ownerAccountDao
.
pageList
(
param
);
...
...
@@ -1213,4 +1221,13 @@ public class OwnerAccountServiceImpl implements OwnerAccountService {
}
}
@Override
public
OwnerLoanAccountVO
loanAccount
(
Long
userNo
)
{
OwnerLoanAccount
ownerLoanAccount
=
ownerLoanAccountDao
.
getOneByField
(
OwnerLoanAccount:
:
getOwnerUserNo
,
userNo
).
orNull
();
if
(
ownerLoanAccount
==
null
)
{
return
null
;
}
return
ownerLoanAccountStruct
.
convert
(
ownerLoanAccount
);
}
}
performance-web/src/main/java/com/clx/performance/service/impl/settle/SettlementOwnerDetailServiceImpl.java
浏览文件 @
9808f5bb
...
...
@@ -3,19 +3,12 @@ package com.clx.performance.service.impl.settle;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.clx.performance.component.IdGenerateSnowFlake
;
import
com.clx.performance.dao.OrderChildDao
;
import
com.clx.performance.dao.OwnerAccountDao
;
import
com.clx.performance.dao.OwnerRunningWaterRecordDao
;
import
com.clx.performance.dao.settle.SettlementOwnerDetailDao
;
import
com.clx.performance.enums.IdTypeEnum
;
import
com.clx.performance.enums.OwnerAccountEnum
;
import
com.clx.performance.enums.settle.SettlementOwnerDetailEnum
;
import
com.clx.performance.enums.settle.SettlementWayEnum
;
import
com.clx.performance.model.OrderChild
;
import
com.clx.performance.model.OrderGoods
;
import
com.clx.performance.model.OwnerAccount
;
import
com.clx.performance.model.OwnerRunningWaterRecord
;
import
com.clx.performance.model.settle.SettlementOwnerDetail
;
import
com.clx.performance.param.pc.owner.PageCarrierSettlementOwnerDetailParam
;
import
com.clx.performance.param.pc.owner.PageOwnerSettlementOwnerDetailParam
;
...
...
@@ -27,7 +20,6 @@ import com.clx.performance.utils.excel.ExcelSheet;
import
com.clx.performance.utils.excel.ExcelUtil
;
import
com.clx.performance.vo.pc.carrier.settle.CarrierPageSettlementOwnerDetailVO
;
import
com.clx.performance.vo.pc.owner.settle.PageOwnerSettlementOwnerDetailVO
;
import
com.msl.common.result.Result
;
import
lombok.AllArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.xssf.streaming.SXSSFWorkbook
;
...
...
@@ -52,9 +44,6 @@ public class SettlementOwnerDetailServiceImpl implements SettlementOwnerDetailS
private
final
SettlementOwnerDetailDao
settlementOwnerDetailDao
;
private
final
SettlementOwnerDetailStruct
settlementOwnerDetailStruct
;
private
final
IdGenerateSnowFlake
idGenerateSnowFlake
;
private
final
OwnerRunningWaterRecordDao
ownerRunningWaterRecordDao
;
private
final
OwnerAccountDao
ownerAccountDao
;
private
final
OrderChildDao
orderChildDao
;
...
...
@@ -93,47 +82,6 @@ public class SettlementOwnerDetailServiceImpl implements SettlementOwnerDetailS
BigDecimal
ans
=
settlementOwnerDetail
.
getFreight
().
subtract
(
settlementOwnerDetail
.
getLossFreight
());
if
(
ans
.
compareTo
(
BigDecimal
.
ZERO
)
<=
0
)
{
settlementOwnerDetail
.
setPrepayFreight
(
BigDecimal
.
ZERO
);
}
else
{
/*List<OwnerRunningWaterRecord> runningWaterRecordList = ownerRunningWaterRecordDao.getOwnerRunningWaterRecord(orderChild.getOrderNo());
BigDecimal frozen = runningWaterRecordList.stream().filter(item -> {
return item.getRunningWaterType().equals(OwnerAccountEnum.RunningWaterStatus.FROZEN.getCode());
}).map(OwnerRunningWaterRecord::getAlterationBalance).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal takeOut = runningWaterRecordList.stream().filter(item -> {
return item.getRunningWaterType().equals(OwnerAccountEnum.RunningWaterStatus.TAKE_OUT.getCode());
}).map(OwnerRunningWaterRecord::getAlterationBalance).reduce(BigDecimal.ZERO, BigDecimal::add);
BigDecimal subtract = frozen.subtract(takeOut);
if (subtract.compareTo(BigDecimal.ZERO) <= 0) {
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(ans);
runningWaterRecord.setUsableBalance(account.getUsableBalance());
runningWaterRecord.setTakeOutBalance(BigDecimal.ZERO);
runningWaterRecord.setAccountBalance(account.getAccountBalance());
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);
}*/
}
// // 开票金额
...
...
performance-web/src/main/java/com/clx/performance/sqlProvider/loan/OwnerLoanAccountSqlProvider.java
0 → 100644
浏览文件 @
9808f5bb
package
com
.
clx
.
performance
.
sqlProvider
.
loan
;
import
cn.hutool.core.util.ObjectUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.jdbc.SQL
;
public
class
OwnerLoanAccountSqlProvider
{
public
String
getOwnerLoanAccountByOwnerUserId
(
@Param
(
"param"
)
Long
ownerUserNo
)
{
String
sql
=
new
SQL
()
{{
SELECT
(
"a.id, a.owner_user_no,"
+
" a.owner_user_name, a.mobile, a.account_type, "
+
" a.funding_amount,a.virtually_amount,a.funding_arrears,a.virtually_arrears,a.create_by,date_format(a.create_time, '%Y-%m-%d %H:%i:%s') as create_time"
);
FROM
(
"owner_loan_account a"
);
if
(
ObjectUtil
.
isNotNull
(
ownerUserNo
))
{
WHERE
(
"a.owner_user_no = #{ownerUserNo}"
);
}
ORDER_BY
(
"a.create_time desc"
);
}}.
toString
();
return
sql
;
}
}
performance-web/src/main/java/com/clx/performance/struct/loan/OwnerLoanAccountStruct.java
0 → 100644
浏览文件 @
9808f5bb
package
com
.
clx
.
performance
.
struct
.
loan
;
import
com.clx.performance.model.loan.OwnerLoanAccount
;
import
com.clx.performance.vo.pc.OwnerLoanAccountVO
;
import
com.msl.common.utils.DateStructUtil
;
import
org.mapstruct.Mapper
;
import
java.util.Objects
;
@Mapper
(
componentModel
=
"spring"
,
uses
=
DateStructUtil
.
class
,
imports
=
{
Objects
.
class
})
public
interface
OwnerLoanAccountStruct
{
OwnerLoanAccountVO
convert
(
OwnerLoanAccount
account
);
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论