Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yd-csf
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xingmin
yd-csf
Commits
714ef287
Commit
714ef287
authored
May 08, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出账检核-增加币种22
parent
17350865
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
68 additions
and
5 deletions
+68
-5
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
+1
-1
yd-csf-feign/src/main/java/com/yd/csf/feign/response/expectedfortune/ApiExpectedFortunePageResponse.java
+8
-2
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
+58
-1
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
+1
-1
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiExpectedFortuneServiceImpl.java
View file @
714ef287
...
...
@@ -1012,7 +1012,7 @@ public class ApiExpectedFortuneServiceImpl implements ApiExpectedFortuneService
// 5. 组装返回结果
ApiExpectedFortunePageResponseVO
response
=
new
ApiExpectedFortunePageResponseVO
();
response
.
setStatisticsVO
(
statisticsVO
);
response
.
setPage
(
iExpectedFortuneService
.
getVOPage
(
iPage
));
//
恢复分页数据
response
.
setPage
(
iExpectedFortuneService
.
getVOPage
(
iPage
));
//
调整数据顺序
log
.
info
(
"查询应付款管理列表完成, 耗时: {}ms, 页码: {}, 页大小: {}, 总记录数: {}"
,
System
.
currentTimeMillis
()
-
startTime
,
...
...
yd-csf-feign/src/main/java/com/yd/csf/feign/response/expectedfortune/ApiExpectedFortunePageResponse.java
View file @
714ef287
...
...
@@ -132,9 +132,9 @@ public class ApiExpectedFortunePageResponse {
private
String
fortuneType
;
/**
*
转介人介绍费占比
*
持有比例
*/
@Schema
(
description
=
"
转介人介绍费占比
"
)
@Schema
(
description
=
"
持有比例
"
)
private
String
brokerRatio
;
...
...
@@ -232,6 +232,12 @@ public class ApiExpectedFortunePageResponse {
private
String
remark
;
/**
* 创建人
*/
@Schema
(
description
=
"创建人"
)
private
String
creatorName
;
/**
* 创建时间
*/
@Schema
(
description
=
"创建时间"
)
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/ExpectedFortuneServiceImpl.java
View file @
714ef287
...
...
@@ -17,6 +17,7 @@ import com.yd.csf.service.service.*;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.yd.csf.service.vo.ExpectedFortuneStatisticsVO
;
import
com.yd.csf.service.vo.PayableReportVO
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.BeanUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -36,6 +37,7 @@ import java.util.stream.Collectors;
* @since 2025-11-17
*/
@Service
@Slf4j
public
class
ExpectedFortuneServiceImpl
extends
ServiceImpl
<
ExpectedFortuneMapper
,
ExpectedFortune
>
implements
IExpectedFortuneService
{
@Resource
...
...
@@ -90,6 +92,9 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
return
expectedFortuneVOPage
;
}
// 调整数据顺序
processData
(
expectedFortuneList
);
// 1. 转介人职级信息
List
<
String
>
brokerBizIds
=
expectedFortuneList
.
stream
().
map
(
ApiExpectedFortunePageResponse:
:
getBrokerBizId
).
collect
(
Collectors
.
toList
());
Map
<
String
,
UserGradeDto
>
userGradeMap
=
iAgentAccumulatedFycService
.
queryUserGradeMap
(
brokerBizIds
);
...
...
@@ -117,11 +122,63 @@ public class ExpectedFortuneServiceImpl extends ServiceImpl<ExpectedFortuneMappe
// }
}
// expectedFortuneVOPage.setRecords(vo
List);
expectedFortuneVOPage
.
setRecords
(
expectedFortune
List
);
return
expectedFortuneVOPage
;
}
/**
* 调整数据顺序 预计在前,实际在后,按预计发佣月排序
*
* @param expectedFortuneList 预计发佣列表
*/
private
void
processData
(
List
<
ApiExpectedFortunePageResponse
>
expectedFortuneList
)
{
if
(
CollUtil
.
isEmpty
(
expectedFortuneList
))
{
return
;
}
log
.
info
(
"顺序调整前: {}"
,
expectedFortuneList
.
size
());
// 1. 分组
Map
<
Integer
,
List
<
ApiExpectedFortunePageResponse
>>
groupMap
=
expectedFortuneList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
ApiExpectedFortunePageResponse:
:
getType
));
// 2. 获取预计发佣(type=1)和实际发佣(type=2)列表
List
<
ApiExpectedFortunePageResponse
>
expectedList
=
groupMap
.
getOrDefault
(
1
,
new
ArrayList
<>());
List
<
ApiExpectedFortunePageResponse
>
actualList
=
groupMap
.
getOrDefault
(
2
,
new
ArrayList
<>());
// 3. 将 actualList 转换为 Map
Map
<
String
,
List
<
ApiExpectedFortunePageResponse
>>
actualMap
=
actualList
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
ApiExpectedFortunePageResponse:
:
getPayableNo
));
// 4. 调整数据顺序
List
<
ApiExpectedFortunePageResponse
>
sortedList
=
new
ArrayList
<>();
Set
<
String
>
matchedActualPayableNos
=
new
HashSet
<>();
for
(
ApiExpectedFortunePageResponse
expected
:
expectedList
)
{
sortedList
.
add
(
expected
);
// 查找对应的实际发佣
List
<
ApiExpectedFortunePageResponse
>
matchedList
=
actualMap
.
get
(
expected
.
getPayableNo
());
if
(
CollUtil
.
isNotEmpty
(
matchedList
))
{
sortedList
.
addAll
(
matchedList
);
matchedActualPayableNos
.
add
(
expected
.
getPayableNo
());
}
}
// 5. 添加未匹配的实际发佣记录
for
(
ApiExpectedFortunePageResponse
actual
:
actualList
)
{
if
(!
matchedActualPayableNos
.
contains
(
actual
.
getPayableNo
()))
{
sortedList
.
add
(
actual
);
}
}
// 6. 将排序后的结果写回原列表
expectedFortuneList
.
clear
();
expectedFortuneList
.
addAll
(
sortedList
);
log
.
info
(
"顺序调整后: {}"
,
sortedList
.
size
());
}
@Override
public
List
<
ApiExpectedFortunePageResponse
>
toVOList
(
List
<
ExpectedFortune
>
expectedFortuneList
)
{
if
(
CollUtil
.
isEmpty
(
expectedFortuneList
))
{
...
...
yd-csf-service/src/main/resources/mappers/ExpectedFortuneMapper.xml
View file @
714ef287
...
...
@@ -260,7 +260,7 @@
NULL as rule_item_biz_id,
f.remark,
f.create_time,
NULL
as creator_name,
f.reconciliation_operator
as creator_name,
f.update_time,
2 as type
FROM fortune f
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment