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
aab5e856
Commit
aab5e856
authored
Aug 11, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:修改结算月变更的bug"
parent
69717ddb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
41 additions
and
70 deletions
+41
-70
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+41
-70
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
aab5e856
...
@@ -3053,75 +3053,45 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3053,75 +3053,45 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//初始化线程池
//初始化线程池
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
10
,
10
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
10
,
10
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
YifuUser
user
=
SecurityUtils
.
getUser
();
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(!
Common
.
isNotEmpty
(
settleMonthCheckList
))
{
if
(!
Common
.
isNotEmpty
(
settleMonthCheckList
))
{
return
R
.
failed
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_LIST_IS_EMPTY
);
return
R
.
failed
(
InsurancesConstants
.
SETTLE_MONTH_CHANGE_LIST_IS_EMPTY
);
}
}
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
settleMonthChangeCheck
(
settleMonthCheckList
,
user
);
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
settleMonthChangeCheck
(
settleMonthCheckList
,
user
);
//todo 生成EKP通知,通知ekp变更结算月份
//todo 生成EKP通知,通知ekp变更结算月份
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>(
16
);
List
<
SettleMonthChangeCheckParam
>
successList
=
map
.
get
(
"successList"
);
List
<
SettleMonthChangeCheckParam
>
successList
=
map
.
get
(
"successList"
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
map
.
get
(
"errorList"
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
map
.
get
(
"errorList"
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
List
<
SettleMonthChangeCheckParam
>
ekpList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
))
{
for
(
SettleMonthChangeCheckParam
settleMonthChangeCheckParam
:
successList
)
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceDetail:
:
getId
,
settleMonthChangeCheckParam
.
getId
())
.
set
(
TInsuranceDetail:
:
getSettleMonth
,
settleMonthChangeCheckParam
.
getSettleMonth
())
.
set
(
TInsuranceDetail:
:
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail:
:
getUpdateTime
,
LocalDateTime
.
now
());
update
(
updateWrapper
);
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
settleMonthChangeCheckParam
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
MONTH_CHANGE
);
tInsuranceOperateService
.
save
(
insuranceOperate
);
TInsuranceDetail
byId
=
getById
(
settleMonthChangeCheckParam
.
getId
());
String
defaultSettleId
=
byId
.
getDefaultSettleId
();
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
))
{
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
if
(
settle
.
getIsActualPush
()
==
CommonConstants
.
ONE_INT
||
settle
.
getIsEstimatePush
()
==
CommonConstants
.
ONE_INT
)
{
ekpList
.
add
(
settleMonthChangeCheckParam
);
}
}
}
//先更新本地状态再集中推送至EKP
//先更新本地状态再集中推送至EKP
//当前保单结算信息不为空且已推送的情况下,推送EKP进行变更
//当前保单结算信息不为空且已推送的情况下,推送EKP进行变更
List
<
EKPInteractiveParam
>
deptDetail
=
getDeptDetail
(
successList
);
threadPool
.
execute
(()->{
// threadPool.execute(() -> {
List
<
EKPInteractiveParam
>
deptDetail
=
getDeptDetail
(
ekpList
);
for
(
EKPInteractiveParam
ekpInteractiveParam
:
deptDetail
)
{
for
(
EKPInteractiveParam
ekpInteractiveParam
:
deptDetail
)
{
String
settleMonth
=
ekpInteractiveParam
.
getSettleMonth
();
String
body
=
EKPUtil
.
sendToEKP
(
ekpInteractiveParam
);
TInsuranceDetail
byId
=
getById
(
ekpInteractiveParam
.
getId
());
if
(!
StringUtils
.
isBlank
(
body
))
{
String
defaultSettleId
=
byId
.
getDefaultSettleId
();
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)){
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
Integer
isActualPush
=
settle
.
getIsActualPush
();
Integer
isEstimatePush
=
settle
.
getIsEstimatePush
();
if
(
isEstimatePush
==
CommonConstants
.
ONE_INT
||
isActualPush
==
CommonConstants
.
ONE_INT
){
BeanCopyUtils
.
copyProperties
(
byId
,
ekpInteractiveParam
);
ekpInteractiveParam
.
setSettleMonth
(
settleMonth
);
String
body
=
EKPUtil
.
sendToEKP
(
ekpInteractiveParam
);
if
(!
StringUtils
.
isBlank
(
body
)){
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
ekpInteractiveParam
.
getId
())
.
set
(
TInsuranceDetail
::
getSettleMonth
,
ekpInteractiveParam
.
getSettleMonth
())
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
update
(
updateWrapper
);
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
ekpInteractiveParam
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
MONTH_CHANGE
);
tInsuranceOperateService
.
save
(
insuranceOperate
);
}
else
{
for
(
SettleMonthChangeCheckParam
success:
successList
){
if
(
success
.
getId
().
equals
(
ekpInteractiveParam
.
getId
())){
success
.
setErrorMessage
(
"更新EKP结算月份失败"
);
errorList
.
add
(
success
);
}
}
}
}
else
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
ekpInteractiveParam
.
getId
())
.
set
(
TInsuranceDetail
::
getSettleMonth
,
ekpInteractiveParam
.
getSettleMonth
())
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
update
(
updateWrapper
);
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
ekpInteractiveParam
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateName
(
user
.
getNickname
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
MONTH_CHANGE
);
tInsuranceOperateService
.
save
(
insuranceOperate
);
}
}
else
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
ekpInteractiveParam
.
getId
())
.
set
(
TInsuranceDetail
::
getSettleMonth
,
ekpInteractiveParam
.
getSettleMonth
())
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
update
(
updateWrapper
);
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
ekpInteractiveParam
.
getId
());
insuranceOperate
.
setInsuranceDetailId
(
ekpInteractiveParam
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
...
@@ -3129,13 +3099,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3129,13 +3099,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
MONTH_CHANGE
);
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
MONTH_CHANGE
);
tInsuranceOperateService
.
save
(
insuranceOperate
);
tInsuranceOperateService
.
save
(
insuranceOperate
);
}
else
{
for
(
SettleMonthChangeCheckParam
success
:
successList
)
{
if
(
success
.
getId
().
equals
(
ekpInteractiveParam
.
getId
()))
{
success
.
setErrorMessage
(
"更新EKP结算月份失败"
);
errorList
.
add
(
success
);
}
}
}
}
}
}
//
});
});
}
}
return
R
.
ok
(
errorList
,
"导入成功"
);
return
R
.
ok
(
errorList
,
"导入成功"
);
}
}
/**
/**
* 变更所属项目
* 变更所属项目
*
*
...
@@ -3932,7 +3908,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3932,7 +3908,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
new
HashMap
<>(
16
);
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
new
HashMap
<>(
16
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
new
ArrayList
<>();
List
<
SettleMonthChangeCheckParam
>
errorList
=
new
ArrayList
<>();
List
<
SettleMonthChangeCheckParam
>
successList
=
new
ArrayList
<>();
List
<
SettleMonthChangeCheckParam
>
successList
=
new
ArrayList
<>();
List
<
EKPInteractiveParam
>
ekpList
=
new
ArrayList
<>();
for
(
SettleMonthChangeCheckParam
param
:
settleMonthCheckList
)
{
for
(
SettleMonthChangeCheckParam
param
:
settleMonthCheckList
)
{
//员工姓名
//员工姓名
String
empName
=
param
.
getEmpName
();
String
empName
=
param
.
getEmpName
();
...
@@ -4127,10 +4102,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -4127,10 +4102,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
param
.
setId
(
insuranceDetail
.
getId
());
param
.
setId
(
insuranceDetail
.
getId
());
EKPInteractiveParam
ekpInteractiveParam
=
new
EKPInteractiveParam
();
BeanCopyUtils
.
copyProperties
(
insuranceDetail
,
ekpInteractiveParam
);
ekpInteractiveParam
.
setSettleMonth
(
settleMonth
);
ekpList
.
add
(
ekpInteractiveParam
);
successList
.
add
(
param
);
successList
.
add
(
param
);
}
}
map
.
put
(
"errorList"
,
errorList
);
map
.
put
(
"errorList"
,
errorList
);
...
...
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