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
33293e8d
Commit
33293e8d
authored
Aug 10, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:优化EKP交互流程,新增商险id字段"
parent
24a6de34
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
77 additions
and
14 deletions
+77
-14
EKPUtil.java
.../com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
+13
-0
EKPInteractiveParam.java
...cloud/plus/v1/yifu/insurances/vo/EKPInteractiveParam.java
+7
-0
TInsuranceSettlePushParam.java
...plus/v1/yifu/insurances/vo/TInsuranceSettlePushParam.java
+6
-0
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+51
-14
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
View file @
33293e8d
...
@@ -130,9 +130,22 @@ public class EKPUtil {
...
@@ -130,9 +130,22 @@ public class EKPUtil {
}
}
}
}
/**
* 将类转换成EKP要求的格式
*
* @author zhaji
* @param param 转换类
* @return {@link TInsuranceSettlePushParam}
*/
public
static
TInsuranceSettlePushParam
InsuranceDetail2PushParam
(
EKPInteractiveParam
param
){
public
static
TInsuranceSettlePushParam
InsuranceDetail2PushParam
(
EKPInteractiveParam
param
){
String
format
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
String
format
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
TInsuranceSettlePushParam
pushParam
=
new
TInsuranceSettlePushParam
();
TInsuranceSettlePushParam
pushParam
=
new
TInsuranceSettlePushParam
();
//ekpId
if
(
null
!=
param
.
getId
()
&&
null
!=
param
.
getDefaultSettleId
()){
pushParam
.
setFd_3afa8a70006bea
(
param
.
getId
()+
CommonConstants
.
DOWN_LINE_STRING
+
param
.
getDefaultSettleId
());
}
else
{
pushParam
.
setFd_3afa8a70006bea
(
CommonConstants
.
EMPTY_STRING
);
}
//单据类型
//单据类型
if
(
null
!=
param
.
getSettleType
()){
if
(
null
!=
param
.
getSettleType
()){
pushParam
.
setFd_3adfe6af71a1cc
(
param
.
getSettleType
());
pushParam
.
setFd_3adfe6af71a1cc
(
param
.
getSettleType
());
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/EKPInteractiveParam.java
View file @
33293e8d
...
@@ -26,6 +26,13 @@ public class EKPInteractiveParam implements Serializable {
...
@@ -26,6 +26,13 @@ public class EKPInteractiveParam implements Serializable {
@Schema
(
description
=
"主键"
)
@Schema
(
description
=
"主键"
)
private
String
id
;
private
String
id
;
/**
* 结算id
*/
@Schema
(
description
=
"结算id"
)
private
String
defaultSettleId
;
/**
/**
* 单据类型 (0、与薪资合并结算 1、单独结算)
* 单据类型 (0、与薪资合并结算 1、单独结算)
*/
*/
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/TInsuranceSettlePushParam.java
View file @
33293e8d
...
@@ -147,5 +147,11 @@ public class TInsuranceSettlePushParam{
...
@@ -147,5 +147,11 @@ public class TInsuranceSettlePushParam{
@Schema
(
description
=
"交易类型 1新增结算单,2作废结算信息,3更新保单信息"
)
@Schema
(
description
=
"交易类型 1新增结算单,2作废结算信息,3更新保单信息"
)
private
Integer
fd_3af9197b31071c
;
private
Integer
fd_3af9197b31071c
;
/**
* 商险ID 200
*/
@Schema
(
description
=
"商险ID(商险id_结算id)"
)
private
String
fd_3afa8a70006bea
;
}
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
33293e8d
...
@@ -3039,16 +3039,61 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3039,16 +3039,61 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
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
)){
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
//当前保单结算信息不为空且已推送的情况下,推送EKP进行变更
List
<
EKPInteractiveParam
>
deptDetail
=
getDeptDetail
(
successList
);
List
<
EKPInteractiveParam
>
deptDetail
=
getDeptDetail
(
successList
);
for
(
EKPInteractiveParam
ekpInteractiveParam
:
deptDetail
)
{
for
(
EKPInteractiveParam
ekpInteractiveParam
:
deptDetail
)
{
threadPool
.
execute
(()
->
{
threadPool
.
execute
(()
->
{
String
settleMonth
=
ekpInteractiveParam
.
getSettleMonth
();
String
settleMonth
=
ekpInteractiveParam
.
getSettleMonth
();
TInsuranceDetail
byId
=
getById
(
ekpInteractiveParam
.
getId
());
TInsuranceDetail
byId
=
getById
(
ekpInteractiveParam
.
getId
());
BeanCopyUtils
.
copyProperties
(
byId
,
ekpInteractiveParam
);
String
defaultSettleId
=
byId
.
getDefaultSettleId
();
ekpInteractiveParam
.
setSettleMonth
(
settleMonth
);
if
(
StringUtils
.
isNotBlank
(
defaultSettleId
)){
String
body
=
EKPUtil
.
sendToEKP
(
ekpInteractiveParam
);
TInsuranceSettle
settle
=
tInsuranceSettleService
.
getById
(
defaultSettleId
);
System
.
out
.
println
(
"变更成功后的id为:"
+
body
);
Integer
isActualPush
=
settle
.
getIsActualPush
();
if
(!
StringUtils
.
isBlank
(
body
)){
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
);
System
.
out
.
println
(
"变更成功后的id为:"
+
body
);
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
);
operateList
.
add
(
insuranceOperate
);
}
else
{
System
.
out
.
println
(
"更新EKP结算月份失败"
);
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
);
operateList
.
add
(
insuranceOperate
);
}
}
else
{
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
LambdaUpdateWrapper
<
TInsuranceDetail
>
updateWrapper
=
new
LambdaUpdateWrapper
<>();
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
ekpInteractiveParam
.
getId
())
updateWrapper
.
eq
(
TInsuranceDetail
::
getId
,
ekpInteractiveParam
.
getId
())
.
set
(
TInsuranceDetail
::
getSettleMonth
,
ekpInteractiveParam
.
getSettleMonth
())
.
set
(
TInsuranceDetail
::
getSettleMonth
,
ekpInteractiveParam
.
getSettleMonth
())
...
@@ -3062,16 +3107,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
...
@@ -3062,16 +3107,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
MONTH_CHANGE
);
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
MONTH_CHANGE
);
operateList
.
add
(
insuranceOperate
);
operateList
.
add
(
insuranceOperate
);
System
.
out
.
println
(
"返回的id为:"
+
body
);
}
else
{
System
.
out
.
println
(
"更新EKP结算月份失败"
);
for
(
SettleMonthChangeCheckParam
success:
successList
){
if
(
success
.
getId
().
equals
(
ekpInteractiveParam
.
getId
())){
success
.
setErrorMessage
(
"更新EKP结算月份失败"
);
errorList
.
add
(
success
);
}
}
}
}
});
});
}
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
tInsuranceOperateService
.
saveBatch
(
operateList
);
...
...
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