Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
9b0a248e
Commit
9b0a248e
authored
Apr 02, 2025
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商险规则配置-fxj
parent
8ff8e2fe
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
19 deletions
+32
-19
TAutoMainRelServiceImpl.java
...1/yifu/archives/service/impl/TAutoMainRelServiceImpl.java
+32
-19
No files found.
yifu-archives/yifu-archives-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/archives/service/impl/TAutoMainRelServiceImpl.java
View file @
9b0a248e
...
@@ -480,6 +480,14 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
...
@@ -480,6 +480,14 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
if
(!
checkInsurStandardsForDuplicates
(
insurStandards
)){
if
(!
checkInsurStandardsForDuplicates
(
insurStandards
)){
return
R
.
failed
(
buyStandardRepeat
);
return
R
.
failed
(
buyStandardRepeat
);
}
}
//保存商险规则
//保存商险购买标准
//处理商险规则日志
//处理商险购买标准日志
// 获取旧的商险标准
// 获取旧的商险标准
List
<
TAutoInsurStandard
>
insurStandardsOld
=
autoInsurStandardMapper
.
selectList
(
Wrappers
List
<
TAutoInsurStandard
>
insurStandardsOld
=
autoInsurStandardMapper
.
selectList
(
Wrappers
.<
TAutoInsurStandard
>
query
().
lambda
().
eq
(
TAutoInsurStandard:
:
getMainId
,
autoInsurRuleNew
.
getId
()));
.<
TAutoInsurStandard
>
query
().
lambda
().
eq
(
TAutoInsurStandard:
:
getMainId
,
autoInsurRuleNew
.
getId
()));
...
@@ -492,23 +500,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
...
@@ -492,23 +500,7 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
.
eq
(
SysAutoDictItem:
:
getDisable
,
CommonConstants
.
ZERO_STRING
));
.
eq
(
SysAutoDictItem:
:
getDisable
,
CommonConstants
.
ZERO_STRING
));
// 如果查询到旧的岗位字典项
// 如果查询到旧的岗位字典项
if
(
Common
.
isNotNull
(
oldAutoDictItems
)){
repeatItems
=
getStringSysAutoDictItemMap
(
autoDictItems
,
repeatItems
,
oldAutoDictItems
);
repeatItems
=
oldAutoDictItems
.
stream
().
collect
(
Collectors
.
toMap
(
SysAutoDictItem:
:
getLabel
,
v
->
v
,(
k1
,
k2
)->
k1
));
//数据库中查询的字典 页面已经改了 不在作为重复结果集
for
(
SysAutoDictItem
item:
oldAutoDictItems
){
for
(
SysAutoDictItem
item1:
autoDictItems
){
if
(
Common
.
isNotNull
(
item1
.
getId
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
item1
.
getDisable
())){
repeatItems
.
remove
(
item1
.
getLabel
());
}
if
(
Common
.
isNotNull
(
item1
.
getId
())
&&
item
.
getId
().
equals
(
item1
.
getId
())
&&
!
item1
.
getLabel
().
equals
(
item
.
getLabel
())){
repeatItems
.
remove
(
item
.
getLabel
());
}
}
}
}
// 检验岗位字典是否重复
// 检验岗位字典是否重复
R
<
Boolean
>
checkRes
=
checkItemRepeat
(
autoDictItems
,
repeatItems
);
R
<
Boolean
>
checkRes
=
checkItemRepeat
(
autoDictItems
,
repeatItems
);
// 如果检验结果不为空,则返回检验结果
// 如果检验结果不为空,则返回检验结果
...
@@ -560,7 +552,28 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
...
@@ -560,7 +552,28 @@ public class TAutoMainRelServiceImpl extends ServiceImpl<TAutoMainRelMapper, TAu
return
R
.
ok
(
true
,
CommonConstants
.
UPDATE_SUCCESS
);
return
R
.
ok
(
true
,
CommonConstants
.
UPDATE_SUCCESS
);
}
}
/**
private
Map
<
String
,
SysAutoDictItem
>
getStringSysAutoDictItemMap
(
List
<
SysAutoDictItem
>
autoDictItems
,
Map
<
String
,
SysAutoDictItem
>
repeatItems
,
List
<
SysAutoDictItem
>
oldAutoDictItems
)
{
if
(
Common
.
isNotNull
(
oldAutoDictItems
)){
repeatItems
=
oldAutoDictItems
.
stream
().
collect
(
Collectors
.
toMap
(
SysAutoDictItem:
:
getLabel
,
v
->
v
,(
k1
,
k2
)->
k1
));
//数据库中查询的字典 页面已经改了 不在作为重复结果集
for
(
SysAutoDictItem
item:
oldAutoDictItems
){
for
(
SysAutoDictItem
item1:
autoDictItems
){
if
(
Common
.
isNotNull
(
item1
.
getId
())
&&
CommonConstants
.
ONE_STRING
.
equals
(
item1
.
getDisable
())){
repeatItems
.
remove
(
item1
.
getLabel
());
}
if
(
Common
.
isNotNull
(
item1
.
getId
())
&&
item
.
getId
().
equals
(
item1
.
getId
())
&&
!
item1
.
getLabel
().
equals
(
item
.
getLabel
())){
repeatItems
.
remove
(
item
.
getLabel
());
}
}
}
}
return
repeatItems
;
}
/**
* 检查字典项列表中是否存在重复的标签
* 检查字典项列表中是否存在重复的标签
* 此方法用于确保在同一字典下不存在重复的字典项标签
* 此方法用于确保在同一字典下不存在重复的字典项标签
* 它通过比较给定的字典项列表与一个用于跟踪重复项的映射来实现这一点
* 它通过比较给定的字典项列表与一个用于跟踪重复项的映射来实现这一点
...
...
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