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
142c8928
Commit
142c8928
authored
Nov 08, 2022
by
李灿灿
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
20221108 被替换人增加被替换成功记录
parent
a58de574
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
5 deletions
+16
-5
InsurancesConstants.java
...lus/v1/yifu/insurances/constants/InsurancesConstants.java
+2
-2
TInsuranceDetailServiceImpl.java
...s/service/insurance/impl/TInsuranceDetailServiceImpl.java
+14
-3
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/constants/InsurancesConstants.java
View file @
142c8928
...
@@ -28,9 +28,9 @@ public class InsurancesConstants {
...
@@ -28,9 +28,9 @@ public class InsurancesConstants {
*/
*/
public
static
final
String
REPLACE
=
"“替换”提交申请"
;
public
static
final
String
REPLACE
=
"“替换”提交申请"
;
/**
/**
* 被替换
* 被替换
成功
*/
*/
public
static
final
String
SOURCE_REPLACE
=
"被替换"
;
public
static
final
String
SOURCE_REPLACE
=
"被替换
成功
"
;
/**
/**
* 删除
* 删除
*/
*/
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/insurance/impl/TInsuranceDetailServiceImpl.java
View file @
142c8928
...
@@ -419,7 +419,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -419,7 +419,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceReplaceParam
>
listResult
=
map
.
get
(
"listResult"
);
List
<
InsuranceReplaceParam
>
listResult
=
map
.
get
(
"listResult"
);
//保存到数据库中的结果
//保存到数据库中的结果
List
<
InsuranceReplaceParam
>
listSuccess
=
map
.
get
(
"listSuccess"
);
List
<
InsuranceReplaceParam
>
listSuccess
=
map
.
get
(
"listSuccess"
);
List
<
TInsuranceDetail
>
sourceList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
detailList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
if
(
CollectionUtils
.
isNotEmpty
(
listSuccess
)){
for
(
InsuranceReplaceParam
success
:
listSuccess
)
{
for
(
InsuranceReplaceParam
success
:
listSuccess
)
{
...
@@ -504,12 +503,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -504,12 +503,10 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
replace
.
setCreateTime
(
LocalDateTime
.
now
());
replace
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceReplaceService
.
save
(
replace
);
tInsuranceReplaceService
.
save
(
replace
);
}
}
sourceList
.
add
(
detail
);
detailList
.
add
(
newDetail
);
detailList
.
add
(
newDetail
);
}
}
}
}
//操作记录
//操作记录
addOperate
(
sourceList
,
user
,
InsurancesConstants
.
SOURCE_REPLACE
,
null
,
CommonConstants
.
ONE_INT
);
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REPLACE
,
null
,
CommonConstants
.
ONE_INT
);
addOperate
(
detailList
,
user
,
InsurancesConstants
.
REPLACE
,
null
,
CommonConstants
.
ONE_INT
);
return
R
.
ok
(
listResult
,
InsurancesConstants
.
REPLACE_SUCCESS
);
return
R
.
ok
(
listResult
,
InsurancesConstants
.
REPLACE_SUCCESS
);
}
}
...
@@ -1290,6 +1287,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1290,6 +1287,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
InsuranceListVO
>
errorList
=
new
ArrayList
<>();
List
<
InsuranceListVO
>
errorList
=
new
ArrayList
<>();
//后端处理的数据
//后端处理的数据
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
List
<
TInsuranceDetail
>
successList
=
new
ArrayList
<>();
//被替换人标记被替换成功
List
<
TInsuranceDetail
>
sourceList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
if
(
CollectionUtils
.
isNotEmpty
(
detailList
)){
for
(
TInsuranceDetail
detail
:
detailList
)
{
for
(
TInsuranceDetail
detail
:
detailList
)
{
//先判断投保状态是不是投保中,如果不是不给标记办理成功,防止重复推数据
//先判断投保状态是不是投保中,如果不是不给标记办理成功,防止重复推数据
...
@@ -1314,6 +1313,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1314,6 +1313,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//替换类型,保单生效日期:T + 1
//替换类型,保单生效日期:T + 1
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
detail
.
setPolicyEffect
(
LocalDate
.
now
().
plusDays
(
CommonConstants
.
ONE_INT
));
successList
.
add
(
detail
);
successList
.
add
(
detail
);
//查找被替换人信息
TInsuranceReplace
one
=
tInsuranceReplaceService
.
getOne
(
Wrappers
.<
TInsuranceReplace
>
query
().
lambda
()
.
eq
(
TInsuranceReplace:
:
getToInsuranceDetailId
,
detail
.
getId
())
.
last
(
CommonConstants
.
LAST_ONE_SQL
));
if
(
Optional
.
ofNullable
(
one
).
isPresent
())
{
TInsuranceDetail
byId
=
this
.
getById
(
one
.
getFromInsuranceDetailId
());
if
(
Optional
.
ofNullable
(
byId
).
isPresent
())
{
sourceList
.
add
(
byId
);
}
}
}
else
{
}
else
{
//根据结算类型判断是否需要计算预估保费
//根据结算类型判断是否需要计算预估保费
//预估
//预估
...
@@ -1439,6 +1449,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -1439,6 +1449,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
addOperate
(
operateList
,
user
,
InsurancesConstants
.
SUCCESSFUL
);
addOperate
(
operateList
,
user
,
InsurancesConstants
.
SUCCESSFUL
);
addOperate
(
sourceList
,
user
,
InsurancesConstants
.
SOURCE_REPLACE
,
null
,
CommonConstants
.
ONE_INT
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
return
R
.
ok
(
errorList
,
InsurancesConstants
.
OPERATE_SUCCESS
);
}
}
...
...
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