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
Show 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 {
}
}
/**
* 将类转换成EKP要求的格式
*
* @author zhaji
* @param param 转换类
* @return {@link TInsuranceSettlePushParam}
*/
public
static
TInsuranceSettlePushParam
InsuranceDetail2PushParam
(
EKPInteractiveParam
param
){
String
format
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
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
()){
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 {
@Schema
(
description
=
"主键"
)
private
String
id
;
/**
* 结算id
*/
@Schema
(
description
=
"结算id"
)
private
String
defaultSettleId
;
/**
* 单据类型 (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{
@Schema
(
description
=
"交易类型 1新增结算单,2作废结算信息,3更新保单信息"
)
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,11 +3039,18 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
List
<
SettleMonthChangeCheckParam
>
successList
=
map
.
get
(
"successList"
);
List
<
SettleMonthChangeCheckParam
>
errorList
=
map
.
get
(
"errorList"
);
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
//当前保单结算信息不为空且已推送的情况下,推送EKP进行变更
List
<
EKPInteractiveParam
>
deptDetail
=
getDeptDetail
(
successList
);
for
(
EKPInteractiveParam
ekpInteractiveParam
:
deptDetail
)
{
threadPool
.
execute
(()
->
{
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
);
...
...
@@ -3062,7 +3069,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
insuranceOperate
.
setCreateTime
(
LocalDateTime
.
now
());
insuranceOperate
.
setOperateDesc
(
InsurancesConstants
.
MONTH_CHANGE
);
operateList
.
add
(
insuranceOperate
);
System
.
out
.
println
(
"返回的id为:"
+
body
);
}
else
{
System
.
out
.
println
(
"更新EKP结算月份失败"
);
for
(
SettleMonthChangeCheckParam
success:
successList
){
...
...
@@ -3072,6 +3078,37 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
}
}
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
<>();
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
);
}
});
}
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