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
0ecdbe6d
Commit
0ecdbe6d
authored
Aug 11, 2022
by
查济
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-zhaji' into 'develop'
Feature zhaji See merge request fangxinjiang/yifu!167
parents
6812a8a7
c7aaead1
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
47 additions
and
76 deletions
+47
-76
TInsuranceDetailController.java
...ifu/insurances/controller/TInsuranceDetailController.java
+2
-2
TInsuranceDetailMapper.java
...lus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
+1
-1
TInsuranceDetailService.java
...s/v1/yifu/insurances/service/TInsuranceDetailService.java
+1
-1
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+42
-72
TInsuranceDetailMapper.xml
...-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
+1
-0
No files found.
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/controller/TInsuranceDetailController.java
View file @
0ecdbe6d
...
...
@@ -479,7 +479,7 @@ public class TInsuranceDetailController {
*/
@Operation
(
summary
=
"根据身份证查询所有的商险列表"
,
description
=
"根据身份证查询所有的商险列表"
)
@GetMapping
(
"/getInsuranceListByIdCard"
)
public
R
<
IPage
<
InsuranceListByIdCardVo
>>
getInsuranceListByIdCard
(
Page
page
,
String
idCard
)
{
return
new
R
<>(
tInsuranceDetailService
.
getInsuranceListByIdCard
(
page
,
idCard
));
public
R
<
IPage
<
InsuranceListByIdCardVo
>>
getInsuranceListByIdCard
(
Page
page
,
String
idCard
,
String
deptNo
)
{
return
new
R
<>(
tInsuranceDetailService
.
getInsuranceListByIdCard
(
page
,
idCard
,
deptNo
));
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/mapper/TInsuranceDetailMapper.java
View file @
0ecdbe6d
...
...
@@ -186,7 +186,7 @@ public interface TInsuranceDetailMapper extends BaseMapper<TInsuranceDetail> {
* @date 2022-08-01
* @return
*/
IPage
<
InsuranceListByIdCardVo
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
@Param
(
"idCard"
)
String
idCard
);
IPage
<
InsuranceListByIdCardVo
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
@Param
(
"idCard"
)
String
idCard
,
@Param
(
"deptNo"
)
String
deptNo
);
List
<
TInsuranceDetail
>
selectListByempIdcardNo
(
String
empIdcardNo
);
...
...
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/TInsuranceDetailService.java
View file @
0ecdbe6d
...
...
@@ -330,6 +330,6 @@ public interface TInsuranceDetailService extends IService<TInsuranceDetail> {
* @param
* @return {@link R}
*/
IPage
<
InsuranceListByIdCardVo
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
String
idCard
);
IPage
<
InsuranceListByIdCardVo
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
String
idCard
,
String
deptNo
);
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
0ecdbe6d
...
...
@@ -3054,60 +3054,45 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
//初始化线程池
ThreadPoolExecutor
threadPool
=
new
ThreadPoolExecutor
(
10
,
10
,
100
,
TimeUnit
.
SECONDS
,
new
LinkedBlockingQueue
<>(
10
));
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(!
Common
.
isNotEmpty
(
settleMonthCheckList
))
{
if
(!
Common
.
isNotEmpty
(
settleMonthCheckList
))
{
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变更结算月份
List
<
TInsuranceOperate
>
operateList
=
new
ArrayList
<>(
16
);
List
<
SettleMonthChangeCheckParam
>
successList
=
map
.
get
(
"successList"
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
map
.
get
(
"errorList"
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
//先更新本地状态再集中推送至EKP
//当前保单结算信息不为空且已推送的情况下,推送EKP进行变更
List
<
EKPInteractiveParam
>
deptDetail
=
getDeptDetail
(
successList
);
threadPool
.
execute
(()
->
{
for
(
EKPInteractiveParam
ekpInteractiveParam
:
deptDetail
)
{
String
settleMonth
=
ekpInteractiveParam
.
getSettleMonth
();
TInsuranceDetail
byId
=
getById
(
ekpInteractiveParam
.
getId
());
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
)){
List
<
SettleMonthChangeCheckParam
>
ekpList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
successList
))
{
for
(
SettleMonthChangeCheckParam
settleMonthChangeCheckParam
:
successList
)
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
ekpInteractive
Param
.
getId
())
.
set
(
TInsuranceDetail
::
getSettleMonth
,
ekpInteractive
Param
.
getSettleMonth
())
.
set
(
TInsuranceDetail
::
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail
::
getUpdateTime
,
LocalDateTime
.
now
());
updateWrapper
.
eq
(
TInsuranceDetail:
:
getId
,
settleMonthChangeCheck
Param
.
getId
())
.
set
(
TInsuranceDetail:
:
getSettleMonth
,
settleMonthChangeCheck
Param
.
getSettleMonth
())
.
set
(
TInsuranceDetail:
:
getUpdateBy
,
user
.
getId
())
.
set
(
TInsuranceDetail:
:
getUpdateTime
,
LocalDateTime
.
now
());
update
(
updateWrapper
);
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
ekpInteractive
Param
.
getId
());
insuranceOperate
.
setInsuranceDetailId
(
settleMonthChangeCheck
Param
.
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
);
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
);
}
}
}
}
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
);
//先更新本地状态再集中推送至EKP
//当前保单结算信息不为空且已推送的情况下,推送EKP进行变更
threadPool
.
execute
(()->{
List
<
EKPInteractiveParam
>
deptDetail
=
getDeptDetail
(
ekpList
);
for
(
EKPInteractiveParam
ekpInteractiveParam
:
deptDetail
)
{
String
body
=
EKPUtil
.
sendToEKP
(
ekpInteractiveParam
);
if
(!
StringUtils
.
isBlank
(
body
))
{
TInsuranceOperate
insuranceOperate
=
new
TInsuranceOperate
();
insuranceOperate
.
setInsuranceDetailId
(
ekpInteractiveParam
.
getId
());
insuranceOperate
.
setCreateBy
(
user
.
getId
());
...
...
@@ -3115,29 +3100,19 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
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
);
}
}
});
}
return
R
.
ok
(
errorList
,
"导入成功"
);
return
R
.
ok
(
errorList
,
"导入成功"
);
}
/**
* 变更所属项目
*
...
...
@@ -3934,7 +3909,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
Map
<
String
,
List
<
SettleMonthChangeCheckParam
>>
map
=
new
HashMap
<>(
16
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
new
ArrayList
<>();
List
<
SettleMonthChangeCheckParam
>
successList
=
new
ArrayList
<>();
List
<
EKPInteractiveParam
>
ekpList
=
new
ArrayList
<>();
for
(
SettleMonthChangeCheckParam
param
:
settleMonthCheckList
)
{
//员工姓名
String
empName
=
param
.
getEmpName
();
...
...
@@ -4129,10 +4103,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
param
.
setId
(
insuranceDetail
.
getId
());
EKPInteractiveParam
ekpInteractiveParam
=
new
EKPInteractiveParam
();
BeanCopyUtils
.
copyProperties
(
insuranceDetail
,
ekpInteractiveParam
);
ekpInteractiveParam
.
setSettleMonth
(
settleMonth
);
ekpList
.
add
(
ekpInteractiveParam
);
successList
.
add
(
param
);
}
map
.
put
(
"errorList"
,
errorList
);
...
...
@@ -4523,8 +4493,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
* @return {@link R}
*/
@Override
public
IPage
<
InsuranceListByIdCardVo
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
String
idCard
)
{
IPage
<
InsuranceListByIdCardVo
>
insuranceListByIdCard
=
baseMapper
.
getInsuranceListByIdCard
(
page
,
idCard
);
public
IPage
<
InsuranceListByIdCardVo
>
getInsuranceListByIdCard
(
Page
<
TInsuranceDetail
>
page
,
String
idCard
,
String
deptNo
)
{
IPage
<
InsuranceListByIdCardVo
>
insuranceListByIdCard
=
baseMapper
.
getInsuranceListByIdCard
(
page
,
idCard
,
deptNo
);
List
<
InsuranceListByIdCardVo
>
records
=
insuranceListByIdCard
.
getRecords
();
if
(
CollectionUtils
.
isNotEmpty
(
records
)){
for
(
InsuranceListByIdCardVo
record
:
records
)
{
...
...
yifu-insurances/yifu-insurances-biz/src/main/resources/mapper/TInsuranceDetailMapper.xml
View file @
0ecdbe6d
...
...
@@ -888,6 +888,7 @@
<where>
1=1
AND EMP_IDCARD_NO = #{idCard}
and DEPT_NO = #{deptNo}
</where>
ORDER BY CREATE_TIME desc
</select>
...
...
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