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
66cddc96
Commit
66cddc96
authored
May 18, 2026
by
zhangxingmin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
push
parent
bdfc676e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiSalaryServiceImpl.java
+3
-3
No files found.
yd-csf-api/src/main/java/com/yd/csf/api/service/impl/ApiSalaryServiceImpl.java
View file @
66cddc96
...
@@ -381,7 +381,7 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
...
@@ -381,7 +381,7 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
}
}
}
}
//
1.
校验列表内部是否有重复
// 校验列表内部是否有重复
Set
<
String
>
keySet
=
new
HashSet
<>();
Set
<
String
>
keySet
=
new
HashSet
<>();
List
<
String
>
duplicateKeys
=
new
ArrayList
<>();
List
<
String
>
duplicateKeys
=
new
ArrayList
<>();
for
(
ApiSalaryBatchAddDTO
dto
:
apiSalaryBatchAddDTOList
)
{
for
(
ApiSalaryBatchAddDTO
dto
:
apiSalaryBatchAddDTOList
)
{
...
@@ -402,7 +402,7 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
...
@@ -402,7 +402,7 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
throw
new
BusinessException
(
"批量数据中存在重复的转介人与薪资月份组合: "
+
String
.
join
(
", "
,
duplicateDescriptions
));
throw
new
BusinessException
(
"批量数据中存在重复的转介人与薪资月份组合: "
+
String
.
join
(
", "
,
duplicateDescriptions
));
}
}
//
2.
查询数据库中已存在的相同组合
// 查询数据库中已存在的相同组合
List
<
String
>
brokerBizIdList
=
apiSalaryBatchAddDTOList
.
stream
()
List
<
String
>
brokerBizIdList
=
apiSalaryBatchAddDTOList
.
stream
()
.
map
(
ApiSalaryBatchAddDTO:
:
getBrokerBizId
)
.
map
(
ApiSalaryBatchAddDTO:
:
getBrokerBizId
)
.
distinct
()
.
distinct
()
...
@@ -422,7 +422,7 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
...
@@ -422,7 +422,7 @@ public class ApiSalaryServiceImpl implements ApiSalaryService {
.
map
(
s
->
s
.
getBrokerBizId
()
+
"|"
+
s
.
getMonth
())
.
map
(
s
->
s
.
getBrokerBizId
()
+
"|"
+
s
.
getMonth
())
.
collect
(
Collectors
.
toSet
());
.
collect
(
Collectors
.
toSet
());
//
3.
找出冲突的组合
// 找出冲突的组合
List
<
String
>
conflictKeys
=
apiSalaryBatchAddDTOList
.
stream
()
List
<
String
>
conflictKeys
=
apiSalaryBatchAddDTOList
.
stream
()
.
map
(
dto
->
dto
.
getBrokerBizId
()
+
"|"
+
dto
.
getMonth
())
.
map
(
dto
->
dto
.
getBrokerBizId
()
+
"|"
+
dto
.
getMonth
())
.
filter
(
existingKeys:
:
contains
)
.
filter
(
existingKeys:
:
contains
)
...
...
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