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
f09f1cef
Commit
f09f1cef
authored
Jan 04, 2026
by
jianan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
前端对接问题修复37
parent
21525b6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
16 deletions
+29
-16
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
+26
-15
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
+3
-1
No files found.
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CommissionServiceImpl.java
View file @
f09f1cef
...
@@ -364,30 +364,37 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -364,30 +364,37 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
.
in
(
ExpectedFortune:
:
getPolicyNo
,
policyNoSet
)
.
in
(
ExpectedFortune:
:
getPolicyNo
,
policyNoSet
)
.
list
();
.
list
();
// 1.2 根据保单号和期数筛选符合的预计发佣记录
// 1.2 根据保单号和期数筛选符合的预计发佣记录
List
<
ExpectedFortune
>
filteredExpectedFortuneList
=
new
ArrayList
<>();
List
<
ExpectedFortune
>
filteredExpectedFortuneList
1
=
new
ArrayList
<>();
for
(
Commission
commission
:
commissions
)
{
for
(
Commission
commission
:
commissions
)
{
String
policyNo
=
commission
.
getPolicyNo
();
String
policyNo
=
commission
.
getPolicyNo
();
Integer
commissionPeriod
=
commission
.
getCommissionPeriod
();
Integer
commissionPeriod
=
commission
.
getCommissionPeriod
();
for
(
ExpectedFortune
expectedFortune
:
expectedFortuneList
)
{
for
(
ExpectedFortune
expectedFortune
:
expectedFortuneList
)
{
if
(
expectedFortune
.
getPolicyNo
().
equals
(
policyNo
)
&&
expectedFortune
.
getFortunePeriod
().
equals
(
commissionPeriod
))
{
if
(
expectedFortune
.
getPolicyNo
().
equals
(
policyNo
)
&&
expectedFortune
.
getFortunePeriod
().
equals
(
commissionPeriod
))
{
filteredExpectedFortuneList
.
add
(
expectedFortune
);
filteredExpectedFortuneList
1
.
add
(
expectedFortune
);
}
}
}
}
}
}
if
(
CollectionUtils
.
isEmpty
(
filteredExpectedFortuneList
))
{
if
(
CollectionUtils
.
isEmpty
(
filteredExpectedFortuneList
1
))
{
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"未找到保单对应的预计发佣记录,请先创建预计发佣记录"
);
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"未找到保单对应的预计发佣记录,请先创建预计发佣记录"
);
}
}
// 2. 根据本次发佣
日期,查询本期待发佣
记录
// 2. 根据本次发佣
期数,查询是否有已出账的
记录
List
<
Fortune
>
fortuneList
=
fortuneService
.
lambdaQuery
()
List
<
Fortune
>
fortuneList
=
fortuneService
.
lambdaQuery
()
.
in
(
Fortune:
:
getExpectedFortuneBizId
,
filteredExpectedFortuneList
.
stream
().
map
(
ExpectedFortune:
:
getExpectedFortuneBizId
).
collect
(
Collectors
.
toList
()))
.
in
(
Fortune:
:
getExpectedFortuneBizId
,
filteredExpectedFortuneList
1
.
stream
().
map
(
ExpectedFortune:
:
getExpectedFortuneBizId
).
collect
(
Collectors
.
toList
()))
.
list
();
.
list
();
// 2.1 校验是否有已出账的记录
// 2.1 根据保单号和期数建立映射关系
for
(
Fortune
fortune
:
fortuneList
)
{
Map
<
String
,
Fortune
>
fortuneMap
=
fortuneList
.
stream
()
if
(!
FortuneStatusEnum
.
WAIT
.
getItemValue
().
equals
(
fortune
.
getStatus
()))
{
.
collect
(
Collectors
.
toMap
(
i
->
i
.
getPolicyNo
()
+
"_"
+
i
.
getFortunePeriod
(),
fortune
->
fortune
));
Commission
commission
=
policyNoPeriodMap
.
get
(
fortune
.
getPolicyNo
()
+
"_"
+
fortune
.
getFortunePeriod
());
// 2.2 校验是否有已出账的记录
throw
new
BusinessException
(
ResultCode
.
NULL_ERROR
.
getCode
(),
"保单号为"
+
commission
.
getPolicyNo
()
+
",期数为"
+
commission
.
getCommissionPeriod
()
+
"已有出账,不能重新出账"
);
List
<
ExpectedFortune
>
filteredExpectedFortuneList2
=
new
ArrayList
<>();
for
(
ExpectedFortune
expectedFortune
:
filteredExpectedFortuneList1
)
{
String
policyNo
=
expectedFortune
.
getPolicyNo
();
Integer
fortunePeriod
=
expectedFortune
.
getFortunePeriod
();
// 如果有已出账记录,跳过,表示此次该预计出账已出账
if
(
fortuneMap
.
get
(
policyNo
+
"_"
+
fortunePeriod
)
!=
null
)
{
continue
;
}
}
filteredExpectedFortuneList2
.
add
(
expectedFortune
);
}
}
// 2.2 过滤掉 is_part = 1 的 fortune 记录
// 2.2 过滤掉 is_part = 1 的 fortune 记录
...
@@ -396,7 +403,7 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -396,7 +403,7 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
// .collect(Collectors.toList());
// .collect(Collectors.toList());
// 5. 构建实际的初始发佣记录
// 5. 构建实际的初始发佣记录
List
<
Fortune
>
newFortuneList
=
buildNewFortunes
(
filteredExpectedFortuneList
,
commissions
);
List
<
Fortune
>
newFortuneList
=
buildNewFortunes
(
filteredExpectedFortuneList
2
,
commissions
);
// List<Fortune> newFortuneList = new ArrayList<>();
// List<Fortune> newFortuneList = new ArrayList<>();
// for (ExpectedFortune expectedFortune : filteredExpectedFortuneList) {
// for (ExpectedFortune expectedFortune : filteredExpectedFortuneList) {
// Fortune fortune = new Fortune();
// Fortune fortune = new Fortune();
...
@@ -593,10 +600,14 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
...
@@ -593,10 +600,14 @@ public class CommissionServiceImpl extends ServiceImpl<CommissionMapper, Commiss
// 查询预计入账信息
// 查询预计入账信息
List
<
CommissionExpected
>
commissionExpectedList
=
commissionExpectedService
.
lambdaQuery
().
in
(
CommissionExpected:
:
getPolicyNo
,
policyNoSet
).
list
();
List
<
CommissionExpected
>
commissionExpectedList
=
commissionExpectedService
.
lambdaQuery
().
in
(
CommissionExpected:
:
getPolicyNo
,
policyNoSet
).
list
();
// 预计入账映射, 根据保单号、期数、入账名称、币种映射
// 预计入账映射, 根据保单号、期数、入账名称、币种映射
commissionExpectedMap
=
commissionExpectedList
.
stream
()
try
{
.
collect
(
Collectors
.
toMap
(
commissionExpectedMap
=
commissionExpectedList
.
stream
()
key
->
key
.
getPolicyNo
()
+
"_"
+
key
.
getCommissionPeriod
()
+
"_"
+
key
.
getCommissionName
()
+
"_"
+
key
.
getCurrency
(),
.
collect
(
Collectors
.
toMap
(
Function
.
identity
()));
key
->
key
.
getPolicyNo
()
+
"_"
+
key
.
getCommissionPeriod
()
+
"_"
+
key
.
getCommissionName
()
+
"_"
+
key
.
getCurrency
(),
Function
.
identity
()));
}
catch
(
Exception
e
)
{
throw
new
BusinessException
(
ResultCode
.
PARAMS_ERROR
.
getCode
(),
"该保单已存在当前币种、期数的佣金项目,请勿重复添加"
);
}
}
}
List
<
Commission
>
commissionList
=
new
ArrayList
<>();
List
<
Commission
>
commissionList
=
new
ArrayList
<>();
...
...
yd-csf-service/src/main/java/com/yd/csf/service/service/impl/CustomerServiceImpl.java
View file @
f09f1cef
...
@@ -194,10 +194,12 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
...
@@ -194,10 +194,12 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerMapper, Customer>
List
<
FnaForm
>
fnaFormList
=
fnaFormService
.
list
(
queryWrapper
);
List
<
FnaForm
>
fnaFormList
=
fnaFormService
.
list
(
queryWrapper
);
if
(
CollectionUtils
.
isNotEmpty
(
fnaFormList
))
{
if
(
CollectionUtils
.
isNotEmpty
(
fnaFormList
))
{
FnaForm
fnaForm
=
fnaFormList
.
get
(
0
);
FnaForm
fnaForm
=
fnaFormList
.
get
(
0
);
if
(
ObjectUtils
.
isNotEmpty
(
fnaForm
.
getDependantList
()))
{
if
(
StringUtils
.
isNotBlank
((
CharSequence
)
fnaForm
.
getDependantList
())
&&
!
"null"
.
equals
(
fnaForm
.
getDependantList
()))
{
List
<
DependantData
>
dependantList
=
GSONUtil
.
fromJson
((
String
)
fnaForm
.
getDependantList
(),
new
TypeToken
<
List
<
DependantData
>>()
{
List
<
DependantData
>
dependantList
=
GSONUtil
.
fromJson
((
String
)
fnaForm
.
getDependantList
(),
new
TypeToken
<
List
<
DependantData
>>()
{
}.
getType
());
}.
getType
());
customer
.
setDependentsNum
(
dependantList
.
size
());
customer
.
setDependentsNum
(
dependantList
.
size
());
}
else
{
customer
.
setDependentsNum
(
0
);
}
}
}
}
}
}
...
...
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