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
24a6de34
Commit
24a6de34
authored
Aug 10, 2022
by
zhaji
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
"feature-zhaJi:优化EKP交互流程,优化变更结算月的错误返回"
parent
8cc9d28a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
148 additions
and
98 deletions
+148
-98
EKPUtil.java
.../com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
+107
-19
TInsuranceSettlePushParam.java
...plus/v1/yifu/insurances/vo/TInsuranceSettlePushParam.java
+8
-74
TInsuranceDetailServiceImpl.java
.../insurances/service/impl/TInsuranceDetailServiceImpl.java
+33
-5
No files found.
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/util/EKPUtil.java
View file @
24a6de34
...
...
@@ -2,13 +2,13 @@ package com.yifu.cloud.plus.v1.yifu.insurances.util;
import
cn.hutool.json.JSONObject
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CommonConstants
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.EKPInteractiveParam
;
import
com.yifu.cloud.plus.v1.yifu.insurances.vo.TInsuranceSettlePushParam
;
import
lombok.Getter
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.context.annotation.ComponentScan
;
import
org.springframework.http.*
;
import
org.springframework.stereotype.Component
;
import
org.springframework.util.LinkedMultiValueMap
;
...
...
@@ -94,14 +94,16 @@ public class EKPUtil {
loginName
.
append
(
"LoginName"
,
LoginName
);
String
loginData
=
new
ObjectMapper
().
writeValueAsString
(
loginName
);
MultiValueMap
<
String
,
Object
>
wholeForm
=
new
LinkedMultiValueMap
<>();
wholeForm
.
add
(
"docSubject"
,
new
String
(
docSubject
.
getBytes
(
"UTF-8"
),
"ISO-8859-1"
)
);
//wholeForm.add("docSubject", new String(docSubject.getBytes("UTF-8"),"ISO-8859-1") );
wholeForm
.
add
(
"docSubject"
,
docSubject
);
wholeForm
.
add
(
"docCreator"
,
"{\"LoginName\":\"admin\"}"
);
//wholeForm.add("docCreator", loginData);
wholeForm
.
add
(
"docStatus"
,
docStatus
);
wholeForm
.
add
(
"fdModelId"
,
fdModelId
);
wholeForm
.
add
(
"fdFlowId"
,
fdFlowId
);
//wholeForm.add("formValues", new String(formValues.getBytes("UTF-8"),"ISO-8859-1"));
wholeForm
.
add
(
"formValues"
,
new
String
(
"{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}"
.
getBytes
(
"UTF-8"
),
"ISO-8859-1"
)
);
wholeForm
.
add
(
"formValues"
,
formValues
);
//wholeForm.add("formValues", new String("{\"fd_3adfe6af71a1cc\":\"王五\", \"fd_3adfe658c6229e\":\"2019-03-26\", \"fd_3adfe6592b4158\":\"这里内容\"}".getBytes("UTF-8"),"ISO-8859-1") );
System
.
out
.
println
(
"wholeForm:"
+
wholeForm
);
HttpHeaders
headers
=
new
HttpHeaders
();
//如果EKP对该接口启用了Basic认证,那么客户端需要加入
...
...
@@ -132,49 +134,135 @@ public class EKPUtil {
String
format
=
LocalDate
.
now
().
format
(
DateTimeFormatter
.
ofPattern
(
"yyyy-MM-dd"
));
TInsuranceSettlePushParam
pushParam
=
new
TInsuranceSettlePushParam
();
//单据类型
pushParam
.
setFd_3adfe6af71a1cc
(
param
.
getSettleType
());
if
(
null
!=
param
.
getSettleType
()){
pushParam
.
setFd_3adfe6af71a1cc
(
param
.
getSettleType
());
}
else
{
pushParam
.
setFd_3adfe6af71a1cc
(
CommonConstants
.
ZERO_INT
);
}
//项目编码
pushParam
.
setFd_3adfe658c6229e
(
param
.
getDeptNo
());
if
(
null
!=
param
.
getDeptNo
()){
pushParam
.
setFd_3adfe658c6229e
(
param
.
getDeptNo
());
}
else
{
pushParam
.
setFd_3adfe658c6229e
(
CommonConstants
.
EMPTY_STRING
);
}
//项目名称
pushParam
.
setFd_3adfe6592b4158
(
param
.
getDeptName
());
if
(
null
!=
param
.
getDeptName
()){
pushParam
.
setFd_3adfe6592b4158
(
param
.
getDeptName
());
}
else
{
pushParam
.
setFd_3adfe6592b4158
(
CommonConstants
.
EMPTY_STRING
);
}
//客户编码
pushParam
.
setFd_3adfe6598281e8
(
param
.
getCustomerCode
());
if
(
null
!=
param
.
getCustomerCode
()){
pushParam
.
setFd_3adfe6598281e8
(
param
.
getCustomerCode
());
}
else
{
pushParam
.
setFd_3adfe6598281e8
(
CommonConstants
.
EMPTY_STRING
);
}
//客户名称
pushParam
.
setFd_3adfe7a2688902
(
param
.
getCustomerName
());
if
(
null
!=
param
.
getCustomerName
()){
pushParam
.
setFd_3adfe7a2688902
(
param
.
getCustomerName
());
}
else
{
pushParam
.
setFd_3adfe7a2688902
(
CommonConstants
.
EMPTY_STRING
);
}
//发生日期
pushParam
.
setFd_3adfe67c24dace
(
format
);
//姓名
pushParam
.
setFd_3adfe65d759650
(
param
.
getEmpName
());
if
(
null
!=
param
.
getEmpName
()){
pushParam
.
setFd_3adfe65d759650
(
param
.
getEmpName
());
}
else
{
pushParam
.
setFd_3adfe65d759650
(
CommonConstants
.
EMPTY_STRING
);
}
//身份证号
pushParam
.
setFd_3adfe65dbd9f68
(
param
.
getEmpIdcardNo
());
if
(
null
!=
param
.
getEmpIdcardNo
()){
pushParam
.
setFd_3adfe65dbd9f68
(
param
.
getEmpIdcardNo
());
}
else
{
pushParam
.
setFd_3adfe65dbd9f68
(
CommonConstants
.
EMPTY_STRING
);
}
//发票号
pushParam
.
setFd_3adfe65e0cd094
(
param
.
getInvoiceNo
());
if
(
null
!=
param
.
getInvoiceNo
()){
pushParam
.
setFd_3adfe65e0cd094
(
param
.
getInvoiceNo
());
}
else
{
pushParam
.
setFd_3adfe65e0cd094
(
CommonConstants
.
EMPTY_STRING
);
}
//险种
pushParam
.
setFd_3adfe65f6599e4
(
param
.
getInsuranceTypeName
());
if
(
null
!=
param
.
getInsuranceTypeName
()){
pushParam
.
setFd_3adfe65f6599e4
(
param
.
getInsuranceTypeName
());
}
else
{
pushParam
.
setFd_3adfe65f6599e4
(
CommonConstants
.
EMPTY_STRING
);
}
//保险公司
pushParam
.
setFd_3adfe65ea04728
(
param
.
getInsuranceCompanyName
());
if
(
null
!=
param
.
getInsuranceCompanyName
()){
pushParam
.
setFd_3adfe65ea04728
(
param
.
getInsuranceCompanyName
());
}
else
{
pushParam
.
setFd_3adfe65ea04728
(
CommonConstants
.
EMPTY_STRING
);
}
//保单号
pushParam
.
setFd_3adfe65e60e110
(
param
.
getPolicyNo
());
if
(
null
!=
param
.
getPolicyNo
()){
pushParam
.
setFd_3adfe65e60e110
(
param
.
getPolicyNo
());
}
else
{
pushParam
.
setFd_3adfe65e60e110
(
CommonConstants
.
EMPTY_STRING
);
}
//保险开始日期
pushParam
.
setFd_3adfe6b7e0ede8
(
param
.
getPolicyStart
().
toString
());
if
(
null
!=
param
.
getPolicyStart
()){
pushParam
.
setFd_3adfe6b7e0ede8
(
param
.
getPolicyStart
().
toString
());
}
else
{
pushParam
.
setFd_3adfe6b7e0ede8
(
CommonConstants
.
EMPTY_STRING
);
}
//保险结束日期
pushParam
.
setFd_3adfe6b847bfe6
(
param
.
getPolicyEnd
().
toString
());
if
(
null
!=
param
.
getPolicyEnd
()){
pushParam
.
setFd_3adfe6b847bfe6
(
param
.
getPolicyEnd
().
toString
());
}
else
{
pushParam
.
setFd_3adfe6b847bfe6
(
CommonConstants
.
EMPTY_STRING
);
}
//购买标准
pushParam
.
setFd_3adfe6d55384c6
(
param
.
getBuyStandard
());
if
(
null
!=
param
.
getBuyStandard
()){
pushParam
.
setFd_3adfe6d55384c6
(
param
.
getBuyStandard
());
}
else
{
pushParam
.
setFd_3adfe6d55384c6
(
CommonConstants
.
EMPTY_STRING
);
}
//实际保费
pushParam
.
setFd_3adfe6610c0d2c
(
param
.
getActualPremium
());
if
(
null
!=
param
.
getActualPremium
()){
pushParam
.
setFd_3adfe6610c0d2c
(
param
.
getActualPremium
().
toString
());
}
else
{
pushParam
.
setFd_3adfe6610c0d2c
(
CommonConstants
.
EMPTY_STRING
);
}
//医保
pushParam
.
setFd_3adfe66041a996
(
param
.
getMedicalQuota
());
if
(
null
!=
param
.
getMedicalQuota
()){
pushParam
.
setFd_3adfe66041a996
(
param
.
getMedicalQuota
());
}
else
{
pushParam
.
setFd_3adfe66041a996
(
CommonConstants
.
EMPTY_STRING
);
}
//事故或残疾
pushParam
.
setFd_3adfe6609aa810
(
param
.
getDieDisableQuota
());
if
(
null
!=
param
.
getDieDisableQuota
()){
pushParam
.
setFd_3adfe6609aa810
(
param
.
getDieDisableQuota
());
}
else
{
pushParam
.
setFd_3adfe6609aa810
(
CommonConstants
.
EMPTY_STRING
);
}
//预估保费
pushParam
.
setFd_3adfe6e30f2a3c
(
param
.
getEstimatePremium
());
if
(
null
!=
param
.
getEstimatePremium
()){
pushParam
.
setFd_3adfe6e30f2a3c
(
param
.
getEstimatePremium
().
toString
());
}
else
{
pushParam
.
setFd_3adfe6e30f2a3c
(
CommonConstants
.
EMPTY_STRING
);
}
//结算月
pushParam
.
setFd_3aea2f0180eccc
(
param
.
getSettleMonth
());
if
(
null
!=
param
.
getSettleMonth
()){
pushParam
.
setFd_3aea2f0180eccc
(
param
.
getSettleMonth
());
}
else
{
pushParam
.
setFd_3aea2f0180eccc
(
CommonConstants
.
EMPTY_STRING
);
}
//交易类型
if
(
null
!=
param
.
getInteractiveType
()){
pushParam
.
setFd_3af9197b31071c
(
param
.
getInteractiveType
());
}
else
{
pushParam
.
setFd_3af9197b31071c
(
CommonConstants
.
ZERO_INT
);
}
return
pushParam
;
}
...
...
yifu-insurances/yifu-insurances-api/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/vo/TInsuranceSettlePushParam.java
View file @
24a6de34
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
insurances
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.databind.annotation.JsonDeserialize
;
import
com.fasterxml.jackson.databind.annotation.JsonSerialize
;
import
com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer
;
import
com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer
;
import
io.swagger.v3.oas.annotations.media.Schema
;
import
lombok.Builder
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
java.math.BigDecimal
;
import
java.time.LocalDate
;
import
java.util.Date
;
/**
* @author zhaji
...
...
@@ -19,10 +16,6 @@ import java.util.Date;
*/
@Data
public
class
TInsuranceSettlePushParam
{
/**
* ID主键 36位
*/
private
String
fd_id
;
/**
* 单据类型 200 单选(1,预估单,2,实缴单,3,差异单)
...
...
@@ -42,12 +35,6 @@ public class TInsuranceSettlePushParam{
@Schema
(
description
=
"项目名称"
)
private
String
fd_3adfe6592b4158
;
/**
* 单号 200
*/
@Schema
(
description
=
"单号"
)
private
String
fd_3adfe67a9f6364
;
/**
* 客户编码 200
*/
...
...
@@ -127,7 +114,7 @@ public class TInsuranceSettlePushParam{
* 实际保费 精确到小数点后两位
*/
@Schema
(
description
=
"实际保费"
)
private
BigDecimal
fd_3adfe6610c0d2c
;
private
String
fd_3adfe6610c0d2c
;
/**
* 医保 精确到小数点后两位
...
...
@@ -145,61 +132,8 @@ public class TInsuranceSettlePushParam{
* 预估保费(应收) 精确到小数点后两位
*/
@Schema
(
description
=
"预估保费"
)
private
BigDecimal
fd_3adfe6e30f2a3c
;
/**
* 结算状态 200 单选(1未结算,2结算中,3已结算)
*/
@Schema
(
description
=
"结算状态"
)
private
String
fd_3adfe6ec6a8cbe
;
private
String
fd_3adfe6e30f2a3c
;
/**
* 收款状态 200 单选(1未收,2已收)
*/
@Schema
(
description
=
"收款状态"
)
private
String
fd_3adfe6ef5dfaac
;
/**
* 收入结算单号 200
*/
@Schema
(
description
=
"收入结算单号"
)
private
String
fd_3adfe79fd04606
;
/**
* 收款认领单号 200
*/
@Schema
(
description
=
"收款认领单号"
)
private
String
fd_3adfe7a117f086
;
/**
* 应支出 精确到小数点后两位
*/
@Schema
(
description
=
"应支出"
)
private
Double
fd_3adfe6e3911ffe
;
/**
* 支出结算状态 200 单选(已结算,结算中,未结算)
*/
@Schema
(
description
=
"支出结算状态"
)
private
String
fd_3adfe6eda67236
;
/**
* 付款状态 200 单选(已收,未收)
*/
@Schema
(
description
=
"付款状态"
)
private
String
fd_3adfe6f05531ec
;
/**
* 支出结算单号 200
*/
@Schema
(
description
=
"支出结算单号"
)
private
String
fd_3adfe7a035849c
;
/**
* 付款单号 200
*/
@Schema
(
description
=
"付款单号"
)
private
String
fd_3adfe7a08eba96
;
/**
* 结算月份 200
...
...
@@ -208,10 +142,10 @@ public class TInsuranceSettlePushParam{
private
String
fd_3aea2f0180eccc
;
/**
*
状态
200
*
交易类型
200
*/
@Schema
(
description
=
"
状态
1新增结算单,2作废结算信息,3更新保单信息"
)
private
String
fd_3af9197b31071c
;
@Schema
(
description
=
"
交易类型
1新增结算单,2作废结算信息,3更新保单信息"
)
private
Integer
fd_3af9197b31071c
;
}
yifu-insurances/yifu-insurances-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/insurances/service/impl/TInsuranceDetailServiceImpl.java
View file @
24a6de34
...
...
@@ -1086,9 +1086,7 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
save
(
settle
);
detail
.
setDefaultSettleId
(
settle
.
getId
());
successList
.
add
(
detail
);
}
else
{
//按天
//计算起止时间的天数
...
...
@@ -1120,7 +1118,6 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
settle
.
setCreateTime
(
LocalDateTime
.
now
());
tInsuranceSettleService
.
save
(
settle
);
detail
.
setDefaultSettleId
(
settle
.
getId
());
successList
.
add
(
detail
);
}
}
...
...
@@ -1144,6 +1141,11 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
}
if
(
CollectionUtils
.
isNotEmpty
(
successList
)){
for
(
TInsuranceDetail
tInsuranceDetail
:
successList
)
{
this
.
updateById
(
tInsuranceDetail
);
pushEstimate
(
tInsuranceDetail
);
}
//更新
this
.
saveOrUpdateBatch
(
successList
);
...
...
@@ -3073,9 +3075,8 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
});
}
tInsuranceOperateService
.
saveBatch
(
operateList
);
return
R
.
ok
(
errorList
,
"导入成功"
);
}
return
R
.
ok
();
return
R
.
ok
(
errorList
,
"导入成功"
);
}
/**
...
...
@@ -4478,6 +4479,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
/**
* 获取项目权限
*
* @author zhaji
* @param user
* @return {@link List< String>}
*/
public
List
<
String
>
getDeptNoList
(
YifuUser
user
){
List
<
String
>
deptList
=
new
ArrayList
<>(
16
);
String
id
=
user
.
getId
();
...
...
@@ -4509,6 +4517,13 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
return
deptList
;
}
/**
* 获取地市权限
*
* @author zhaji
* @param user
* @return {@link String}
*/
public
String
getRegionSQL
(
YifuUser
user
){
String
id
=
user
.
getId
();
String
sql
;
...
...
@@ -4556,4 +4571,17 @@ public class TInsuranceDetailServiceImpl extends ServiceImpl<TInsuranceDetailMap
}
/**
* 投保成功后推送预估保费
*
* @author zhaji
* @param
* @return {@link String}
*/
public
String
pushEstimate
(
TInsuranceDetail
tInsuranceDetail
){
String
deptNo
=
tInsuranceDetail
.
getDeptNo
();
return
null
;
}
}
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